diff --git a/postgresql/files/postgresql-backup.sh b/postgresql/files/postgresql-backup.sh index 3247c7bf..ecf0ea83 100755 --- a/postgresql/files/postgresql-backup.sh +++ b/postgresql/files/postgresql-backup.sh @@ -41,10 +41,10 @@ create_backup_dirs() { cleanup_old_backups() { # Remove the old backups - TODELETE=`ls ${$BACKUPDIR}/history | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE}` + TODELETE=`ls ${BACKUPDIR}/history | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE}` for i in ${TODELETE} do - rm -f ${$BACKUPDIR}/history/*.$i + rm -f ${BACKUPDIR}/history/*.$i done }