Is there a parameter in rsync to clean $BACKUPDIR before writing to it (--backup-dir=$BACKUPDIR)?

jupiter jupiter.hce at gmail.com
Thu Feb 4 01:33:50 UTC 2016


Hi,

I am runing rsync --backup --backup-dir=$BACKUPDIR where the
BACKUPDIR=$(date +%d) to recycle the $BACKUPDIR in a month. But rsync does
not clean the  $BACKUPDIR before writing to it in cycling.

I guess you have to clean it manually before the rsync can write to it. As
my $BACKUPDIR is in remote machine, do you have to run ssh to delete it
first before calling rsync in a script? Or if there is better parameter in
rsync to automatically delete the old $BACKUPDIR, and create a new one?

Thank you.

- j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20160204/2657cedb/attachment.html>


More information about the rsync mailing list