“Sigh. We know Tyler… we know. Backing up your server is very important and anyone that isn’t backing up already is taking a big chance, we know.”
… but how many of you actually do back up your server(s)? And by backing up, I do not mean making the occasional MySQL dump.
I’ll start this post by opening myself up to wagging fingers and be the first to admit that, believe it or not, I didn’t have a back-up system in place until yesterday. Sure, I made MySQL dumps and copied all of my sites over to my computer about once a month, burning them to DVD, but can you really call that a backup? For one thing, doing that takes a lot of time to do, but more importantly, that means that the last back up of my data could be up to a month old! Imagine how much impact that would have on a forum, where all the posts and data had to be reverted to a month’s prior. That would not settle well in the community, I can guarantee you.
A proper back-up system means you have a copy of all of your important data backed daily. I was meaning to get a proper back-up system set up for about a year, but I’ve been so busy and preoccupied with other things and it kept getting put on the back burner. Finally, as of yesterday, I now have a kick-ass backup system running full-throttle.
For the purposes of this post I’m going to only talk about one particular backup system, DiscSync. This is the system I’m using, and it’s fairly new. Previously, tape backups or NAS (Network attached storage) were the main options. Also, I warn anyone reading that I’m not a techie by any means and my knowledge with server administration is very limited at best.
That being said, let’s continue!
I purchased two DiscSync upgrades from ThePlanet, which cost me $40 each at the 20GB level. The price is a bit high, costing me $80 a month extra to have a backup system in plan, but at least I know I have up-to-date backup of all my important data.
Again, I’m not a techie, and am easily lost when reading technical jargon. That’s partly why I procrastinated for so long before finally tackling this project. There are multiple manuals, and the DiscSync Agent Console PDF was 113-pages! I had my hired 3rd-party server company install the DiscSync agent on each of my servers, then I read a smaller, more concise manual that was only several pages long.
Once the Agents were installed on my servers, it was actually relatively easy to use and understand the system, and a few hours later I had set up and scheduled all of my backups. It would have only taken half an hour or so, but you’ll see why the delay in a bit.
The image below is taken from the PDF and attempts to show a basic outline of how the system works. Personally that only confused me more. I actually spent 35-minutes making a funny simplistic version in Photoshop, but I accidentally saved over it, so you won’t get to see it now
I should also note here that before setting up DiscSync, I had my server administrator people set up a CRON job to back up all of my MySQL databases daily. I used to do this by hand once a month, and it was always a major pain. In fact, if you end up reading through all of this and still decide not to back up your servers, the least you can do is set up a simple CRON job. Set it to make dumps of all of your databases daily, and if you’re really smart, have it send those databases to a different server (if you have one) to be even safer.
Anyhow, when setting up the Agent Console, which is a software program you download and install on your home PC to control your backups, it gave me a choice of what I’d like to back up. This was a good question, and so I had to ask a few server administrators before deciding what all to back up. I had strongly considered backing up the entire server ver batim, but that cuts a bit too close to my monthly allotment of backup, and the tech support at ThePlanet said it was a bit “overkill” and they hadn’t heard of anyone doing that; that most people only back up the important data.
I decided to go with: MySQL dumps, /home/*, /etc/*, and /usr/local/*
Once you set up what you want backed up, you then schedule how often you want it to be backed up. I currently have it backed up daily at 12:00 AM, and have a “weekly” retention period, which means that I’ll have 7 copies and 7 days worth of backups the oldest copy is deleted to make room for another. That gives me a week’s choice of backups to use if I ever need to restore something.
The first time you set up your backups you need to make a seed backup. The following except from ThePlanet’s forums explains it well:
“Upon the first execution of a Task, DiskSync collects a “Seed Backup”. This Seed is a full, compressed copy of all files and folders included in the Task.
This is the only “Full Backup” that will be made of your Task Source data. This is accomplished by a technology reffered to as “Delta Block Incrementals”. Each subsequent backup of your data will collect only the blocks of each file that
have changed, whcih significantly reduces the amount of disk storage required to contain your backup data. Once you have met the criteria defined in your “Retention Period”, the Delta Block Incrementals are “rolled up” into your Seed Backup.
The benefits of this technology become more apparent when you consider the network traffic and time required by traditional backup technologies, which typically send a full copy of all your files every day or every week.
All DiskSync backups occur over your public interface. This means that all traffic with the Vault is counted against your monthly bandwidth allocation. Again, you can see the added benefit of the Delta Block Incremental technology, as this drastically reduces the amount of network traffic required to protect your data with backups.
If you have a clean disksync account, and 13gb of data that changes by 1gb daily, you will have one safeset that is 13gb, and 6 safesets that are 1gb. On a typical one-week (7 days AND 7 copies) retention, on the 8th day, when the 8th copy is taken, the oldest data is “rolled up” into the seed, the oldest copy is destroyed, and the process repeats.”
The Delta Block Incrementals technology is awesome and you’ll see just how awesome shortly.
So anyhow, I continued and the screenshot below shows the initial seed being backed up. Remember, the seed only needs to be done once. Once it’s done, you don’t have to touch anything unless you want to reconfigure something or restore your backup.
A couple hours later the seed finished. The screenshot below shows you the Agent Console displaying one of the safeset properties. A safeset is basically one of your backups, but since it uses Delta Block Incremental technology (God, I love saying that…) it’s size is only the amount of data that has changed since the last backup.
You’ll notice, too, that DiscSync compresses the data. And my, my! What a job it does at that! 5.1GB down to a couple Megs! Safeset 0000002 that you see is the next backup, only taking the data that was changed since the previous day, helping to lower size as well. Since I just recently set up DiscSync, you only see 2 safesets here, but eventually there will always be 7 safesets, from the 7 previous days. If you want, you can set up the retentions so you keep the past 7 days, 1 per week, and 1 per month if you want, but the 7 previous days is fine for me.
Another thing that’s great about DiscSync at the Planet is that your backups are actually backed up on an offsite datacentre! So, in the unlikely scenario that a fire breaks out or a terrorist blows up the datacentre, you still have your backups in a different location!
Finally, I decided to check out if this whole backup system even worked. I SSH’ed into one of my servers, found an old, abandoned account I gave my friend years ago, and saw an unimportant file. Perfect.
I deleted the file, then opened the Agent Console, selected the individual file from the most recent safeset, and hit restore. A few seconds later, it was done. I went back into my server and checked to see if it really was restored, and voila, there it was.
Awesome! I mean, that’s how it’s supposed to work, but… that’s still awesome. So, now I have daily backups of both my servers with all my important data. Somebody hacked into one of my forums and deleted everything? No problem, give me a couple minutes and it will be completely restored.
That, is the power of backups.
BACK UP NOW!!
Update: One of the marketing managers of ThePlanet saw this post and asked if I could link to their page for more information and I thought that was kinda cute so here it is: http://www.theplanet.com/hosting_accessories/backup/
(If you found this post particularly useful or interesting, please take 5 seconds to Digg it below)