Try this instead:

rsync [OPTIONS] --include-from=/tmp/BACKUPFILE --exclude='*'
/var/data/shares/vmbackups/ /mnt/usb_backup/SFSYDVS01/daily.0/VM/

This way, rsync will scan the destination directory for deletions (since
you have -a without --files-from, which implies -r) and will delete the
old files because they are excluded with --delete-excluded.

Matt

Thanks Matt,

I tried this but it doesn't seem to work for me as you describe. I just created a test setup. The commands I'm running are as follows:

[EMAIL PROTECTED]:~# rsync --version
rsync  version 2.6.9  protocol version 29
[EMAIL PROTECTED]:~# ls /tmp/source/
Thursday2008-09-11.bkf  Tuesday2008-09-09.bkf  Wednesday2008-09-10.bkf
[EMAIL PROTECTED]:~# ls -t1 /tmp/source | head -n 1 > /tmp/BACKUPFILE
[EMAIL PROTECTED]:~# cat /tmp/BACKUPFILE
Thursday2008-09-11.bkf
[EMAIL PROTECTED]:~# rsync -ah --delete --numeric-ids --stats --delete-excluded -include-from=/tmp/BACKUPFILE --exclude='*' /tmp/source/ /tmp/destination/
.d..t...... ./

Number of files: 1
Number of files transferred: 0
Total file size: 0 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 20
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 42
Total bytes received: 26

sent 42 bytes  received 26 bytes  136.00 bytes/sec
total size is 0  speedup is 0.00
[EMAIL PROTECTED]:~# ls /tmp/destination/
[EMAIL PROTECTED]:~#

--
Please use reply-all for most replies to avoid omitting the mailing list.
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