Dueling rsync scripts?

Charles Steinkuehler charles at steinkuehler.net
Thu Jun 5 09:19:52 CDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Brooks wrote:
| Hi all, quick question.
|
| Given an FTP server and directory tree on local machine X and an FTP
server
| on remote machine Y, I understand that a cron'd rsync script might be the
| best way to keep changes on X mirrored up to Y. My questions:
|
| * Can I mirror the script in reverse so that changes on machine Y
propagate
| back to X? (Perhaps running each script every other hour.)

Yes.  Rsync has several options to let you synchronize just what you
want.  Update only files that already exist, update only files that are
newer, etc.  Check out the --update switch, which can probably be used
to do what you want.

| * Every now and then, an extraordinary number of files need to be
| transferred, so a script running once an hour (or whatever) could
| conceivably bump into another instance of itself running. Issues?

This is typically handled using a lock-file (or something similar) so
that only one instance is running at a time.

- --
Charles Steinkuehler
charles at steinkuehler.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIR/YILywbqEHdNFwRApV2AKDPJ+tdDOu3VZMBQYAimmvC8qzHagCfdZM0
WB8USf/DKoH9fuamPTUHCAs=
=BVZr
-----END PGP SIGNATURE-----


More information about the Kclug mailing list