I’ve just finished writing a new WordPress Plugin which creates a Snapshot Backup of your entire website: that’s your Database, current WP Core, all your Themes, Plugins and Uploads. The resulting single archive file is then uploaded to an FTP repository of your choice.
Peace of mind included
Download from the official WordPress Repository
UPDATE AUGUST 2012
Due to heavy workload and high demand I can currently no longer find the time to support Snapshot Backup. I may pick up this project again in the future and put new PHP skills to work. Thank you for being kind enough to understand.
In the meantime I’ve discovered a wonderful by Daniel Hüsken which does all I ever wanted Snapshot Backup to do and more: It’s called BackWPup – download it here. It’s way ahead of my plugin and under active development.
———————————-
Disclaimer
I’ve recently been flamed a lot by users who are less than happy with this plugin. That’s tough, so I wanted to state some very obvious facts that most of us do take for granted:
This plugin does not work for everyone. It works fine for me, and I’ve written it for me and my own servers. I’m distributing it in the hope that it will be useful to others, but with absolutely no guarantee that it will work on every Linux system out there.
You are free to use Snapshot Backup, but I strongly advise you to test it on a dummy system before deploying it to your precious live site. Users have reported every possible horror scenario, from complete site deletion to an empty database file. Please test the plugin on your system and check that it creates a reliable backup that can be restored before relying on it to work. Remember: you are using Snapshot Backup at your own risk.
Thank you!
Installation
Upload the ZIP file under Plugins – Add New – Upload. Alternatively, unzip all files and upload via FTP client manually.
Activate the plugin and find the option Snapshot Backup in your Dashboard options.
Usage
Snapshot Backup has been designed with ease of use and simplicity in mind.
Once the plugin is activated, you’ll find a new top Level Menu called Snapshot Backup on the left. Under Settings you configure your FTP Details and and additional directory you’d like to back up. Now you can either head over to to Snapshot Backup and create a Snapshot manually, or you can setup automation and let the plugin create a Snapshot for you at regular intervals.
Make sure your wp-content/uploads directory is writable – Snapshot Backup needs somewhere to write files to locally before they get sent away to your FTP server (this would ideally be a second server, preferably with a different host in a different data centre).
In the current release your screen will go blank while the script runs through the various stages. Depending on the size of your site this could take a while… be not alarmed and keep an eye out for the browser status bar. While it appears your browser is working Snapshot Backup is working too. I’m attempting to fix this in future releases and give you a status report of each stage.
Automation
Included since Version 2.0 we have the long awaited automation feature. This creates Snapshots while you sleep and even auto deletes older ones. You can set all this up under Automation and receive a friendly email ever time a Snapshot has been created (optional).
For the automation to work I’m using the WP Cron feature, which in turn relies on your website being visited every once in a while. On live production sites with 100+ visitors per day you’ll be fine, but on low traffic sites you may notice that Snapshots are created at irregular intervals – I’m thinking of test sites with blocked search engines or brand new sites.
To help this along and make the process more accurate you can create a Cron Job which calls the index.php file in your WordPress installation directory (usually http://www.yourdomain.com/index.php)
Screenshots
Snapshot Philosophy
Archiving dynamic websites isn’t all that easy and we all tend to forget that because the web is such a fluid thing. The idea of Snapshot Backup is that you may want to create an “as is” version of your entire website for archive purposes. With each click you’ll create a “time capsule” of sorts – this could be for legal, sentimental or security reasons.
Other solutions mirror or sync your installation – which is a great idea too, however if you only notice a week down the line that your site has been compromised then your synced copy most certainly is too. Snapshot makes it easy to go back to a clean version from x days/weeks/months ago.
How does it work?
Snapshot Backup first reads out your entire database into an file. Afterwards it uses the Linux shell command tar to archive all your content. Then it deletes the SQL file and then it uploads the resulting archive file over to your FTP repository.
Please note that this plugin does not work on Windows servers… sorry ;-(
Restoring a Snapshot
I’m working on a simple script that will do this for you. In the meantime you’ll be on your own – with some written guidance from yours truly. Have a look at this article which explains how to restore via FTP.
Known Issues
Even though this plugin is a great idea, it may not work for everyone. I’ve had reports from users reporting that either the plugin creates a 0MB backup file or does not include the database in the tar ball. The following hosts are known to be problematic:
- Media Temple
- Netpower
- MyWebHost
- Momwebs
Alternatives to Snapshot Backup
Roadmap: The Future of Snapshot Backup
There are plenty of things I want to add to and improve on this plugin:
- make sure the screen doesn’t go blank while the Snapshot is being created
- add translation
add the ability to run Snapshot automatically via WP Cron or Cron Jobsdone since 2.0make the admin interface look prettier (and easier to find)done since 2.0- manage FTP repository from admin interface (i.e. list and delete older backups, local and FTP)
- give this plugin its own website for documentation (snapshotbackup.org)
- finalize Snapshot Restore script
add FTP Port selectiondone since 2.1- add cloud storage support (Amazon, Dropbox, etc)
If you have any suggestions for future features please leave a comment.
Enjoy Snapshot Backup responsibly







{ 211 comments… read them below or add one }
← Previous Comments
Next Comments →
Thanks for the plugin that works fine (comparing to others)
It would be great to gzip tars to save traffic – my site is 1,3 Gb now…
No problem, glad to hear it’s working for you. I hear what you’re saying about the GZIP option. I’ve done some testing on that front and – believe it or not – the GZIP after TAR creates a file with the same size as the TAR or larger. Bizarre, but I guess these effects can happen with compression sometimes.
I was thinking maybe I can integrate this as an option, and GZIP both the TAR and the SQL as two files together, therefore the SQL file is easier to find. I hope I’ll get some time over the next couple of months to start working on Snapshot again, life’s pretty busy at the moment.
Hey, nice plugin.
I only have one small problem . I don’t remember if it appeared after updating wordpress or another plugin, but somehow if i have a limit of snapshots on the FTP server, your plugin transfers the last snapshot created and then deletes it ( i can see this in the FTP logs). It should delete the oldest snapshot right ?
I’ve checked the names of the snapshots, and they are in chronological order. I’ve deleted all the snapshots in the remtote FTP folder, but it still deleting the snapshot that it just transferred.
I am running wordpress 3.3.1 and snapshot 2.0.2.
The remote server is running PureFTPd on Ubuntu 11.10 x64.
Hi there,
thank you for letting me know – yes it *should* delete the oldest snapshot file… I’ve run a test at my end just now and can confirm it doesn’t do what we expect. I’m on CentOS with ProFTP at my end.
I’ll see if I can fix it – sadly I’m too occupied with other projects right now so it could take a while. Watch out for an upgrade which will address this issue. There are some other major upgrades I want to undertake so this is one is getting priority. Thanks!
Awesome plugin! been using it for months. Today, however, I was trying to set it up on one of my other websites, and while doing that, I changed my FTP user password.
Since that moment, the FTP server would always reject the connection (unknown username and password), when coming from the plugin.
I’m able to connect with the same credentials, using Cyberduck, as well as FTP’ing from my webhost server (via an SSH session) without a problem. So, I know it’s not an issue with the FTP server. Has there been any changes that you can think of that may be causing this?
btw, I’m running FileZilla FTP Server.
Hi George,
Glad you like the plugin! I’ve not made any changes to it recently, in fact it’s been like it is for too long. Strange thing you’ve got there… Is it not working anymore on any of your sites?
Sometimes when you paste your password rather than typing it in the plugin may see an extra character at the end (like a space). Also, are there any symbols in your new password? See if it works with only alphanumeric characters (no symbols).
Let me know if any of this helps.
Hi
Been using Snapshot Backup for a while and really love it. But I have a problem though – even though Snapshot Backup makes a backupfile of 3.5 GB, it only uploads around 1.3 GB to the FTP-server – consistently. Any idea why this happens?
R.
Hi Ronni,
thanks for bringing this to my attention – sounds like an FTP timeout or limitation to me. I’ve not tested the plugin with files that size. I’ll investigate this.
Let me ask you something: have you noticed anything like the plugin slowing down your website? I’ve had reports from other users about this but can’t see anything at my end. Are you on a dedicated machine or on shared hosting?
I’m pretty sure it’s an FTP-timeout then, as I experience the same thing when uploading / downloading to the same server. Unfortunately it’s a shared (discount)-host, so there’s no way of getting that fixed.
Bummer – I had hoped it was something I could change manually. Oh well – Snapshot Backup still works – I just have to download the backup manually with a FTP-program that supports resume.
Regarding slowdown: Yes, when starting the backup the server is somewhat slower, but that only lasts for very few minutes. The FTP-transfer is not noticable at all.
R.
Thanks for letting me know, Ronni.
I’m looking into other storage options, such as Amazon AWS and DropBox, but that’s a bit in the future. Maybe those won’t time out so easily.
Man I am really glad I use SNAPSHOT BACKUP and saved the backup file elsewhere via ftp.
Today someone and their MS FrontPage wiped out a whole WP site, and the website folder above it. If I had been saving WP backups in the WP folder (as many so-called backup plug ins do), they would be gone too. Luckily, I used SnapShot Backup and went to the extra trouble to create an additional ftp user just for wordpress backups.
So when this guy accidentally erased the whole WP site folder, it was no problem because he didn’t have access to the backups (so they were safe). I had the whole thing back up & running in less then 30 minutes, and I can do it faster next time. I have to say I’m quite pleased.
Mucho Thanks Jay Versluis!
You really helped save the day!
What a lovely thing to say Dave, thank yo so much! May I use your comment as a testimonial?
You bet! I meant it!
How’s the new version of Snapshot working for you? All good so far?
Hi
Thanks for the new update. Really nice to see that this great update is continually progressing.
One problem, that also existed in the previous version. When selecting to see all backups, I get the following error:
Warning: Invalid argument supplied for foreach() in /mounted-storage/home71a/sub009/sc41273-MYEA/noeddeskallen.dk/wp-content/plugins/snapshot-backup/includes/check-repo.php on line 60
Any idea?
Hi Ronni,
glad you like it
Let’s see if we can fix your issue. Looking at the code I bet the ftp_nlist() command didn’t work properly. I need to have a look at the output of that command. Have a look at the following file in a text editor: snapshot-backup/includes/check-repo.php
Line 60 reports the problem, but just above that there are these two lines of code:
// output $contents
// var_dump($contents);
Uncomment the second line (i.e. remove //), save/upload the file and go to the List Snapshots section again. Let me know what you see.
I get the following error:
Parse error: syntax error, unexpected T_VARIABLE in /mounted-storage/home71a/sub009/sc41273-MYEA/noeddeskallen.dk/wp-content/plugins/snapshot-backup/includes/check-repo.php on line 55
By the way – even if I have chosen to maintain the last 10 backups, is seems like only the new one is kept – the rest is deleted.
R.
Bizarre stuff, it leaves me clueless I’m afraid. On my setup (CentOS 6) it just lists the files. What server configuration are you using?
This is related to the auto delete function not working properly on your system, they read out the files in the same way. I bet the same error happens when the automation runs the auto delete function.
You can switch auto deletion off in this version by using a value greater than 100 – let me know if it works.
Just to let you all know, Version 2.1 is now available. See the release notes here: http://wpguru.co.uk/2012/03/snapshot-backup-2-1/
I was one of those that got the short straw. I used the plugin on my site, and when I updated (I use Amazon EC2 for hosting), it crashed the site, and has been down for over a week. It has Amazon stumped, and is getting increasingly expensive to try to fix.
I think it’s a fabulous idea, and I should have used a more local backup solution. My question is, can a half hour session help me get the site back up again? The crash was pretty devastating, and I’d like to get our ministry up and running for our users asap.
Thanks for your time, I really hope you’d be willing to help us out…
Jordan
Hi Jordan,
In principle yes, I’m very happy to help you and your ministry out. It depends on a number of factors as to why your site went down so investigating those will be a challenge for the future – but if you have a snapshot then I can try and bring your site back the way it was.
It’ll take me closer to an hour to do though depending on your host – if you’d like to go ahead please follow this link: http://wpguru.co.uk/support/restore-a-snapshot-for-me/
After checkout you’ll be prompted for several credentials which I’ll need, in addition I’ll also require access to your host’s control panel for phpMyAdmin. And best of all, if I can’t fix it then you’ll get a full refund
Hi
Besides the problems I previously mentioned version 2.1 runs smoothly. Got a small request though. Could you include an option to not upload to FTP? I would be very happy just to have Snapshot Backup create the tar and then stop.
I manage several websites for family and friends, and have Snapshot Backup create a tar for each one. Once in a while a run a script that goes online and retrieve all the backups at once. This words beautifully. Unfortunately I have to allow Snapshot Backup to upload to a FTP-server or else it wont create the backup.
R.
Hi Ronni,
glad to hear 2.1 is running smoothly! As for your request, it’s already implemented: just leave all FTP details blank and Snapshot will only create a local backup. You can still give it a prefix though. I’ve just tested it manually and with automation and both options work fine.
D’oh – of course. Thanks a lot.
R.
← Previous Comments
Next Comments →
{ 4 trackbacks }