OFF TOPIC: rsync usage (Was: Re: fatman too slow from US?)
> > If you are not already doing so, you probably want to use rsync for this,
> > since it only copies the changes. If you want any help setting it up,
> > drop me a line.
> va is using rsync to mirror the entire web directory and ftp archive.
> > N.B. The --delete option can be a bit counter-intuitive (read dangerous)
> > on pre-1.6.4 versions of rsync.
> I'd been meaning to file a bug against it for this. Not only is it
> counterintuitive, but the way it handles directories is just plain wrong.
> It makes it impossible to safely use the --delete option without hiding
> the local directory in an otherwise empty direcory.
That is not actually true.
To copy a directory tree without hiding it in a sub-directory, or deleting all
it's neighbours, just put a slash on the end of the source directory:
rsync -avz -e ssh --delete /local/directory/ remote:/mirror/directory
will copy all the files&directories under /local/directory to the directory
/mirror/directory on the remote machine.
This is because it uses everything after the last slash of the source (i.e.
nothing in this case) to construct the target name.
Also the counter-intuitiveness is fixed in the latest version (after 1.6.4),
in that it will no longer do the depressing `delete all my neighbours' thing
if you leave the backslash out.
This means that with the later versions you can acheive the same result thus:
rsync -avz -e ssh --delete /local/directory remote:/mirror
[ don't do that with eairlier versions, because it deletes everything
but `directory' from remote:/mirror ]
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .