Skip to content

Commit b5244e5

Browse files
committed
Updated backup.sh
1 parent 2725ce2 commit b5244e5

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ by compressing and storing them. It is designed to be executed @midnight (same a
99

1010
Details
1111
-------
12-
- Every "\<token-uppercase\>\_BACKUP\_DAY" a backup is taken, unless a backup was
13-
already taken this week.
12+
- Every "\<token-uppercase\>\_BACKUP\_DAY" a backup is taken.
1413
- If no backup was taken the previous week (Mon -> Sun) **AND** if no backup
1514
was taken this week, a backup is taken no matter what.
1615
- Backups older than 5 weeks (counting current week) are deleted unless the

backup.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
# Example cron entry:
2828
# @midnight /root/bin/backup.sh
2929
#
30-
# Details: Every "<token-uppercase>_BACKUP_DAY" a backup is taken,
31-
# unless a backup was already taken this week. If no backup was
32-
# taken the previous week (Mon -> Sun) AND if no backup was taken
33-
# this week, a backup is taken no matter what.
30+
# Details: Every "<token-uppercase>_BACKUP_DAY" a backup is taken.
31+
# If no backup was taken the previous week (Mon -> Sun) AND if no
32+
# backup was taken this week, a backup is taken no matter what.
3433
#
3534
# Backups older than 5 weeks (counting current week) are deleted unless
3635
# the total number of backups is less than 6 (<=5).
@@ -318,7 +317,7 @@ check_backups () {
318317
fi
319318
done
320319

321-
if [ ${week} -eq 1 ] && [ "${TODAY}" == "${!BACKUP_DAY}" ] && [ ${FILENUM} -eq 0 ]
320+
if [ ${week} -eq 1 ] && [ "${TODAY}" == "${!BACKUP_DAY}" ]
322321
then
323322
conduct_backup ${1}
324323
((FILENUM++))

0 commit comments

Comments
 (0)