A reader was checking out my post on weekly server security and maintenance and posted an excellent question – what about backups? And do I backup each WordPress site individually, or just backup the entire VPS?
That’s exactly what I am going to discuss in this post.
I use two backup solutions and backup each of my WordPress sites individually AND also my entire VPS. Let’s look and why I do that and how.
Individual WordPress Site Backup
I use the excellent UpdraftPlus plugin for WordPress and have a premium licence. The base plugin lets you setup a schedule to make backups of your site (backing up both the files themselves and also the database), but you can only store those backups on your server itself. There is no redundancy and if your server goes down, so do your backups. You would need to manually login and download your backups each time they are made, and also delete them periodically to make space for new backups.
With the premium licence though, I can connect the plugin to my Amazon S3 account and automatically send the backups there. This means there is literally nothing for me to do and/or worry about! I set my backups to a particular schedule (I personally like to backup the database multiple times per day and backup the files anywhere from once daily to weekly) and then the plugin takes care of the rest – including securely and automatically sending it to my Amazon S3 account where it can be stored cheaply.
From Amazon S3, if I ever need to retrieve a backup, I can download it from there to my PC, and then restore it from within the plugin, or the plugin itself can download the backup files to my server directly and take care of the entire restore process for me.
It’s incredibly easy, and honestly, having previously done manual backups for several years, and also attempting multiple restores and site moves, this plugin just makes it so easy and hassle free. It runs itself and you don’t have to worry about it.
The guides that Updraft has on setting all this up are much better than anything I could produce, so if you do end up using it, follow their instructions. They are exactly what I follow too.
As I mentioned at the start of this post, I make backups of my VPS as well, so why do I need to backup all my WordPress sites too?
Firstly, sometimes I might be hosting multiple different sites on one VPS. If I simply want to restore a backup from one site, it makes no sense to also overwrite/restore all the other sites too.
Secondly, I can run and store more copies of my individual site backups more frequently and more cheaply that I can VPS backups (better retention, freshness and cost!). VPS backups are traditionally more expensive to store, and as a result you will take less of them. This means that the data within them is older… and if you make frequent posts and updates to your site, or even if you have user forums or something, the most recent content could be lost. With my backup schedule I know that I will never lose any/much content if I need to restore a backup.
Thirdly, sometimes I might be testing or developing something on my site, and break it. I might also know how/where I broke it and want to restore that specific thing – be it an older version of a template file, or a database table. Again, it would be silly to restore an entire server to undo the mistake. Instead I just download my individual backup and restore only that file/table that I need.
By now you’re probably thinking, so why do I need a VPS backup then? Good question! First though, how do I backup my VPS?
Backing up your VPS will differ from one hosting provider to another, but in general they will let you set a schedule of how often you wish your VPS to be backed up and how many copies you wish to keep. If you are also backing up your sites as above, then a weekly schedule should be fine, and you might want to keep say one months’ worth.
Once you’ve entered your preferences, then your host will take care of the rest. On the schedule that you’ve set, they will automatically create an exact image copy of your entire VPS. Everything on your VPS at that point in time will be saved and can be restored at the click of a button, should the need arise.
You might need to restore your entire server, if, for example, you make some kind of server level configuration change that completely messes things up, and you don’t know how to reverse it, or if your server gets compromised, or if you go to upgrade the specifications of your server (more RAM, CPU, storage etc) and something goes wrong. We’re talking about major stuff like that.
It basically means that in the event of a major disaster, that you can at least get back online very quickly (within minutes), without having to start from scratch and set another VPS up from the beginning. Your sites can get back online fast and you can keep serving your visitors.
It also means that any additional tweaks and changes that you have made on a server level are saved within each backup, as well as any particular settings that some special sites might need. You can rest assured that those are being backed up and can be restored as and when you need them.
For me, backups are all about covering my bases and sleeping well at night. I want to know that should something happen, my sites can be back up in no time at all and I will be serving my visitors: (1) in the shortest amount of time (ie minutes) and; (2) with the least amount of content lost – preferably none. The setup I have outlined above enables me to do that.
The post Backing Up Both Your Sites and Servers (Updraft & Disk Images) appeared first on CodeCoffee.