[prev in list] [next in list] [prev in thread] [next in thread] 

List:       unison-users
Subject:    Re: [unison-users] How To Synchronize Two Folders Under Linux and Keep the Newest Files
From:       Alan Schmitt <alan.schmitt () polytechnique ! org>
Date:       2005-12-17 8:12:28
Message-ID: 058B54E1-9183-42D8-90A3-0B0A03BE0A11 () polytechnique ! org
[Download RAW message or body]


On 17 déc. 05, at 04:17, Drew Kutcharian wrote:

> Hi,
>
> I have two folders /folder1 (a local filesystem folder on machine A)
> and /folder2 (NFS mount exported from machine B and mounted on
> machine A).
> I would like to sync these two folders with the following rules:
> a. If a file exist in /folder1 but not in /folder2 copy the file
> from /folder1 to /folder2
> b. If a file exist in /folder2 but not in /folder1 copy the file
> from /folder2 to /folder1
> c. If a file exists in both folders, copy the newest (most recent
> modified timestamp) file to the destination folder (overwrite)
> d. Ignore all the deleted files/folders (this is not really a show
> stopper though, we can sync this too if not possible otherwise)
>
> Also (Important), this needs to be a cron automatic job with no user
> intraction.
>
> Some OS info:
>  Machine A is running RedHat Enterprise Linux ES 4 with unison
> version 2.10.2
>  Machine B is running RedHat Enterprise Linux ES 3 no unison
> installed (just an NFS server)
>  Machines are on a gigabit network
>
>
> I don't know if this is possible to do with unison.
> Any help is greatly appreciated.

If you want to avoid propagating deletions, then I think the only way  
to proceed is to delete the archive first (but then update detection  
will take a long time), then use the "batch" and "force newer"  
options. Is this what you're looking for?

Alan

-- 
Alan Schmitt <http://sardes.inrialpes.fr/~aschmitt/>

The hacker: someone who figured things out and made something cool  
happen.
.O.
..O
OOO





["PGP.sig" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic