On Sat, Nov 27, 2004 at 01:32:58PM +0100, Tony Mobily
wrote:> Hello,
>
> I have a bit of a problem - I have the feeling the solution is
> ridicolously trivial, and yet I can't find it!
>
> I have a remote repository of text files. Until today, I was the only
> one changing those files: I would simply change them locally, and
> update the remote repository with this command:
>
> cd local_dir
> rsync --delete -e ssh -Llavuz . merc@remote_server:remote_directory
>
> Now, things are more complicated because I am not the only person
> modifying those files stored in the remote server anymore.
> So, here is what I'd like to do:
>
> * Make sure that the remote respository is always the "good",
updated
> copy
> * If I change one of my files locally, the remote repository is updated
> * If I change a remote file, my local file is updated
> * If both the remote file and the local file are changed, then the
> latest one "wins"
> This would obviously apply to both me and Max (the other person who has
> access to the files).
>
> This should make it possible for me and Max to modify files on the
> remote server OR on the local file system, knowing that the server will
> always have the latest version of every file.
>
> Now: is it possible to do this using rsync?
Possible? Probably, but it doesn't sound like the right tool for the
task. Have you considered CVS (since you're storing text files)? Or
unison (since you want to handle updates to either end)?
-chris
>
> Bye!
>
> Merc.
>
> ------------------------------------------------------------------------
> ----
> Tony Mobily
> Author of "Hardening Apache" (Apress)
> "...this book can save you pain, humiliation, and hair loss" --
> Mitchell Pirtle, PHP Magazine 05/2004
>
> --
> To unsubscribe or change options:
> http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html