“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.

10 Responses to “Backing Up: Better Safe than Sorry”

Still I don’t get people that are wasting money on something you could set up yourself, I mean set a vm or a old comp for that duty and set it all up manually, make some shell scripts that’ll handle all this on a sheduled bases.
But then again I do not know if you have knowledge about this so your option might be better in your case.

Also when it comes to backups here’s how I do it for all my servers;
Make a mother image of the system on the original setup; how you set it up the first time.
Now as long as you do not patch/update or install something on the application level, backing up the same thing every week is not efficient!

Instead you need to backup the data that changes on the site, and that in most cases means databases or in some cases files that are not stored in databases.
Then whenever you change something on the applicationlevel you renew the mother iso.

I have had this setup for quite some time and works extremely well, with 2 DVD-RW dual layer always in my backup station I haven’t had to worry about this, it’s all automated, I just sometimes have to issue a renew of the mother image, but that is just one command away.

Well that is a very in-depth article! For most people, I imagine such a backup system would be extreme over-kill. Seeing as most are on shared hosting plans, installing additional software or hardware onto their servers would not be possible. Additionally, many hosts now automatically backup nightly or weekly.

However for those that don’t, most will still find it pretty simple to download backups manually each week. Your system is certainly commendable Tyler, but a little excessive for most people.

Your article does however, stress the importance of backups and for that I think it is still a worthwhile post.

“For the purposes of this post I’m going to only talk about one particular backup system, DiscSync.”

Hehe..

Because look how long my post was just talking about DiscSync!

As for not using RAID, I don’t know much about server administration, but I heard it is more expensive than DiscSync, so it may be a possibility in the future, but at $80 a month currently, that’s enough money for me to put into backup security at the moment.

Nice article and I agree that DiskSync does a very nice job of automated backup with compression. I am at thePlanet as well and also use DiskSync.

I use RAID mirroring on the server for automatic failover in case of drive issues and purchased DiskSync in case my whole server fell off the self or was accidentally repurposed by some newbie staff member.

I decided to test my backups by recovering a few files to my home machine. Alas! After having read through the docs and attempting to get answers from support it is looking like I can only restore to the source machine. This seems to defeat my whole purpose for paying for nightly off site backups.

So if my server is lost to fire I have to wait for thePlanet to provision me a new server so I can install the DiskSync agent on it and do my restore. How long will that be?

After two days of down time my clients are going to be demanding copies of the databases and I am going to have to say “Sorry your business has to stop while we wait for my hosting company to recover from the loss of a $100 million dollar data center and gives me a new server. LOL I am sure they will be impressed and then I’ll be retraining for my new career as a carpenter.

If I could recover files to my home server things would be different. If the data center with my server burns down, I simply log into my vault from home and download my files. Perfect!

So, while I agree that DiskSync is a great little system for producing, I have some serious concerns about being able to get at my files in case of a disaster.

If you can shed any light on restores to another machine, I’d very much appreciated it.

“So if my server is lost to fire I have to wait for thePlanet to provision me a new server so I can install the DiskSync agent on it and do my restore. How long will that be?”

I can’t imagine it would take very long at all. First off, having a fire at ThePlanet would be extremely rare.. you’re probably more likely to get struck by lightning. Remember that they have a lot of on-duty staff 24/7 and fire extuigishers everywhere.

They have backup generators and all that jazz, so you’re more likely to lose data to hardware failure or being hacked. Which means that ThePlanet will be able to help you set up a new server, which I can’t imagine taking more than several hours, especially if it’s an emergency or when it’s their fault (hardware failure).

Anyhow, are you sure you can only restore to the ‘source’ machine in ThePlanet? If your ‘source’ ends up burnt to a crisp, how does it differ from putting on a new machine there as opposed to a server at your house? Ask their tech support.. I think you might be able to do restore at home.. you just need to resync up with The Vault I’d imagine..

[…] password-protected DVDs as well. For a very detailed description of DiskSync, check out my post Backing Up: Better Safe than Sorry from when I originally set it up at (It’s a really good technical […]