deleting remote dirs I no longer want to backup

Wayne Davison wayned at samba.org
Mon Jan 23 16:54:24 GMT 2006


On Mon, Jan 23, 2006 at 01:06:03PM +0100, Christophe LYON wrote:
> However, I don't understand well you last comment (rsync only deletes
> in directories that it sends).

Let's look at the man-page:

--delete
    This tells rsync to delete extraneous files from the receiving side
    (ones that aren't on the sending side), but only for the directories
    that are being synchronized.  You must have asked rsync to send the
    whole directory (e.g. "dir" or "dir/") without using a wildcard for
    the directory's contents (e.g. "dir/*") since the wildcard is
    expanded by the shell and rsync thus gets a request to transfer
    individual files, not the files' parent directory.

The parent directory of the rel-1.0 dir is being referenced explicitly
in the command-line, not being synchronized by rsync.  To fix this,
follow the instructions I gave in my last email about using switching
over to using includes/excludes for the rel-1.0 matching (which allows
you to synchronize the parent directory of the rel-1.0 dir).

..wayne..


More information about the rsync mailing list