|
10-29-2006, 11:31 AM
I think rsync would be the way to go. It would require the account already be set up on both servers. Then a cron job set upto rsync the data from one server to another. It gets a little complicated with a cron job because you have to set up ssh keys to avoid the password prompt. Or a perl expect script, but then the password is sitting out there in plain text. Its always a good idea to have a backup ready, especially on any server with a single drive. Mirrored drives offer more protection, but even then it isn't a substitute for backups. It eliminates the risk of one hard drive dying but adds another point of failure (the raid card).
We are setting up new servers with Linux software raid just because of that fact. Software raid has the same or better performance without the extra point possible hardware failure. And yes, hardware raid fans always seem to knee jerk scorn on that statement , but none can show proof that hardware raid is better. Some have said the on board processor and ram of a hardware raid card helps the system, but how much help can it be? 100mhz helping dual core, dual cpu 2.8-3.5ghz system is a pitance. And the amount of cpu needed to direct parity is almost nothing anyway.
Anyway, this command should work in syncing data. Typing rsync --help will show all the available options and what they mean. Depending on whether or not ssh is on a non default port, one or the other will work
If ssh is on port 5205 it would look like this:
rsync -avogz -e 'ssh -p 5205' 192.168.0.1:/home/bob /home/bob
some of the options probably aren't needed (like -o [retain original ownership]) but wont hurt to leave in.
This command would be run from the server you are backing up TO. rsync order is always source, then destination. So the command is saying go to 192.168.0.1 and get everything in /home/bob, and bring it here and put in /home/bob.
The options are -a archive mode, -v print messages to screen, -o preserve ownership of files, -g preserve group, -z compress the file for the trip over. You can probably not use any of those except -a though. Not running the command as root would make those redundant because you can't do it on any files you don't already own, and -z isn't needed anyway.
That's my 2 cents, now it's time to take another server out to Indiana and bring it online.
|