Poor Man’s Disaster Recovery

Backups are probably the most tedious, time consuming jobs for a system admin and often regarded as a low priority until something goes wrong.

Hell breaks loose and you stumble around for tapes, building catalogs, restoring data, finding unusable tapes or corrupt data and looking for excuses or stories to tell management.

Last month I discussed personal backups and disaster recovery here.

I have added to my arsenal of tools an application called SyncBack which I run at the least every couple of days on all my data including the “My Documents” and “My Documents and Settings” folders making sure I have my data and settings backed up to an external USB drive.

I also use Mozy to have a historical backup of critical files, which has come very handy. Mozy provides 2 Gb for free of backup and have paid plans for additional storage. A client is installed on the computer and pretty much takes care of everything once its configured. Other players in this area include Carbonite, HP Upline, IDrive, SOS Online Backup, and Symantec Online Backup.

Disaster recovery is not about backups and what the quickest way to restore those files are, but rather to plan for the worst and how will you continue to operate if the unforseeable happens.

In a small business for example, its rare to have more than a server which serves as a print server, a file server, an e-mail server, a blackberry server, an application server, etc, etc. Even if there is another server or two they are all running several applications, so redundancy is not something that’s viable nor affordable for a small business.

OK. So backups are getting done. Whether they are being backed up online, to tape locally or to disk. You want a quick restore, then go for disk over tape.

Everything is Kosher….. not so fast.!

What would happen if the server had a major failure? Not something quickly addressed by ordering a replacement part. Could you put your clients on hold for a couple of weeks until a new server arrives?

What if there was a fire? What if someone broke in and stole the server?

That small business would most probably cease to exist if its operations depended heavily on the use of technology.

The same principles used in bigger businesses when it comes to disaster recovery, appear to be more critical to smaller businesses. Having a disaster recovery site where the server could be mirrored in the event of a loss.

What a better place than the small business owner’s home.?

So the challenge is to mirror a server located at the office with a server located at home. Sounds like something definitely out of reach for a small business, since it involves possibly duplicating licensing costs, software costs for mirroring and then there’s the issue of dealing to the caps for uploads on almost any broadband provider, which generally puts the bandwidth available at 512k or less.

rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. This program is ideal since it reduces the data transferred to a minimum over a limited link.

DeltaCopy is an open-source backup program port of rsync to Windows. It has several features which make it ideal for the task at hand including installs as a service, incremental backups, task scheduler, and e-mail notification.

DeltaCopy is installed on both the main server and the backup server. The backup server is configured with DeltaCopy running as a service and if encryption is required, a tunnel over ssh can be accomplished by installing an ssh-server using Cygwin for emulation.

The backup server will require DynDNS to make sure that the main server can reach the backup server by name. A couple of ports (873 (rsync) and 22 (ssh)) will also need to be forwarded on the DSL/Cable router on at the backup server side.

Then schedule and sleep well knowing you have a “Disaster Recovery” plan.


How to install a ssh server
Set up a personal, home SSH server


A laptop and disaster recovery

Over the last couple of years I have had several severe laptop failures, which have at least put me back a couple of weeks not to mention the hassle of re-installing the operating system and all the applications, which for me is in the 70s.

This time I took some action and looked into backing up all my data on a daily basis from my data partition and creating an image of my c partition on every major changes. (once a week or once every other week.)

Being able to boot my laptop with a CD or USB flash drive and plugin by FreeAgent Seagate to easily create an image was the goal. The gold standard in cloning drives is Symantec Ghost, which would not see my NTFS FreeAgent Seagate external usb drive no matter how much I tried. Several other commercial products including Acronis True Image, ImageCenter and Partition Saving and none of the above were up to the task.

Enter open source. SystemRescueCD is Linux system on a bootable CD-ROM for repairing your system and recovering your data after a crash.

Going a little bit further I was able to put SystemRescueCD which comes with a great number of drivers that will recognize literally anything on a flash drive.

After booting from the usb flash drive with SystemRescueCD, I started an Xwindows session by typing startx at the prompt.

Then the time came to mounting my external usb drive and imaging the C partition.

  • lsusb (to list all USB devices)
  • dmesg | grep -i “SCSI” (which would give you a list of devices attached to the laptop, in my case the Freeagent Seagate usb external drive – in my case sdb1)
  • mkdir /seagate (create a mount point for the usb external drive)
  • mount -t ntfs-3g /dev/sdb1 /seagate (mount the ntfs external usb drive with read/write permissions)
  • partimage (this launches the cloning application which allow you to create an image of the C partition)
  • umount -f /seagate (unmounting the external drive or any other drive for that matter in a linux/unix environment is extremelly important before unplugging)

Now to schedule my data backups on a daily basis with SyncBack.