|
|
@@ -25,7 +25,7 @@
|
|
|
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/postgres/bin:/usr/local/pgsql/bin
|
|
|
HOMEPAGE="https://github.com/k0lter/autopostgresqlbackup"
|
|
|
NAME="AutoPostgreSQLBackup" # Script name
|
|
|
-VERSION="2.5" # Version Number
|
|
|
+VERSION="2.6" # Version Number
|
|
|
DATE="$(date '+%Y-%m-%d_%Hh%Mm')" # Datestamp e.g 2002-09-21
|
|
|
DNOW="$(date '+%u')" # Day number of the week 1 to 7 where 1 represents Monday
|
|
|
DNOM="$(date '+%d')" # Date of the Month e.g. 27
|
|
|
@@ -915,10 +915,10 @@ if [ "${ENCRYPTION}" = "yes" ]; then
|
|
|
fi
|
|
|
|
|
|
log_info "Backup Start: $(date)"
|
|
|
-if [ "${DNOM}" = "${DOMONTHLY}" ]; then
|
|
|
+if [ "${DNOM}" = "${DOMONTHLY#0}" ]; then
|
|
|
period="monthly"
|
|
|
rotate="${BRMONTHLY}"
|
|
|
-elif [ "${DNOW}" = "${DOWEEKLY}" ]; then
|
|
|
+elif [ "${DNOW}" = "${DOWEEKLY#0}" ]; then
|
|
|
period="weekly"
|
|
|
rotate="${BRWEEKLY}"
|
|
|
else
|