-   Linux - General (
-   -   Sync-ing two filesystems (

jkaidor 06-15-2008 11:07 PM

Sync-ing two filesystems

I have two machines on which I need to sync certain
directory trees. That is, one machine is "live" and
the directory trees are being updated in the course of doing business. The other one is on "standby".

The reason for this is that I am using an old, small, slow server with an older Slackware distribution. I would like to upgrade to a bigger, newer, faster machine, and the latest distribution with 2.6 kernel.

There is a great deal of stuff to get working on the new machine, and in the meantime, the business keeps chunking along. I cannot in any manner refrain from
using the server while I get the new one up. So by the
time I get the server working, many things will have
changed, and I will have to re-transfer the business files. Yuck!

The synchronization does not have to be in real time.
It can happen in the wee hours via a chron job. There are
three directory trees involved: one is 6.5gig, another 35 gig, and the third is IIRC about 4 gig. The two machines
are connected with a gigabit ethernet.

The 35-gig tree was espcially painful to transfer, because FTP just woulnd't make it through the whole tar file. I wound up gzipping it down to 25-gig, and using
split to bust it into 25 1-gig pieces. Then ftp'ed it all and ran md5sum on all the pieces on each machine. Then compared the md5 signatures to make sure the transfers were OK, then cat'ed them all together, gunzip'ed, untar'd. I really don't want to have to do that again.

So: is there a utility that can reasonably painlessly do such synchronization? Thanks in advance,

- Jerry Kaidor

billymayday 06-15-2008 11:10 PM

You should probably be using rsync for this. Have a look at the man page

smus 06-15-2008 11:58 PM

you can use rsync as said before, additionally if its hard to do for you you can use the gui of rsync


jkaidor 06-16-2008 11:51 AM

[QUOTE=smus;3185835]you can use rsync as said before, additionally if its hard to do for you you can use the gui of rsync

*** Thanks,

Actually, am a long time command line fan :). Especially for stuff that I hope to automate.

- Jerry

jkaidor 06-16-2008 12:06 PM

[QUOTE=billymayday;3185802]You should probably be using rsync for this.

*** Sounds like the hot ticket. Might even wind up
using it for continuous backup after the system has
been upgraded.

- Jerry Kaidor

jkaidor 06-17-2008 09:42 AM

Got it up and running over ssh. Rsync is actually fairly cool, and I plan to use it more, even after the upgrade is done. Thanks!

- Jerry Kaidor

IsaacKuo 06-17-2008 10:54 AM

Rsync is my savior. I was doing a major overhaul of my systems, including a revamped file/dhcp/tftp/etc server. It took me about a month, off and on, to get everything together. Using rsync, I could keep all of the backups up to date while continuing to work during the whole time. When the time came to "switch", I just ran the rsync scripts one last time and then made the switch.

All times are GMT -5. The time now is 02:00 PM.