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

Re: rsync

Curtis Vaughan said:
> 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.)

use the --delete option

I use the flags:

rsync -av -e ssh --delete /path/to/source remote_host:/destination

and in my experience rsync is unidirectional. I think this is a good
thing, that way I know that the "source" cannot be changed by the
destination(e.g. someone breaks into the destination machine and changes
files which then revert back to my systems)


Reply to: