[nSLUG] How to sync two directory trees

greg.hamilton at ns.sympatico.ca greg.hamilton at ns.sympatico.ca
Wed May 27 14:58:01 ADT 2009

Hi, Michael

rsync is kinda like samba.

I use it to automate (via cron jobs) daily Mon. - Fri. backups between the main file server and a dedicated backup server with two mirrored disks for a client of mine.

Once you wrap your head around it, it's really not that bad.

I found the following to help me figure it out the first time:


If both your disks are local, you should have a less stressful time of it than I did the first time through.

Hope this helps!

> From: mspencer at tallships.ca (Mike Spencer)
> Date: 2009/05/27 Wed PM 01:34:45 EDT
> To: nslug at nslug.ns.ca
> Subject: [nSLUG]  Re: How to sync two directory trees
> 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/                        ^^-^^
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/cgi-bin/mailman/listinfo/nslug

More information about the nSLUG mailing list