From 366728ccda7cf2818144509f678560bfaa04d297 Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Thu, 8 Feb 2018 17:11:56 +1300 Subject: [PATCH] added TASK argument to delete_old --- dbbackup-docker-compose | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbbackup-docker-compose b/dbbackup-docker-compose index 79e5205..9efc33e 100755 --- a/dbbackup-docker-compose +++ b/dbbackup-docker-compose @@ -111,6 +111,7 @@ delete_old() { PRUNEABLES=`$PRUNEABLES_CMD $PATTERN` if test "$?" -eq "0" ; then message "pruning older files based on $PATTERN" + BU_TO_KEEP=$BU_TO_KEEP_${!2} message "keeping last $BU_TO_KEEP backups" # @@ -207,7 +208,7 @@ FILENAME=$FILEPART-$STAMP.sql FILEPATH=$BU_DIR/$FILENAME # # delete stale backups -delete_old $FILEPART +delete_old $FILEPART $TASK # message "backing up all the databases into $FILEPATH" # dump the data into the file