[NTLUG:Discuss] Bash/rsync script help.

Eric Waguespack ewaguespack at gmail.com
Mon Mar 16 11:24:02 CDT 2009


On Mon, Mar 16, 2009 at 11:02 AM, CoryC <oakleeman at yahoo.com> wrote:
>
> process to see what might be wrong?
> Thanks,
> Cory
>
> rsync -avR --delete --files-from=/backup/modified_files.txt / /mnt/usb/vol1/

I think the issue here is that rsync won't delete when you specify an
input list, basically it isn't rsyncing directories, only files, so
the receiver does not know what to delete.

a quick google turned up this work around, I have not tested it so be careful


===========================
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.
===========================



More information about the Discuss mailing list