Wayne Davison wrote:

On Fri, Dec 02, 2005 at 10:00:14AM -0500, David Filion wrote:
rsync -v --stats -d --include='+ */' --include='- *' --force --delete-during --backup \
--backup-dir=/mnt/backups/_DELETED 192.168.0.2::'ucp/*' .

Read the first two paragraphs from the --delete option in the rsync
manpage:

   http://rsync.samba.org/ftp/rsync/rsync.html

It explains why the '*' is not appropriate and also that -r is
(currently) required to be used (the CVS version will delete inside
directories sent via -d, but not older versions of rsync).  If you
don't want subdirectories inside the top-level dirs to be copied,
you can either exclude them (add --exclude='*/*' prior to your first
include and add -r to the options) or upgrade to the CVS version.

..wayne..




OK,

After some reading and keyboard bashing, I thought I made some headway.
I now use:

 rsync -r --delete --delete-during --backup --backup-dir=$DELETEDIR \
 -v --stats -d --force --include='+ */' --include='- *' $SERVER::'ucp/' .

to fetch the list of directories into the current directory. The directories are created correctly. However, when I remove a directory on the source server, the local version is (still) not (re)moved. I can confirm that the directory
contains files.  The kicker is, if I dry-run the command it prints:

receiving file list ... done
deleting TEMP/

Why does the dry-run indicate the directory is deleted, but when run with
out the dry-run flag, it is not?

David

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to