[nSLUG] Re: How to sync two directory trees

Mike Spencer mspencer at tallships.ca
Wed May 27 14:34:45 ADT 2009


me> Is there an easy way to sync or update two nearly identical directory
me> trees?

Okay: rsync or union.

I had browsed the manpage for rsync and found it roughly as lucid and
straightforward as the manpage for tar. ;-)

But I'll have another look and check union, too.

> Now if you want bi-directional synchronisation (i.e. really
> synchronising the two folders were either directory could have
> changed) you will need to use "unison".

Gets complicated , don't it?  In my case, either directory tree could
have changed but HD1 is canonical so:

      Any new files on HD2 (that don't exist on HD1) can stay, but

      Any files on HD2 with same path/name as on HD1 must be same as
      on HD1, and

      Any files on HD1 that are absent from HD2 must be copied over.

So I have some more reading to do.


Thanks for the prompt replies,
- Mike

-- 
Michael Spencer                  Nova Scotia, Canada       .~. 
                                                           /V\ 
mspencer at tallships.ca                                     /( )\
http://home.tallships.ca/mspencer/                        ^^-^^



More information about the nSLUG mailing list