Many users of hosted web servers will, like me, be responsible for making their own regular backups of the their web applications, uploads, and databases. Backup isn’t really a major issue with a few static web sites, but as a webmaster’s web sites grow in complexity and interactivity the issue of data loss comes to the fore and could be catastrophic. As a webmaster I’ve had to face this problem and have some solutions which work for me and may work for you.
Simple Dynamic Web Sites
On a simple dynamic web site, the files, uploads and database(s) are all likely to be accessible on the web server. This is the case with my host (Fasthosts) where my files and uploads are in the web accessible space, while the databases are stored in a private folder which can’t be directly parsed by web browsers.
Initially I began making simple backups manually using an FTP client, Cute FTP. This worked pretty well, but was fairly laborious. My version of CuteFTP is now fairly old, but I seem to remember upgrading to this version due to its ability to carry out scheduled transfers. However, every time I looked at the option to schedule a transfer it looked a bit complicated and I didn’t follow through. Manually backing up became an increasingly time consuming chore.
Meantime, a couple of years back I had bought a utility, Goodsync, to synchronise files between my PC and a USB memory stick and to back up my PC to a NAS (Network Attached Storage) device. Goodsync worked fine with the USB stick, but seemed to be a bit ‘flakey’ when working with the NAS device. I had noticed that Goodsync could work with FTP servers, but as it was unreliable with the NAS I didn’t explore further.
However, unlike CuteFTP, Goodsync makes its software updates available to registered users. With successive upgrades, Goodsync has become better and better and I decided to give it a whirl for FTP backup of my web sites.
I found it very easy to setup a backup, which runs in the background while I’m getting on with something more interesting. In its current version, it’s very tolerant of any interruptions or timeouts in the connection to the web server and reconnects automatically, unlike CuteFTP, which sits and awaits manual intervention. With its ability to schedule backups, Goodsync has become my software of choice for backup of my simpler dynamic web sites.
For back up of the files, uploads and databases on a simple dynamic web site I’m happy to recommend Goodsync Pro ($29.95 for Windows and Mac (beta)).
Complex Web Sites with mySQL Database
With large dynamic web sites with mySQL databases at the back end, a new problem arose – the database was on a server not accessible by FTP! The files and uploads can all be backed up by Goodsync as described above, but a new solution was needed to back up the mySQL databases on my WordPress and dotProject sites.
My web host doesn’t provide any utilities for working with mySQL databases, although giving some guidance on installation of phpMyAdmin – so it was up to me to look around and find what best suited me.
WordPress was the easier problem to solve. It is well supplied with plugins, including plugins to back up the mySQL database. I first had a look at Adminer (open source) which is a full mySQL administration utility (also available as a standalone web application). Adminer looks pretty powerful, and much more than I needed for simply backing up. Frankly, I didn’t understand much of Adminer’s offer, so I sought something simpler.
After searching through available plugins, I found and installed WordPress Database Backup (open source) It’s ideal for me, and others wanting a simple backup of their WordPress database. Best of all, it can scheduled as a chron job with options to email the backup or save it to the web server. Given the current level of change in my Blog, I’ve set it up to email me a weekly backup of the database – works a dream.
dotProject doesn’t have any convenient plugin for a simple backup, so I took a deep breath and installed phpMyAdmin (open source). Installation really isn’t for the fainthearted – however, by carefully following the quick installation instructions in the wiki it was achievable with the only significant problem I had being setting the permissions on setting up a temporary config folder.
There are two options for configuring phpMyAdmin – manually creating a config file or using a set up utility to create a config file, which then has to be relocated to the phpMyAdmin root folder. I chose the latter option and found a host of options for configuration, many of which I could barely understand. CuteFTP came into its own during the installation with its ability to issue commands by FTP to create folders, change file and folder permissions, and move the config file to its final home.
Opening phpMyAdmin and connecting to my databases was no problem. Having connected, I found myself faced with many options to manage the databases – much of which is way beyond my knowledge of mySQL databases.
The facility to backup the database was available under the ‘Export’ menu. Having explored this option a little, I found it relatively straightforward to export compressed copies of the databases to folders on the web server, where they can be backed up locally using Goodsync, which is described above.
This is a workable solution, but can only be done by manual intervention. I’ve looked around to see if the back up can be automated as a chron job in the same way as with WordPress Database Backup, but I’ve yet to find anything suitable.
- If you’re using WordPress, I highly recommend WordPress Database Backup for automated backup of your mySQL database.
- If you’re using something other than WordPress and can’t find a plugin, then phpMyAdmin can be solution to backing up your database, but it’s not an easy one.
I continue my search for a more automated backup solution to mySQL databases other than under WordPress. When/if I find something suitable, I’ll post it here. If you, the reader, have any suggestions, please post them in a comment on this post.