You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto cleanup functionality doesn't work with Postgres when backing up all databases, since the find command search term doesn't include the all component of backup set filenames
In this example, MariaDB backups are deleted correctly. Example filename is mariadb_all_mariadb_20241125-122007.sql.zst. Example find command from logs is find /backup/ -type f -mmin +20160 -iname 'mariadb_all_mariadb*' -exec rm -f '{}' ';'. Note the matching -iname argument.
However, this fails for PSQL. Example backup filename is pgsql_all_postgresql_20241020-030002.sql.zst including _all_ component as with MariaDB. However, the find command is:
However, checking later in the backup log I see backup_job_filename_base=pgsql__postgresql, which clearly overwrites the previous value and is the source of the bug
Environment
Image version / tag: tiredofit/db-backup:latest@sha256:58d319fc4ca790543a41a831bed9bf004d262e41f1cc3ee4d52d21688dc43fbb
Summary
Auto cleanup functionality doesn't work with Postgres when backing up all databases, since the
find
command search term doesn't include theall
component of backup set filenamesSteps to reproduce
Example environment:
In this example, MariaDB backups are deleted correctly. Example filename is
mariadb_all_mariadb_20241125-122007.sql.zst
. Examplefind
command from logs isfind /backup/ -type f -mmin +20160 -iname 'mariadb_all_mariadb*' -exec rm -f '{}' ';'
. Note the matching-iname
argument.However, this fails for PSQL. Example backup filename is
pgsql_all_postgresql_20241020-030002.sql.zst
including_all_
component as with MariaDB. However, the find command is:Note that the required
all
component is missing in the-iname
.What is the expected correct behavior?
The cleanup
find
command should use the correctbackup_job_filename_base
, which ispgsql_all_postgresql
in this caseRelevant logs and/or screenshots
docker-db-backup/install/assets/functions/10-db-backup
Line 823 in 67f4326
backup_job_filename_base=pgsql__postgresql
, which clearly overwrites the previous value and is the source of the bugEnvironment
tiredofit/db-backup:latest@sha256:58d319fc4ca790543a41a831bed9bf004d262e41f1cc3ee4d52d21688dc43fbb
Complete backup log
The text was updated successfully, but these errors were encountered: