I was looking at this rotating backup script

source:
https://community.spiceworks.com/topic/34970-how-to-create-rotating-backups-of-files

----------backup script----------------
BACKUPDIR=`date +%A`
OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES 
      --delete --backup --backup-dir=/$BACKUPDIR -a"

export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

# the following line clears the last weeks incremental directory
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir
rsync --delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/
rmdir $HOME/emptydir

# now the actual transfer
rsync $OPTS $BDIR $BSERVER::$USER/current
-------end backup script----------------

Can anybody explain why they they "...clear the last weeks incremental 
directory"?

Doesn't "rsync --deleate" option take take care of this?

Does it have something to do with Windows? 

-- 
Thelma

Reply via email to