[TriLUG] syncronizing directories
Jonathan Rippy
jonathan.rippy at interpath.net
Wed Jul 10 09:44:59 EDT 2002
Have you used rsync before? It can synchronize between servers but
also between directories.
This command will sync the /tmp/test/src directory into /tmp/test/backup
rsync --recursive /tmp/test/src /tmp/test/backup
This is the option you are looking for I believe:
-u, --update update only (don't overwrite newer files)
I'm not an rsync guru or anything but hopefully this will help and
fit your needs.
Andrew Perrin wrote:
> Before I go off and write a script, I'm wondering how others have solved
> this problem.
>
> I keep current projects on a USB memory key, which is faster and more
> reliable than trying to make networked mounts available wherever I'm
> working. But I'm concerned that I could lose or otherwise destroy the
> thing, so I'd like a convenient way to back it up.
>
> More to the point, though: the way I use it is I pull directories from my
> (nicely backed-up) home directory at work onto the key, then edit them
> there. The ideal solution for me would be some tool that takes each file
> from the key and copies it back to the home directory, *unless* the home
> directory's copy is newer, in which case it would copy it with some new
> name.
>
> I can write this easily enough, but if it's already written I'll pass.
>
> Any thoughts?
>
> Thanks.
>
> ----------------------------------------------------------------------
> Andrew J Perrin - http://www.unc.edu/~aperrin
> Assistant Professor of Sociology, U of North Carolina, Chapel Hill
> clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
>
>
> _______________________________________________
> TriLUG mailing list
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
> http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
>
>
>
--
jonathan rippy
More information about the TriLUG
mailing list