If there is one thing I will stress repeatedly to everyone is that it is very important to not only make backups but to also test those backups and today I thought I would go over how I do my backups for a couple of websites.
The first thing I will state is for personal websites I myself prefer to do these manually rather than automatically but each step is easy to automate and for the database side of things I do run a plugin that does that part. Without further delay lets go into a bit of detail how I manually make these backups and why I do it this way!
As the websites I make are often only updated maybe once a month I run backups monthly and this happens on the third day of every month. I use a plug for WordPress which exports the database and pops it into a subfolder within the WordPress installation, exports the pages and posts as an XML and then sends an email with both of them as an attachment. Once this email is sent, I keep it locked away securely in the email account that only I can access.
The next step after the databases and XML files are backed up is to ensure I have the latest version of the website. In this case, I prefer to manually back up the files and leave it downloading overnight and to do this I use a tablet. In the past, I used my Linx 1010b which was solely used for HoneyGain and running my backups. Sadly this tablet died and while I imagine it could be fixed I am now using an Android tablet that I wrote a review about a while ago: Alba 7.
As you can see from the screenshot above this works simply via running an FTP client. For Android I decided to settle on using Total Commander with an FTP plugin as the others I tried (AnFTP and another one) would not let me copy the files to an SD card without it coming up with a permission error and I was far too lazy to fix that.
Total Explorer is set up so that it replaces any files older that then one stored on the SD card. This means anything that has been updated or changed will be backed up and anything that hasn’t will be downloaded. This ultimately saves a lot of downloading time.
Once these files are backed up to the SD card overnight (in a folder called Website Backups -> Domains ) I will then a few days later transfer those files over to my personal storage network where I archive them listed as months which I keep for a year which allows me to restore an older backup if needed.
As I have written earlier you can automatic this very easily and in the past I used to do so via RSYNC or setting a cron job to SCP them to another server which then was connected over a VPN to my home network which then transferred it to my storage network – I just prefer doing it by hand nowadays as I like making sure it is done and I don’t want a public server to be connected to my home network for obvious security reasons.
So with the latest backup on my tablet’s SD card and archived on my storage network we are done, right? Incorrect as the next important thing is to make sure these backups are fine. For a WordPress site, there isn’t that much you need to worry about as long you have the database or an XML file you can always restore your content unless you have a bunch of plugins where you would need to ensure your database works as they typically don’t get included in the XML export.
To do this part I have a pretty simple logic, I just restore the site now and then to make sure things are still fine. As I mostly run vanilla installations of WordPress I just use a virtual machine which has XMAPP installed with my websites being hardcoded in the local DNS cache so when I access snat.co.uk etc it just loads it from the localhost. All I do is just restore the site on the virtual machine and poof my testing is done which I do now and then to make sure it works fine.
Overall in conclusion if there is one thing you learn from this article is no matter how you make your backups – manually or automatically – you really need to test those backups or you risk the chance that you just wasted your time.
… and if you haven’t taken anything away from this article I sense you either don’t owe any websites (even those hosted on free providers such as WordPress.com) and thus this article is moot to you or you do have a website and haven’t made any backups I suggest you do that right now.
… but wait!
Over the last few days I have been working on changing my backup system and was planning to setup a Raspberry Pi and setup rsync so I did not have to keep doing it via SFTP where I found a wonderful Android app which works perfectly for what I need it to do.
The app is called FolderSync (you do need to pay for the FTP feature) but it works very similar to rsync and when setup correctly will only update new files, delete any files that isn’t on the server anymore and overall does a very good job at making backups.
I am using this now over the old FTP method and it is now setup to automatically download the folder and then the day afterwards upload it right to my storage network. I would recommend the app massively.
Need to quote me?
Ellis, M (2020) How I do backups. [online] Tweaked for your Pleasure. Available at: https://snat.co.uk/others/tech-tips/how-i-do-backups.html [Accessed 17 May 2022]