[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync



Curtis Vaughan, 2003-Apr-07 13:29 -0700:
> Question about rsync
> 
> Is rsync only unidirectional? Meaning, it can only synchronize from 
> SOURCE to DESTINATION. It will not go, "Oh, actually the destination is 
> more update than the source, so I'll update the source.
> 
> Say I want rsync to synchronize a directory.  If I delete a file from 
> the source directory, however, I've noticed that it leaves the file in 
> the destination directory. Is there a parameter to force it to remove 
> files that are not present in the source? (This would seemingly 
> contradict the first criteria, i.e., you can't have both.)

Right, rsync is unidirectional.  I use it with various flags for just
that purpose.  Some helpful flags are --recursive and --update (see
man page).  --archive is a good one too.

For directories that I need bidirectional synchronization, I use
unison.  It puts both host destinations in the same state moving the
newest files from one to the other.

By the way, both can run over ssh.

jc

-- 
Jeff Coppock		Systems Engineer
Diggin' Debian		Admin and User



Reply to: