Linux Backups

Mirror Mirror

Modern computers are reliable beasts, but even reliable fails from time to time. And when it fails, it fails bad. I have built many computers over the years, in that time, hard disk technology has gone forward in leaps and bounds. Speed, noise, power consumption, density, capacity, price, size, reliability. Some have gone up. Some have gone down.

One thing you can be sure of. Disks fail. When they fail, they take your data with them. Your stuff. You know all your files, your emails, letters, photos, mp3s, videos, text documents, html files, and other personal stuff.

No one can say when a disk will fail. I have had disks two weeks old, give up the ghost. Sure, they're still under warranty and you get a replacement disk. But you don't get a replacement copy of your data files. No way. You just get a replacement blank formatted disk, ready to receive your files.

As an insurance policy, go get an empty disk drive, same size or larger than your present hard drive. Get SATA2 if you can, as there is no point using older technology. You can fit the disk inside your computer case, if you have space. If not, buy an external drive enclosure.

Most Linux distros have some kind of backup software installed. I like Rsync. Its small light and you can run it with cron. If its not installed, install it now. I use debian, so:

# aptitude install rsync

To back up to your new device, do:

# rsync -vaxE --delete --ignore-errors / /Backup/

Run rsync using cron each night. Put the following in a file such as, cron-bakup.txt:

0 5 * * * rsync -vaxE --delete --ignore-errors / /Backup/

Then, do:

crontab -u root cron-bakup.txt

Your personal files are backed up.

That's it!