Forum Moderators: phranque
What is the best way (or some different ways) that I can back up my files? How often do you guys do this? Any horror stories to further encourage me to regularly backup my files? :)
I suggest reading Wiki's raid page...
[en.wikipedia.org...]
If I have a set of backups I can restore my system to a point in time when it was working. Or I can restore corrupted files. In RAID you'll just have multiple versions of a corrupted system/files. RAID is not a substitute for backups.
But the raid adds a little cost to the box.
Diskimaging I'd like but it kind of assumes you're running a single drive, doesn't really do all that much good for multiple hard drives from what I can see, it's easier just to create one backup file, I actually installed ghost 9 before I realized that of course it's just going to ghost a disk onto another disk, fine for a simple machine like a workstation or something.
If your backups aren't automated you are going to neglect them at some point. Maybe today, maybe tomorrow, maybe in six months. But at some point you're going to realize it's been two months since your last backup.
I keep a backup server in the basement with a couple of scsi drives and a dvd burner. All desktops and my webserver get backed up every night to it.
Also each night, the backups are zipped and copied to a second drive on the machine (filename is the date). This gives me a complete backup of all my machines for every day.
Then once a week or so I burn a dvd of a few of those days and delete them.
I also raid my hard drives on my webserver, but that's more for redundancy than backup. From what little I've read, raid has it's own problems so I do it, but don't count on it.
I also have a spare hard drive on my webserver where I backup the webserver to each evening, just to have an onsite backup. (hard drives are cheap).
It took a bit to set up this system but I no longer worry about my data backups or archives. The only thing I've got to do is burn a dvd on Friday afternoon and if I miss a day it's no big deal.
It's a cheap, effective solution as far as I'm concerned. A cheap machine in the basement with a burner and a couple of hard drives doesn't cost much these days. It certainly doesn't need to be top of the line equipment.
At current prices, you could store terabytes of backups for very little money, a tiny fraction of the cost of commercial backup solutions.
For offsite data backup you can just use removable hard drives.
Just select the files you want backed-up, set the backup schedule, point it to your thumb drive and leave it alone. Just leave a thumb drive plugged in all the time or backup to a second HD if you have one.
ED
If you're doing this, you need to make sure that the machine initiating the transfer can login to the backup machine without using a password. Not the greatest of security procedures, but I'm not too worried about it as I assume the initiating machine is secure :).
Other than the cost of the computer and the cost of a static IP address on my home connection, the setup is basically free. But more importantly it's both automated and allows me to maintain control over my data.
This is the batch file on my webserver that backs up my home directory, my mysql files, and my /etc config directory. Runs at 3 each morning.
rsync -e ssh -azv /home my.home.ip.address:/backup/webserverbackup --exclude "/path/to/logs" --delete-excluded
rsync -e ssh -azv /var/lib/mysql my.home.ip.address:/backup/webserverbackup --delete-excluded
rsync -e ssh -azv /etc my.home.ip.address:/backup/webserverbackup --delete-excluded
Then I run this at 8am on my home backup machine. It zips the file, gives it a name that includes todays date, and moves it to a second disk drive on the same machine.
tar -czf $(date +%Y%m%d)webserver-backup.tgz directory-that-contains-the-backup
mv $(date +%Y%m%d)webserver-backup.tgz /backup2
edited to add: My setup looks a lot like trillian's, except I'm using ssh instead of ftp. The transfer is gzipped and encrypted, though the encryption doesn't do much for me other than as general principles I don't run ftp. For most folks the ftp might be better - maybe you don't need to worry about login?).