Creating Backups

Creating regular backups of data is something we all know we should do but do we actually do it? Most people generally do not back up their data and even fewer check their backups to make sure that they are correct.

Regularly backing up data on a web host is even rarer for most website owners. In light of this, I predict that less than 1% of all personal and small business website owners backup their data correctly and consistently. Obviously, this is a problem and it usually stems from being rather difficult to schedule backups of remote file systems.

Automated Backups

Backing up websites automatically traditionally meant putting in quite a bit of work. Lots of hacky solutions have been created using rsync, FTP, and mysqldump but they are usually one-off solutions that take several days to set up and every web host is different. Some CMS products have dedicated backup solutions but are designed solely for that CMS. In addition, incremental backups of the average website has been an incredibly rare find.

Many people rely on their web hosting provider to do backups. I've never seen a single web host make any guarantees that their backup system functions, how often their backup scripts run, what the backups contain, and other critical factors. Discovering the hard way that all that hard work has been lost is not fun and very sad. Even if the web host claims that they keep backups, it just makes sense to make your own backups.

Example site backup using a configuration file.
Example site backup using a configuration file.

Performing automated incremental backups of any website is now possible thanks to a product on this website called the WebCron Site Backup module. WebCron provides a clean, transparent compression and encryption client/server framework in which modules operate. This allows the data that the WebCron Site Backup module sends and receives to be sent and received securely, use very little bandwidth, and actually do the impossible - create incremental backups over HTTP. No FTP, rsync, or mysqldump required - this is a self-contained solution that operates solely over HTTP (or HTTPS).

You don't have to use Barebones CMS to use WebCron Site Backup. These are two completely separate products that just happen to share common components. I was also feeling too lazy and cheap to go and get a domain and design a dedicated website for WebCron.

Example e-mail report generated by WebCron Site Backup.
Example e-mail report generated by WebCron Site Backup.

In addition to backing up files and MySQL databases, WebCron Site Backup also generates e-mail reports of the changes made since the last backup. Getting e-mail notification that a client changed a website and potentially broke it or a hacker has entered the system is incredibly valuable, time-saving information.

Why are you still reading this page? Go install and use WebCron Site Backup already.

Manual Backups

The 'Create ZIP Archive' setup dialog.
The 'Create ZIP Archive' setup dialog.

The simplest way to create a one-time backup is to use the 'Create ZIP File' feature in the 'File Explorer' site option. This option is not available on all servers and requires the ZipArchive class to be installed. Even if the class is installed, the class generates broken ZIP archives under several versions of PHP. However, for creating a quick backup on the server, this feature is much more useful than transferring zillions of tiny files via FTP.

Manually creating an archive is really useful when doing a complete redesign of a section of a website that falls outside of the scope of the built-in revision system. Why fire up a FTP client when you already have a web browser window open?

This feature can also be used to quickly move or clone entire sections of websites to another directory. ZIP everything up, download the file, upload the file to the new location, and extract the ZIP file contents.

© CubicleSoft