Backing up a Unix(-like) system


Regularly, on Linux forums and mailing lists, the topic of doing backups of a (live) Un*x system comes up. I always cringe as someone inevitably mentions to just do tar cvfz backup.tgz /bin /boot /etc …. A backup made this way will be (almost) completely useless.

As we will see, a backup made as thoughtlessly as this will almost certainly fail its purpose because good, reliable backups require forethought, effort and planning. This also emphasizes why, while I hope to give much better examples in this article, just verbatimly copying these examples is a recipe for disaster, or actually worse: the inability to recover properly from disaster. Reading the entire man page of the program you (plan to) use is vital. Not only to determine the right options, but also to determine if the program actually does what you want, in the correct way.

Disaster will strike, eventually. It won’t matter whether it comes as a hard drive (hardware) or a file system (software) failure. It won’t matter when it comes, your system will fail. If, at that time, you still have to discover if your backup even works, everything you do between now and then will result in nothing more than temporary files.

Whenever a website goes down and comes back up with the message we’er back up but not everything is working yet or we’re back up but some data is lost because of a HD failure, it’s usually safe to assume that the website is hosted on a server without a proper backup routine. With the proper backups in place, data loss, especially because of hard disc failures, becomes an extremely rare occurance. Every system administrator should know his share about doing proper backups, so if you’re serious about your data, read on…

Note that this article is not an application howto and it does not give an exhaustive list of backup programs and examples. It is meant to create awareness about the details and pitfalls of making a backup.

Also note that the meat of this article describes the process of backing up to an external device or location. If data protection is important to you, I highly recommend using RAID too. While RAID offers no protection against fires, earthquakes, data corruption or humans, it does offer protection against failing discs. It has saved me more than once.

Although my personal experience is limited to Linux, the issues I’ll discuss should (could) work as well on all or most Un*x systems.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s