From 8a15e59c1fef2a2f6f29f9839822b9e903691e0f Mon Sep 17 00:00:00 2001 From: "Fco. Javier Delgado del Hoyo" Date: Mon, 9 Dec 2024 12:23:08 +0100 Subject: [PATCH] skip only timestamps when needed --- backup.sh | 5 ++--- docker-compose.yaml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backup.sh b/backup.sh index ead820e..499575d 100755 --- a/backup.sh +++ b/backup.sh @@ -32,8 +32,7 @@ do BASIC_OPTS="--single-transaction" if [ -n "$REMOVE_DUPLICATES" ] then - echo "WARNING: disabling comments in backup to remove deuplicate backups. Automatic database name detection won't work so set MYSQL_DATABASE on restore" - BASIC_OPTS="$BASIC_OPTS" --skip-comments + BASIC_OPTS="$BASIC_OPTS --skip-dump-date" fi if mysqldump $BASIC_OPTS $MYSQLDUMP_OPTS -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" $MYSQL_SSL_OPTS "$db" > "$FILENAME" then @@ -52,7 +51,7 @@ do cd /backup || exit && ln -s "$BASENAME" "$(basename "$LATEST")" if [ -n "$REMOVE_DUPLICATES" ] then - echo "=> Removing duplicate database dumps" + echo "==> Removing duplicate database dumps" fdupes -idN /backup/ fi if [ -n "$MAX_BACKUPS" ] diff --git a/docker-compose.yaml b/docker-compose.yaml index 64dcef0..5ac0e9d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,7 +30,6 @@ services: environment: - MYSQL_HOST=my_mariadb - MYSQL_USER=root - - MYSQL_DATABASE=${DATABASE_NAME} - MYSQL_PASS=${MARIADB_ROOT_PASSWORD} - MAX_BACKUPS=1 - INIT_BACKUP=1