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

Re: rsync usage



On Wed, Mar 20, 2002 at 09:38:01AM -0600, Steven Pritchard wrote:
> On Sat, Mar 16, 2002 at 08:15:50PM -0600, Charles Menzes wrote:
> > that being said, in theory, the following will allow a local directory to 
> > be kept up to date mirroring any new files, and removing any deleted 
> > files. and no transfer will occur if no files have changed since the last 
> > run...
> > 
> >   rsync -a --delete
> 
> Just for reference, what you really want is something more like this:
> 
>     rsync -aHP --delete user@host:/remote/dir/. local/dir/.
> 
> Add -v also if you are running this interactively.  Be sure to "export
> RSYNC_RSH=ssh" before running it or add "-e ssh" to the command line
> if you want to use ssh for the transfer.
> 
> The "/." appended to the directories eliminates any confusion rsync
> might have with the command.  Without it, you might end up with
> /local/dir/dir/ or something.

Actually, if it's non-interactive, wouldn't just '--partial' be better than
the '-P' option, as the -P also includes the somewhat verbose '--progress'
option?  It appears that using '-aHPq' stops the progress output too, so
maybe that'd be easier to remember and use fewer characters...

Just something to consider (and something to kill some of my time with).

--Danny, who dislikes redirecting to /dev/null if it can be avoided ;)

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.