Using Directory Zip for Site Backup
We use Directory Zip to automatically back up most of our websites.
Every week, Directory Zip backs up certain sections of our websites into ZIP files. After backing up a section, it sends us an email with the download link.
We click the link and store the file on our office computer.
Willmaster.com is our largest site with some over 4,000 pages. You can see what a chore it would be to do a manual backup.
Although our hosting company does make backups, we prefer not to relinquish total control. We've heard too many horror stories of old or corrupted backups or "oops, I guess we didn't do it" stories.
Note that Directory Zip does not back up MySQL files. It can only zip files in public document and cgi-bin directories and their subdirectories.
How We Set Up the Weekly Backup
Overview: The backups were set up and then cron schedules made to run one backup every hour until all backups are done.
At the Configuration menu item is a place to type in a backup authorization key. This is a sequence of characters that will be used when setting up the cron schedule.
Next, we set up each backup with the setting we wanted. This is at the Backup menu item.
Before setting up cron for an automatic backup, it is important to click the "Back Up To ZIP File" button to verify the settings are what you wanted. Here are several things to consider:
-
If you are ever required to restore a backup, how many directories do you want to restore all at once. When a backup is restored, all files in the backup are restored to their state at the time the backup was made.
-
Also, if there are hundreds of files or many very large files, the time it takes to ZIP everything up may exceed the amount of time your hosting company allows scripts to run.
The Backup page needs to know which directory to back up. There are also some options:
-
Whether or not to back up files with names starting with a period.
We checked this box because we wanted any .htaccess files backed up, too.
-
Whether or not to back up files with .zip file name extensions.
We left this unchecked. Otherwise, the backup ZIP files would be backed up along with the rest of the files. The ZIP file would grow and grow and grow.
-
Whether or not to include subdirectories.
For some backups we checked this. For others, not. If it is checked, Directory Zip will back up the specified directory and all its subdirectories. Some subdirectories contain so much content we wanted to back them up separately.
-
The ZIP file name for the backup.
If left blank, Directory Zip will construct a file name.
-
Whether or not to update the current backup ZIP file with the new backup.
We leave this unchecked so each week's backup simply updates the current ZIP file.
In between backups, we download the current ZIP file. If we did not, we would want this checked so each backup makes a separate ZIP file on the server.
-
After zipping, download.
For cron scheduled backups, leave this unchecked. If backing up by using the Directory Zip control panel directly, check this or not depending on whether you want to download immediately or later (or not at all).
When a backup has been set up and you're satisfied with it, the "One-Click and Pre-Scheduled Backup Info" section on the control panel Backup page contains information about how to set up cron.
Click the "Cron Info" link to reveal a cron setup section. Then, at the bottom of that section, click one of the "... cron command" to reveal copy and paste cron command.
Different hosting companies have different ways to set up a cron schedule. You'll need to set up the timing and then paste in the cron command from the above page.