[wplug] rsync

Bill Moran wmoran at potentialtech.com
Fri May 21 00:12:05 EDT 2004


Jt Chiodi wrote:
> experienced rsync gurus,
> 
> I want to sync two directories on two different machines.  I only want the new 
> and changed stuff to be transmitted from machine 1 to machine 2.  I looked at 
> the rsync docs and ran a test command, but I must have done something wrong.  
> it look like it was going to copy everything.

What made you think that?

rsync does have to _check_ every file when it runs, that doesn't mean it
copies everything.

> Can someone send the proper switches to rsync to accomplish this?

I generally use -azq --delete

q may not be apprpriate, but I usually use rsync from cron, and I don't want
tons of information stuff every time it runs.  Until you've got it doing what
you want, you probably want to substitute -v for -q, so you get _more_ info
about what's going on.

-a is probably the most useful, it's short for --archive and sets a number of
switches that are logical for backing up with rsync (I just checked the man
page, and -a is the same as -rlptgoD)

If you omit --delete, then files hang around on the target drive forever, even
after you've deleted them from source drive.

HTH

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the wplug mailing list