File Sync between two separate servers
Hi All, We have a situation where we have a primary file server, and a back up one, what I would like to do is sync up changes from the primary file server (directory /somestuff for example) with the backup server's /somestuff directory. Ala, any files that have been changed on the primary get copied to the backup machine say once a day? I know mirroring HD's in the same system would be a better way to go, but has someone done something like this before? -Bill
Hi In a LAN-setup, where I have Linux-server with M$ workstations, I have the following entry in /etc/cron.daily: #!/bin/bash #First, mount all the drives with smbmount /root/bin/mounttaa.sh #Now start to copy everything that is new to local HD cp -Rup /mnt/anneli/* /var/backup/anneli cp -Rup /mnt/kaisa/* /var/backup/kaisa cp -Rup /mnt/marge/* /var/backup/marge cp -Rup /mnt/nimeton/* /var/backup/nimeton cp -Rup /mnt/tero/* /var/backup/tero #done, umount everything /root/bin/umounttaa.sh This is very basic and easy to setup For more advanced setup, You could use "tripwire", that comes also with latest SuSE distros. Jaska. On Monday 04 November 2002 18:54, Bill Parker wrote:
Hi All,
We have a situation where we have a primary file server, and a back up one, what I would like to do is sync up changes from the primary file server (directory /somestuff for example) with the backup server's /somestuff directory. Ala, any files that have been changed on the primary get copied to the backup machine say once a day?
I know mirroring HD's in the same system would be a better way to go, but has someone done something like this before?
-Bill
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le Lundi 4 Novembre 2002 18:03, jaakko tamminen a écrit :
In a LAN-setup, where I have Linux-server with M$ workstations, I have the following entry in /etc/cron.daily:
#!/bin/bash #First, mount all the drives with smbmount /root/bin/mounttaa.sh #Now start to copy everything that is new to local HD cp -Rup /mnt/anneli/* /var/backup/anneli cp -Rup /mnt/kaisa/* /var/backup/kaisa cp -Rup /mnt/marge/* /var/backup/marge cp -Rup /mnt/nimeton/* /var/backup/nimeton cp -Rup /mnt/tero/* /var/backup/tero #done, umount everything /root/bin/umounttaa.sh
This is very basic and easy to setup
For more advanced setup, You could use "tripwire", that comes also with latest SuSE distros.
A few comments about that : - - the use of "cp" commands of course works, but rsync has the advantage of copying only what was modified since last time (-> faster process) - - I don't believe Tripwire would be useful here. It is for monitoring files so that you are warned of any unwanted modification. It is not a backup tool. - -- Thibaut Cousin E-mail : cousin@in2p3.fr Web : http://clrwww.in2p3.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9xqtvv1vqsTa1E4oRAnc9AJ4+kw4opGZzfcCEOsCbK60z15XGaQCgw6NK j/P2XIhDRG4JfPrDJ6ivuaI= =8Fk/ -----END PGP SIGNATURE-----
- the use of "cp" commands of course works, but rsync has the advantage of copying only what was modified since last time (-> faster process) Also, rsync can use compression when it is rsync'ing data, giving an even quicker "copy" speed over networks etc :o)
I use it muchly here :o)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le Lundi 4 Novembre 2002 17:54, Bill Parker a écrit :
We have a situation where we have a primary file server, and a back up one, what I would like to do is sync up changes from the primary file server (directory /somestuff for example) with the backup server's /somestuff directory. Ala, any files that have been changed on the primary get copied to the backup machine say once a day?
I know mirroring HD's in the same system would be a better way to go, but has someone done something like this before?
This one is easier ;-) The tool for this is called "rsync" (package with that same name on the SuSE CDs). I don't remember the syntaxe, so I can't tell you more, but I'm sure it is what you need. Let's say you found the correct command line and copied it in a script called "backup.sh". If you want it "once a day", just put the script in Cron's dialy tasks. The easiest way to do so (but not the cleanest) is to launch KCron as root to schedule the task. Note: I said this way of scheduling it is not the cleanest because of permission issues. Launching anything as root, if you're touchy with security, can be a bad idea. But you could try it like that first, and refine later if it works. - -- Thibaut Cousin E-mail : cousin@in2p3.fr Web : http://clrwww.in2p3.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9xqmev1vqsTa1E4oRAl+pAJ4lu0FvD0yy5Ka7L7Q3w6Q/PakIMgCgv3pB MWyIGnTIYunhDAyRPlJ8aQU= =HFH/ -----END PGP SIGNATURE-----
participants (4)
-
Bill Parker
-
jaakko tamminen
-
The Purple Tiger
-
Thibaut Cousin