Start by reading Installing plugins section in our comprehensive WordPress and WordPress Multisite Manual if you are new to WordPress.
Once installed and activated, a new menu item will appear in your admin area.
- When Network Activated on a WordPress Multisite, go to Network Admin > Snapshots > Settings.
- When activated on a single site install of WordPress, go to Snapshots > Settings.
Configuring the Settings
We need to first configure the folder where we want these backups done. Click on Settings now.
You can customize the name of the folder here, and change it to anything you like. We’ll move the files already backed up over for you. How cool is that!!
We will then want to set how many records are backed up per request. This is titled Database Segment Size.
The Segment Size can be defined as the number of rows to backup per table per request. The Segment Size controls the backup processing when you create a new snapshot.
During the backup process, Snapshot will make a request to the server to backup each table. You can see this in the progress meters when you create a new snapshot.
In most situations this backup process will attempt to backup the table in one step. But on some server configurations the timeout is set very low or the table size is very large and prevents the backup process from finishing.
To control this, the Snapshot backup process will breakup the requests into smaller ‘chunks of work’ requested to the server.
For example, let’s say you have a table with 80,000 records. This would take more than the normal 3 minutes or less most servers allow for processing a single request. By setting the segment size to 1000, the Snapshot process will break up the table into 80 small parts. These 1000 records per request should complete within the allowed server timeout period.
The next section, Server Info, displays everything you need to know about the particular configuration of your install. This can be very useful information indeed if you ever need to contact support with any issues.
We can then set a new memory limit. Keep in mind if your database is growing in size, then you will need more PHP memory to process that. If there isn’t enough, then PHP will time out with memory errors.
The next settings area allows you to specify files or directories that will be excluded automatically from all snapshot configurations.
You can also setup exclusions specific to a single snapshot via the configuration screen (see Starting A Snapshot below). The exclude logic uses pattern matching. So instead of entering the complete server pathname for a file or directory you can use simply use the filename of parent directory.
For example to exclude the theme twentyten you could enter this one of many ways: twentyten, themes/twentyten /wp-content/themes/twentyten, /var/www/wp-content/themes/twentyten. Regular Expression are not allowed at this time.
The Error Reporting section controls how Snapshot will handle an error condition during the backup / restore processing.
There are two columns for each type of error. The ‘stop’ column controls if Snapshot will abort the current process should that type of error be reached. The ‘log’ column controls if the type of error and details will be written to the processing log. In most cases you want to set ‘stop’ for Errors only. And set ‘log’ for all.
The final section lets you select which zip compression library to use.
The zip library is used during the backup and restore processing by Snapshot.
In most cases ZipArchive is built into PHP and generally faster than PclZIP. ZipArchive uses files whereas PclZIP uses memory for temporary storage when compressing large files.
That’s it for the settings — all done.
Destinations are external locations where you can store your Snapshots so they’re secure and accessible even if your server crashes.
A destination is a remote system like Amazon S3, Dropbox, SFTP or GreenQloud. Simply select the destination type, then fill in the details. When you add or edit a Snapshot you will be able to assign it a destination.
When the snapshot backup runs, the archive file will be sent to your selected destination instead of stored locally.
To set up a destination, simply click the Add New button next to your preferred service, and follow the directions. Go ahead and set up a destination now for the next steps.
Starting A Snapshot
In the Snapshot menu, click on “Add New.”
Here we will want to give our Snapshot a name. It doesn’t really matter what you call it because its all relative to you. You can add some notes, as well as a reminder of what you’re performing with Snapshot.
In the next section, you can select which files to include or exclude from the Snapshot.
You can choose to not include any files, include only common files, or select specific files you want to include.
You can also list additional files to exclude from this snapshot. This is handy to exclude very large files like videos that are 2G in size that you may be hosting, but know you have a backup elsewhere.
Next we will want to decide what tables to take a Snapshot of. You have 3 basic options:
- Do not include database tables in this Snapshot.
- Include all blog database tables in this archive. This will automatically include new tables.
- Include selected database tables in this Snapshot.
Selecting the 3rd option will expand the section so you can select exactly which tables you want to include. The first set of options are for the default WordPress core tables — the ones for users, usermeta, and so on.
The next set of options are for the extra tables added by themes and plugins. Any tables added by WordPress, themes, or plugins are all optional, and you can choose which ones you need!
Now we need to tell the plugin when to run & archive the backup.
When selecting the Backup Interval, please note that the Snapshot scheduling process uses the WordPress Cron (WPCron) system. It should be understood that WPCron is not precise. If you schedule a Snapshot for a specific minute of the hour, WPCron may not execute at exactly that time. WPCron relies on regular front-end traffic to your website to kickoff the processing.
You can also specify the total number of local archives to keep for this snapshot. Once the archive limit is reached, older locally stored archives will be removed.
In common cases you may want to set the backup interval to once a week. Then set the number of archives to keep to 52 which would give you a year or backups. But keep in mind on a large site this will be a lot of extra disk space required.
Finally, select where you want to store your backup.
In the Backup Destination dropdown, you can select to archive your backup locally, or choose any of the Destinations you have already set up. If you need another, simply click Add More Destinations.
You can also use the optional Directory to override or supplement the selected destination directory value.
Once you are happy with all your choices here, then all that’s left to do is to click on the “Create Snapshot” button. … So lets do it!
You’ll then see a new screen that shows you the backup progress as it’s working.
If you need to abort the backup at any time and start over again later, simply click the Abort button that appears next to each segment as it is being backed up.
And don’t be alarmed if this takes a while or if the backup does not appear instantly. These things take time you know. ;-)
Go grab yourself a beverage whilst you wait if you wish. :-)
Once it’s done, the plugin will let you know with a friendly notice:
Where Are My Snapshots? Can I Restore Them?
You will notice in the Snapshot menu there is an option for “All Snapshots.” Click on that, and you will get a list of all the Snapshots you have already archived. It really is that easy!
As you’ll notice on the page, you can edit, run, restore or delete a backup.
You can even view which core & optional tables you backed up by clicking the corresponding link:
At the far right of each snapshot listed, you’ll find links to download the snapshot to your computer or view the archive for that particular snapshot. You can also view or download the log of all actions performed during the backup.
How awesome is all that!!
Importing a Snapshot
If you have Snapshots stored on a remote server, or have manually uploaded them to to your local folder, you must import them first so the plugin will recognize and show the archive in the All Snapshots listing.
Note that if you are importing from a remote server, the remote archive must by publicly accessible as this import process does not yet support authentication.
Once you have successfully imported your remote archive or scanned your local folder, you’ll see a success message with the import results.
If you have set up the archive to save to an alternate directory, then enter the full server path to the directory where the archive resides in the URL field.
You can now select your imported archive, or perform operations on it, from the All Snapshots page.
If you’re stuck, need some help, or have a suggestion, then get involved with the community through our forums!
See you there!