Gentoo Archives: gentoo-user

From: thelma@×××××××××××.com
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: [gentoo-user] rotating backup script
Date: Tue, 07 Mar 2017 05:04:40
Message-Id: aef66c67-744d-0bf7-9a98-6be3377440de@sys-concept.com
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

Replies

Subject Author
Re: [gentoo-user] rotating backup script Jean-Christophe Bach <jc.bach@×××××××.org>
Re: [gentoo-user] rotating backup script Rich Freeman <rich0@g.o>