
At the inaugral UK Wordcamp in Birmingham last month the subject of automated backups was raised. It came up again last night at the UK North WordPress or ‘whatever the hell we want to call it’ meetup in Leeds and so I thought I should do something about it. A Google search brought up two plugins so I decided to try them both.
The first turned out to be the backup plugin that comes with the WordPress install, WordPress Database Backup, and I found, to my suprise, that scrolling down a little bit reveals a scheduled backup option. Just what I wanted.
I’ve used this on and off (less regularly than I should) and it has always worked well, but for some reason when I tried it this morning the file that was e-mailed to me was blank.
I’m sure there is a reason for it, perhaps it is just one of those things, but if it happened once it may happen again so I opted to move on to the next option.
The second plugin is Lester Chan’s DB Manager. This plugin does more than just backups, including repairing and optimizing the database, but unfortunately the backup would not work on my setup.
WP-DB-Backup uses PHP to generate the file whereas DB Manager uses PHP functions that let it control the mysql application directly by using the passthru and system commands. In my case the necessary functions to do this have been disabled by my host for security reasons. It seems logical, although I am guessing, that most hosting companies would restrict these for shared hosting.
Although it means this plugin doesn’t work for backups (the other features still work well) in some ways I am glad that this is the case. I have almost no knowledge of the server side of things so installing a plugin that used system access, even from someone as well known as Lester Chan, gives me a few niggles at the back of my mind.
With the two obvious plugins out of contention I was left to look at other methods and I found that I already had the means to automatically backup both the files and databases.
To backup the files I turned to Cute FTP PRO my FTP client of choice. This lets me schedule a complete download of my site and to set overwrite rules so that only changed files get overwritten. This doesn’t sync the server and my local copy, files remove from the server will not be removed from the local copy, but deleting or renaming the backup every so often should resolve that easily enough. These are functions and options I had never looked into before so I am quite happy to have found them.
For the scheduled database backups I turned to MySql Administrator. This is one of the desktop tools that are produced in conjunction with MySql, part of the MySQL GUI Tools Bundle, and the tool I have used for some time in preference to PHPMyAdmin which I have always found a little painful to use.
MySql Administrator depends on your database having an external IP (some hosts will only provide an internal IP address so that it is not possible to access the database directly from a website on their own servers) but it is really easy to use and is very configurable.
I have a few sites that will require regular backup, not all WordPress based, so in some ways it is better for me to have a consistent process for them all. It also saves me installing plugins and keeping them up to date across multiple WordPress sites.
If you have a different backup setup, have found other WordPress plugins that are good then please leave a comment. I would be particularly interested in any plugins that verify changed files to do incremental backups of the actual files as well as the database.
(__)
`
Hi Andrew,
Sorry that you had problems with my plugin, WP-DB-Backup. If you have a chance to investigate it a bit, I’d appreciate any suggestions you might have about what could have caused the problem.
The truncation of the backup file Cubesteak mentions is usually a result of someone’s using the wrong client to unzip the file–typically the backed-up file is just fine. But I am eager to stamp out all existing bugs that I can, so if someone can reproduce a problem, I would love to know. My email is if.website at gmail.com, and I have a support forum dedicated to the plugin: http://www.ilfilosofo.com/forum/forum/2
(__)
`
Cubesteak,
Thanks for pointing to SyncBackSE, I will give that a try. I was aware of that problem but thought that it wouldn’t be too much of a problem. Now you have given me an alternative I will see if it solves that issue.
(__)
`
Hi Andrew!
Thanks for pointing me to the article. I’ve found similar problems with both of the backup plugins. I used the WP DB Backup for quite some time until I noticed that a lot of the backups were actually truncated. Fortunately I didn’t need them! That gave me a major case of the heebie-jeebies and I’ve stopped using it as a result.
Mr. Chan’s won’t work on my web host and I had similar misgivings to yours about it in general anyway.
I’ll try the MySQLAdministrator – I’m embarrassed to say that I’ve actually never heard of it, and am anxious to take a look! Thanks very much for that!
One suggestion that I will make is that the CuteFTP option has one minor issue that you may want to consider. It doesn’t take into account file corruption. With that method, the FTP client will overwrite your “good” backup copy with a corrupted file from the server. I know, it sounds a bit “out there”, but I’ve actually had it happen a few times before I changed my schedule.
I would highly recommend using cheap and awesome SyncBackSE. (http://www.2brightsparks.com/syncback/sbse.html) There is a free version as well, but I think the small price is worth the extra options for the full version. This allows you to do rolling incremental backups as well as full rolling backups. Keeping 3 backup revs seems to be a “cover 99% of my bases” option for my usage. I’m fortunate enough to never have had to do a wholesale restore, but I have had to grab a few random files every now and again, and the rolling option keeps you from overwriting good files with bad ones. Anyway, just a thought!
Thanks again for the info!
Cheers,
A
(__)
`
Well I know a lot of people use it so I presume there is something in my setup that caused it problems.
I was doing the manual thing as well, or rather not doing it, so yeah, automated is a big improvement.
If you come up with any alternative automated methods let me know.
(__)
`
I’ve been looking into backups a lot more recently as my site has been growing – I sure wouldn’t want to lose any of it!
I’m using Wordpress Database Backup plugin and have that emailing to my gmail account everyday. – I’ll check some of the backups just in case it’s blank like you said.
In terms of file backups, it’s pretty much fairly manual right now – whenever I think to do it Filezilla. I used to CuteFTP once upon a time, I may look it up again as having it automated would be be a much better approach!
Cheers!