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

Re: rsync usage



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.

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7360             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

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