From cc743f453d5efd0bc6428312eb5f86f5f16c9d45 Mon Sep 17 00:00:00 2001 From: Avi Deitcher Date: Sun, 25 May 2025 15:48:26 +0300 Subject: [PATCH] remove references to old DB_DUMP_DEBUG env var Signed-off-by: Avi Deitcher --- README.md | 2 +- pkg/core/dump.go | 16 ++++++++-------- scripts.d/post-backup/rename_backup.sh.example | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 698f5d66..c4228607 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ __You should consider the [use of `--env-file=`](https://docs.docker.com/engine/ * `DB_DUMP_INCLUDE`: names of databases to restore separated by spaces. Required if `SINGLE_DATABASE=true`. * `SINGLE_DATABASE`: If is set to `true`, `DB_DUMP_INCLUDE` is required and must contain exactly one database name. Mysql command will then run with `--database=$DB_DUMP_INCLUDE` flag. This avoids the need of `USE ;` statement, which is useful when restoring from a file saved with `SINGLE_DATABASE` set to `true`. * `DB_RESTORE_TARGET`: path to the actual restore file, which should be a compressed dump file. The target can be an absolute path, which should be volume mounted, an smb or S3 URL, similar to the target. -* `DB_DUMP_DEBUG`: if `true`, dump copious outputs to the container logs while restoring. +* `DB_DEBUG`: if `true`, dump copious outputs to the container logs while restoring. * To use the S3 driver `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_DEFAULT_REGION` will need to be defined. Examples: diff --git a/pkg/core/dump.go b/pkg/core/dump.go index c1d7eb66..55d49f4f 100644 --- a/pkg/core/dump.go +++ b/pkg/core/dump.go @@ -187,10 +187,10 @@ func (e *Executor) Dump(ctx context.Context, opts DumpOptions) (DumpResults, err func preBackup(ctx context.Context, timestamp, dumpfile, dumpdir, preBackupDir string, debug bool) error { // construct any additional environment env := map[string]string{ - "NOW": timestamp, - "DUMPFILE": dumpfile, - "DUMPDIR": dumpdir, - "DB_DUMP_DEBUG": fmt.Sprintf("%v", debug), + "NOW": timestamp, + "DUMPFILE": dumpfile, + "DUMPDIR": dumpdir, + "DB_DEBUG": fmt.Sprintf("%v", debug), } ctx, span := util.GetTracerFromContext(ctx).Start(ctx, "pre-backup") defer span.End() @@ -200,10 +200,10 @@ func preBackup(ctx context.Context, timestamp, dumpfile, dumpdir, preBackupDir s func postBackup(ctx context.Context, timestamp, dumpfile, dumpdir, postBackupDir string, debug bool) error { // construct any additional environment env := map[string]string{ - "NOW": timestamp, - "DUMPFILE": dumpfile, - "DUMPDIR": dumpdir, - "DB_DUMP_DEBUG": fmt.Sprintf("%v", debug), + "NOW": timestamp, + "DUMPFILE": dumpfile, + "DUMPDIR": dumpdir, + "DB_DEBUG": fmt.Sprintf("%v", debug), } ctx, span := util.GetTracerFromContext(ctx).Start(ctx, "post-backup") defer span.End() diff --git a/scripts.d/post-backup/rename_backup.sh.example b/scripts.d/post-backup/rename_backup.sh.example index 87e4c4a4..8de6ba1a 100755 --- a/scripts.d/post-backup/rename_backup.sh.example +++ b/scripts.d/post-backup/rename_backup.sh.example @@ -1,6 +1,6 @@ #!/bin/bash # Rename backup file. -if [[ -n "$DB_DUMP_DEBUG" ]]; then +if [[ -n "$DB_DEBUG" ]]; then set -x fi