New hybrid backup module in v3.0 (Codename Phoenix)
Currently, backups are taken using one of two methods, namely, Single-call and Multi-call methods.
With the single call backup method, The entire backup process will take place in a single call. If you choose to upload the files you are about to backup to a cloud repository, the upload process will take place in the same single call. The problem with this method was that the server might take a longer time to complete the backups depending on the size of your backups and your server resources. This might result in timeout-related issues and break communications which will, in turn, result in a failed backup.
To counter this, we introduced the multi-call backup method. In this slower-but-steadier method, the backup process happens across multiple calls. The multi-call backup method solved memory and timeout-related issues since each call last for just 30 sec and consumed very less memory. But the problem with this was that it was completely dependent on the PclZip module which caused a lot of delays and errors and was not very efficient.
How’s the new backup better?
The new hybrid backup module solves all these issues by using the best option available on the server. If exec() is available, that would be used. If not, PHP ZipArchive() would be used. As the last fall back option, PclZip would be used. This multi-tiered approach would ensure that the backups are completed with almost 100% reliability.
Multiple zip archives
Themes, plugins, uploads and all other files together are zipped as four separate archives. Handling 4 chunks of zips is much better than just one large zip file.
Excluding core WordPress files
Backing up the core WordPress files is unnecessary since it can be downloaded fresh during restore. Only the wp-config file is backed up so that we can restore the required version.
It now uses wp_cron() to resume backups that have been paused for some reason. So an admin visit will also trigger stalled backups, and the success rate will be much higher because it is not dependent on a single point of initiation in the admin panel.
In addition to these improvements to the restore process, we have reduced it’s dependency on the plugin and have implemented a bridge concept to move files.
Better backup & restore = Better cloning & staging.
The improved backup and restore method is now used in the cloning and staging modules too. Consequently, the Cloning and Staging add-ons are improved.
That’s it for this week’s updates on the improved backup module of v3.0. Next week, stay tuned to know what’s new and better about the Client Reporting addon.