It also depends on what the servers do. If it is a MySQL database, then either an LVM snapshot or a dump will backup the database.
Some filesystems like xfs have dump utilities.
Another thing to consider is whether your backup program will also archive all of the permissions, attributes, extended attributes and security attributes. If you sync files to another computer, make sure that the filesystem on the destination will preserve these attributes.
Suppose that you have a lightning strike and the UPS doesn't protect you. This could happen through any connection to the computer, not just power. What happens if this blows out (literally) your drives and the mirror. Backing up, or making a copy of an online archive and keeping it in a safe place (like a fireproof container; or pun intended a safe) would be a good idea. Perhaps this would contain just the data that is valuable for your business, while an online backups contain everything on the servers.
Here is a usage of tar, that I played with to simultaneously archive a directory and sync it to another computer at the same time.
tar -C /basedirectory -g backup.snar -cf - /dir1 /dir2 /dir3 | tee /mnt/backupusb/"$DATE".tar | ssh user@remote tar -C /directory -xpvf - >/path/to/backup-"$DATE".log
I use public key authentication, and use ssh-agent to unlock my private key, so I didn't have a passphrase prompt interfere. The -g option produces a timestamp file so the next time you run it, only changed files are archived & synced.
There are many more options to check with tar, such as listing directories to skip.
---
One last suggestion. A backup program I like is kdar. It is a front end to dar (note: the kdar may not be supported anymore). Dar stands for disk archive and is designed for producing cd or dvd sized slices, rather than tar (Tape ARchive) which is designed to use a tape device. Anyway, using the GUI kdar program to configure a main backup job and an incremental job, you can export the job as a bash script using the dar command. This could then be used for a cron job. After that you don't need kdar anymore.
If you find similar GUI backup program, see if it can export a script that will perform the archive. This makes it a lot easier getting the numerous options, and directories to omit (like /proc, /dev/, /tmp) correct in a script.
Last edited by jschiwal; 01-17-2009 at 09:04 AM.
|