1 |
I was looking at this rotating backup script |
2 |
|
3 |
source: |
4 |
https://community.spiceworks.com/topic/34970-how-to-create-rotating-backups-of-files |
5 |
|
6 |
----------backup script---------------- |
7 |
BACKUPDIR=`date +%A` |
8 |
OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES |
9 |
--delete --backup --backup-dir=/$BACKUPDIR -a" |
10 |
|
11 |
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin |
12 |
|
13 |
# the following line clears the last weeks incremental directory |
14 |
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir |
15 |
rsync --delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/ |
16 |
rmdir $HOME/emptydir |
17 |
|
18 |
# now the actual transfer |
19 |
rsync $OPTS $BDIR $BSERVER::$USER/current |
20 |
-------end backup script---------------- |
21 |
|
22 |
Can anybody explain why they they "...clear the last weeks incremental directory"? |
23 |
|
24 |
Doesn't "rsync --deleate" option take take care of this? |
25 |
|
26 |
Does it have something to do with Windows? |
27 |
|
28 |
-- |
29 |
Thelma |