How I do backups

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 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 let’s go into a bit of detail about how I manually make these backups and why I do it this way!

As the websites I make are often only updated once a month, I run backups monthly 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 securely locked 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 them 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 than 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 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 get automatic this very easily and in the past I used to do so via RSYNC or by 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 no matter how you make your backups – manually or automatically – you 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 set up 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 set up correctly will only update new files, delete any files that aren’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 set up to automatically download the folder and then the day afterwards uploads it right to my storage network. I would recommend the app massively.

Need to reference?

Ellis, M. (2020). How I do backups. [online] Snat's Narratives & Tales. Available at: https://snat.co.uk/others/tech-tips/how-i-do-backups.html [Accessed 25 May 2024].

Thanks for reading! You may be interested in this …

Join the Discussion

Learn how to manually make backups for your website and why testing those backups is crucial in this informative and witty article.

1 thought on “How I do backups”

  1. Decided to write a comment over updating the article as I have changed how I make my backups. The issue I was having with the method above is living in the United Kingdom my Internet connection sucks and it took over 20 hours to download a full backup – and surprisingly all my sites together are about 30GB.

    With this in mind, I went back to thinking about how I could use rsync on my tablet but sadly I ran out of ideas. Instead, however, I found mega.nz again and decided to see if I could backup from my server to mega.nz and then grab a copy from mega.nz.

    After some research, I found there is a program called rclone which works the same as rsync but uploads it to a cloud provider with mega.nz is one of them.

    While I am not going into how I set it up after I set it up I make a cron job to run a day after the database backups are made. This then sends both an email of the output log and uploads it to mega.nz.

    The PC that I use daily has the mega.nz sync client on it which backs it up to an external HDD which works pretty well and keeps everything updated, To make sure I have a copy in two different locations I have set up the mega.nz client on my tablet which also does the same thing and keeps it updated onto an external SD card.

    And that is how I make backups now. Could it be better? Yes, it could. The next step would likely be to keep two months’ worth of backups rather than just one in case something happens after syncing.

    Reply

Add to the discussion!

This site uses Akismet to reduce spam. Learn how your comment data is processed.