diff --git a/seqs/postgres.sh b/seqs/postgres.sh index 3072da8..17b2197 100755 --- a/seqs/postgres.sh +++ b/seqs/postgres.sh @@ -128,10 +128,12 @@ step_22() { exe su ${toolUser} -c "psql -c '\du'" } -step_24_info() { echo "Clean the year before last year backups of [DATABASE]"; } +step_24_info() { + local DELYEAR=$(($(date +%Y)-2)) + echo "Clean all ${DELYEAR} backups of [DATABASE]"; +} step_24_alias() { ALIAS="backupclean"; } step_24() { -step_6() { shift local DELYEAR=$(($(date +%Y)-2)) local dbname=$1