no backup for excluded files?

Matt McCutchen matt at mattmccutchen.net
Wed Aug 13 14:57:56 GMT 2008


On Wed, 2008-08-13 at 16:19 +0200, Louis-David Mitterrand wrote:
> I use rsync 3.0.2 for daily incremental backups:
> 
> rsync -aAzHRxby -f '. -' --numeric-ids --delete-during --delete-excluded \
> 	  --suffix='' --backup-dir=$BACKUP_ROOT/$BACKUP_HOST/${TODAY} \
> 	  ${DESTINATION}$BACKUP_ROOT/$BACKUP_HOST/current <<< $EXCLUDE_PATTERNS
> 
> Sometimes I add a new item to $EXCLUDE_PATTERNS but then the excluded
> files are backed up in $BACKUP_ROOT/$BACKUP_HOST/$TODAY. Is there a way
> to avoid that?

No.  You could use a second run that copies the backup dir to itself to
delete any excluded files.

> PS: the --suffix option is useless when using --backup-dir, right?

No, you can have rsync add a suffix to the backup files if you wish.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080813/6a575396/attachment.bin


More information about the rsync mailing list