Name: Easy Joomla Backup - Version: 3.4.1.0-FREE / 3.6.3.2-PRO / 4.0.4.3-PRO - Type: Component, System Plugin and CLI Script - License: GPLv3
Description: EJB creates quickly and easily backups in Joomla! - Joomla! Extensions Directory
Overview of all downloads of the extension: EJB - Easy Joomla Backup Downloads
Create backups with Easy Joomla Backup - Files and database dump as a ZIP archive
Component: EJB - Easy Joomla Backup
Function: Creates backups of Joomla! websites - Full, Database and File Backup
Languages: English and German
Easy Joomla Backup creates complete backups without any frills. All files and a full database dump are stored in one backup zip archive. With this archive, you have all the essential data with which you can restore the website completely combined in one package. The backups are stored in a special folder which is not callable from the outside and can be managed easily using the component.
The component is intentionally kept simple, so as not to distract from the essentials: backing up the Joomla! website! In the overview, you can find a complete list of all backups with a download option of the respective backup. The following action button can be found in the top bar: Full Backup, Database Backup, File Backup, Discover, Delete and Options (see tab Installation for more information).
The zip process is fast and resource optimized. The script tries to increase all relevant settings to prevent timeouts on big sites. If the hosting company does not provide enough resources or restrict the execution of long processes, then you will probably encounter some problems to create backup files on big sites. In that case, you should exclude files or folders which you don't need to back up every time (e.g. images folder) or extend the resources with the help of your hosting company.
The component is based on my standalone script Kubik-Rubik Joomla! Backup Script, for which a good article with basic tips exists (in German only): Backups in Joomla! erstellen
Every administrator should regularly create backups to have the possibility to restore the working state in case of problems. Before any significant changes (install updates or new extensions) the creation of a backup is absolutely essential!
Features
- Create quickly and easily backups in Joomla!
- Dynamic, Ajax-powered backup process
- Automatic restoration - Easy Joomla Backup Pro Restore script (PRO)
- Dropbox Upload - Uploads archives with one click into Dropbox (PRO)
- Manual restoration - files via FTP, database dump via a database tool, e.g. phpMyAdmin
- The extension creates Backups of all files and the database
- Three different backup types: Full, Database and File Backup
- All files and a database dump are packed into one ZIP archive
- Extended ACL settings: Configure, Access Administration Interface, Delete, Download, Full Backup, Database Backup, File Backup, Discover
- Indicator of the backup progress in per cent in the tab/window title
- Exclude files from the backup archive
- Exclude folders from the backup archive
- Add 'DROP TABLE' order to the dump file
- Add additional tables from the database
- System Plugin: EJB Cronjob
Installation & Usage
Install the extension in the backend under Extensions and configure it in Components - Easy Joomla Backup.
You can control the component using the buttons at upper right. All existing backups are listed in the main content area. The list can be searched to find a specific backup. The backup files can be downloaded in the last column of the corresponding backup entry. The download process can be executed via FTP or directly with a click on the archive name in the last column. The download option is only activated for user levels which have the needed rights to download the backup archives.
Explanation of each buttons:
- Full Backup - creates a backup of all files and the database.
- Database Backup - creates a backup of the database.
- File Backup - creates a backup of all files.
- Discover - synchronizes the entries of the backups from the database with existing files. If the files are missing, the entries are removed. If entries are missing but files exist, then new entries are created automatically.
- Delete - deletes all selected entries and the corresponding backup files.
- Options - opens the settings of the component (see below).
Following options can be adjusted in the settings:
- Exclude files from backup archive - excludes single files from the backup archive. The complete path to the file starting from the root folder has to be specified for unique identification.
- Exclude folders from backup archive - excludes folders from the backup archive. The complete path to the folder starting from the root folder has to be specified for unique identification.
- Add 'DROP TABLE' instruction to dump file - adds the DROP TABLE order to the database dump. So the dump file can be imported directly into the same database without having to remove all tables first.
- Add additional tables - adds additional tables to the dump which do not have the same prefix as the Joomla! tables (e.g. a Piwik installation on the same database).
Enter only one entry per line in all the text fields in the settings!
Each action can be accurately controlled through the internal ACL. In the settings you may define for every user group which actions can be performed. So you can allow downloads only for Super Users, but the creation of the backups also for Administrators.
You may occasionally encounter problems on very large sites due to limitations of the server. In such cases, you can solve problems by excluding folders or increase the limits by the hoster. I could backup a test site with over 4GB in my local test environment without incidents.
If you restore the archive directly on the server via SSH in your terminal using unzip, then you should check the permission rights of the files and folders after the unzipping process was executed. If required, you should run the following commands to correct them:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
How to create a backup?
Select a backup type on the overview page and click on the corresponding action button. On the following page, you can enter an individual comment for the backup, a further click on Create Backup starts the backup process. Depending on the size of the site, the process can take several minutes to complete. During this time, you should not click around on the page or close the window completely. After completion, you will be automatically redirected back to the overview page.
How to restore from the backup archive?
It is easy to restore the state of the website from the backup archive. You can restore the backup created by Easy Joomla Backup Pro with one click directly on the server using the standalone script Easy Joomla Backup Pro Restore! Upload the full backup archive and the script to your server and call the script in your browser. Once clicked on the restore button, everything will be restored and configured automatically!
If you want to restore the backup manually, then you have to upload the files to your server and import the SQL dump into your database (e.g. with the help of phpMyAdmin).
If you recover the website on a different server environment, then you, of course, have to enter the new database connection data and the new paths in the configuration.php. As I said, just 'old-school', as also with usual manual backups! :-)
If you are using the free version of Easy Joomla Backup, then you may use the script Kubik-Rubik Unzip Script to extract zip files within seconds while restoring the website with the backup archive. For the paid version you should use the restoration script Easy Joomla Backup Pro Restore!
Cronjob - Automatic backups with the help of scheduled tasks
CLI script
After the installation, the CLI script is available in the cli folder of the Joomla! instance. Use the script to create backups through the command line directly on the server. With the help of crontab you can create cron jobs to automate the backup process.
Usage in the terminal on the server:
Joomla! 3.x
php path/to/joomla/root/cli/ejbCli.php x [--json]
Argument x can be: 1
- Full Backup, 2
- Database Backup, 3
- File Backup. Default value is 1
if no argument is provided! Add the option --json
to display the result with backup information in JSON format.
Joomla! 4.x
php path/to/joomla/root/cli/joomla.php x [--json|--raw]
Argument x can be: backup:full
- Full Backup, backup:database
- Database Backup, backup:file
- File Backup. Default value is backup:full
if no argument is provided! Add the option --json
to display the result with backup information in JSON format or the option --raw
to display the result in minified form (0 - success / 1 - error).
Example for a crontab entry to create full backups daily at midnight on Joomla! 4.x. Open with the cron utility with crontab -e
and enter the code with the correct path of your Joomla! installation. Do not forget to restart this service after you've saved the file:
0 0 * * * php path/to/joomla/root/cli/joomla.php backup:full
System Plugin - Easy Joomla Backup Cronjob - EJB Cronjob
EJB Cronjob is a helper plugin for the component Easy Joomla Backup. With this system plugin, you may create backups completely automatically with cronjobs or a custom call! With the self-defined token, you can start the backup process directly from the frontend with the correct query parameters without having to login into the administration area.
How to use the cronjob functionality?
It is really easy! You have to add the cronjob parameters to the URL of the front page (or any other page in the frontend) to activate the backup process. You can use two parameters; one of them is mandatory, the other optional:
ejbtoken - this is the token which you have to set in the settings of the plugin. Only with the correct token, you may execute the plugin. This parameter is mandatory.
ejbtype - with this parameter, you may define the backup type: 1 - full backup, 2 - database backup, 3 - file backup. If you do not use this parameter, then the plugin will use the type from the settings.
Example
In the settings the token is set to 's3cR3T!T0K3n', then a correct call could be with the type 'Full Backup':
http://www.example.com?ejbtoken=s3cR3T!T0K3n&ejbtype=1
Without the type: http://www.example.com?ejbtoken=s3cR3T!T0K3n
Replace in both examples the example domain with your domain. Please use a secure token to avoid unauthorized calls!
Note: The plugin doesn't produce messages after it has been executed; this is not necessary for a cronjob script. The only thing is a redirection to remove the query parameters. If you want to test the functionality of this plugin, then go to the component and check whether the backup file is listed in the overview!
Attention: The backup process will get interrupted if the cronjob does not call the page until the end of the process. If you can not configure the cronjob to call the page until it is loaded completely - the server sends a valid HTTP status code as a response (here it is 303 See other due to the redirection to the front page), then you can bookmark the cronjob URL and still use this functionality to create backups manually from the frontend!
Changelog
Joomla! 4.x
Version 4.0.4.3-PRO - 2022-12-09
- + Added logging for exceptions using Joomla!'s core log system.
- # Optimised database structure validity executed in the update routine.
Version 4.0.4.2-PRO - 2022-11-09
- # An empty line in exclude folder option excluded all folders. Thanks to HorstG for reporting it!
Version 4.0.4.1-PRO - 2022-09-01
- # Updated the CLI command files to bypass a bug introduced in Joomla! 4.2.1. Thanks to Thomas (thosch) for reporting it!
Don't forget that you can use the --json option to receive a JSON response from the backup call (php cli/joomla.php backup:full --json
)
Example output:{"date":"2022-09-01 08:07:15","dateLocal":"2022-09-01 10:07:15","comment":"Backup file was created by a CLI command","name":"cli_2022-09-01_10-07-15_ckYVXVZqWYoPxLSV.zip","type":"fullbackup","duration":7.39,"size":27727416,"status":true}
Version 4.0.4.0-PRO - 2022-08-30
- + Added Pro Security Token validation check. The Pro package contains a token file with an individual security token linked to the user account and checked against the validation server for authenticity.
- ^ Multiple internal code optimisations.
- # Added an icon to component dashboard view. Thanks to Dirk (Wilderer) for reporting it!
Version 4.0.3.2-PRO - 2022-05-18
- + Added inline help toggle button to display inline descriptions to bypass a bug in Joomla! 4.1.3.
- ^ Changed field types from text to integer with dropdown list for the options "Initial execution level" and "Maximum amount of files per iteration".
- ^ Optimised default values for the options "Initial execution level" (6) and "Maximum amount of files per iteration" (1000).
- ^ Optimised the exclusion logic to improve the performance.
- # Fixed termination condition in a recusive function called via Ajax. Thanks to Michael K. for reporting it!
Version 4.0.3.1-PRO - 2022-02-17
- ^ Updated search tools output of the backend component due to the path change to the CSS file in Joomla! 4.1
- ^ Code optimisations
Version 4.0.3.0-PRO - 2022-01-10
- + Added Maximum amount of files per iteration option - Maximum amount of files per batch process to avoid timeouts in folders with a large number of files. Default: 500
- ^ Improved exception handling in the backup process with detailed error message output
- ^ Code optimisations
Version 4.0.2.0-PRO - 2021-11-17
- + Added the built-in Download Key Manager support to enter your Pro Update ID without installing the update helper plugin.
Important: Please copy your personal Pro Update ID using the second copy button in the Pro ID Manager and enter the key in System - Update - Update Sites - Select the entry of the Pro extension and enter the ID into the Download Key field. - ^ Code optimisations
Version 4.0.1.1-PRO - 2021-10-27
- + Added dateLocal field with the timezone of the server to the JSON output option. Thanks to Thomas Sch. for requesting it!
- ^ Updated session handler check. Thanks to Thomas Sch. for reporting it!
Version 4.0.1.0-PRO - 2021-10-26
- + Added --json and --raw options to the CLI commands. Thanks to Thomas Sch. for requesting this feature!
Usage via the command line:php cli/joomla.php COMMAND --json
andphp cli/joomla.php COMMAND --raw
--json will return a JSON with all relevant data that is also used in the notification mail, --raw will return 0 or 1 on the command line
Version 4.0.0.1-PRO - 2021-09-26
- # Upper and lower case of classes on Linux servers. Thanks to Werbeagentur Müller for reporting it!
Version 4.0.0.0-PRO - 2021-09-24
- + First Pro release for Joomla! 4.x based on EJB Pro version 3.6.1.0-PRO
- + Added system plugin for CLI commands:
backup:full
,backup:database
andbackup:file
Usage via the command line:php cli/joomla.php COMMAND
- Replace COMMAND with one of the commands above! - ! Removed CLI standalone script
Joomla! 3.x
Version 3.6.3.2-PRO - 2022-12-10
- + Added logging for exceptions using Joomla!'s core log system.
- # Fixed rare possible response error "Undefined array key 0" if error reporting is enabled. Thanks to eumel1602 for reporting it!
Version 3.6.3.1-PRO - 2022-05-18
- ^ Changed field types from text to integer with dropdown list for the options "Initial execution level" and "Maximum amount of files per iteration".
- ^ Optimised default values for the options "Initial execution level" (6) and "Maximum amount of files per iteration" (1000).
- ^ Optimised the exclusion logic to improve the performance.
- # Fixed termination condition in a recusive function called via Ajax. Thanks to Michael K. for reporting it!
Version 3.6.3.0-PRO - 2022-01-08
- + Added Maximum amount of files per iteration option - Maximum amount of files per batch process to avoid timeouts in folders with a large number of files. Default: 500
- ^ Improved exception handling in the backup process with detailed error message output
- ^ Code optimisations
Version 3.6.2.0-PRO - 2021-10-28
- + Added --json option to the CLI command. Thanks to Thomas Sch. for requesting this feature!
Usage via the command line:php cli/ejbCli.php TYPE --json
--json will return a JSON with all relevant data that is also used in the notification mail.
Important: You need to provide the backup type ([1|2|3]
) if you want to use the --json option!
Version 3.4.1.0-FREE - 2021-09-09
- ^ Optimised post process handling for CONSTRAINT rules in the database backup process. Thanks to Marion M. for reporting it!
Version 3.6.1.0-PRO - 2021-09-09
- ^ Optimised post process handling for CONSTRAINT rules in the database backup process. Thanks to Marion M. for reporting it!
Version 3.4.0.0-FREE - 2021-08-02
- + Maintenance update based on 3.6.0.2-PRO
- + Database backups are generated in separate Ajax calls instead of one single request, just like the file system backup. This approach mitigates the risk of hitting server limits for big databases drastically!
- + Optimised database backup process for huge tables (> 1 million entries) to mitigate resource consumption
- ^ Changed the version number specification. The first number stands for the supported major Joomla! version. The following three numbers follow the Semantic Versioning Specification (SemVer), as it used to be previously.
- ^ Updated custom fields
- ^ Updated language strings
- ^ Code optimisations
- # Fixed time offset of discovered backup entries
Version 3.6.0.2-PRO - 2021-07-29
- + Mail only if errors occur option - Sends the notification mail only if an error occurs. Thanks to Rico for requesting this feature!
Version 3.6.0.1-PRO - 2021-06-29
- + Mail after backup - Cron plugin & CLI script option - This feature sends a notification email with all details after the backup process if the cron plugin or the CLI script is used (cli/ejbCli.php).
- ^ Updated custom field
Version 3.6.0.0-PRO - 2021-05-21
- + Backup storage location option - With this option, you may define a custom storage location for the backup archives. For instance, you can specify a folder outside the webroot to block access via a browser. Use ../ to specify a folder outside the webroot. Example: ../backups
Note: PHP cannot always write data outside the webroot in strict server environments (open_basedir restriction). If you run into this problem, then please specify a folder within the webroot directory! - + Added "Backup storage location is writable" check to the list of requirement checks.
- ^ Changed the version number specification. The first number stands for the supported major Joomla! version. The following three numbers follow the Semantic Versioning Specification (SemVer), as it used to be previously.
- ^ Updated custom field
- ^ Updated language strings
- ^ Code optimisations
- # Fixed time offset of discovered backup entries
Download
Overview of all downloads of the extension: EJB - Easy Joomla Backup Downloads