Skip to content

exit_code changed to "exitcode" in 4.1.20 breaking backups #420

@elcid2012

Description

@elcid2012

Summary

It seems that from 4.1.19 to 4.1.20 the backup exit code variable switched names from "exit_code" to "exitcode" causing all backups to fail.

Steps to reproduce

I have two physical hosts with identical docker infrastructure. One is currently on 4.1.19 of DB backup and all backups are working fine; the other is on 4.1.20 and backups are all failing. I enabled DEBUG mode and isolated the few lines prior to the failure and discovered this:

4.1.20:

+ run_as_user pg_dump -h postgresql_authelia -p 5432 -U authelia authelia
+ pigz -q -3 -p 12
+ sudo -Eu dbbackup pg_dump -h postgresql_authelia -p 5432 -U authelia authelia
+ run_as_user tee /tmp/backups/03_dbbackup.VJwasl/pgsql_authelia_postgresql_authelia_20250726-205324.sql.gz
+ sudo -Eu dbbackup tee /tmp/backups/03_dbbackup.VJwasl/pgsql_authelia_postgresql_authelia_20250726-205324.sql.gz
+ exitcode=0
+ var_true ''
+ '[' '' = true ']'
+ '[' '' = yes ']'
+ check_exit_code backup pgsql_authelia_postgresql_authelia_20250726-205324.sql.gz
+ var_true ''
+ '[' '' = true ']'
+ '[' '' = yes ']'
+ case "${1}" in
+ write_log debug 'DB Backup exit Code is '

4.1.19:

+ run_as_user pg_dump -h postgresql_immich -p 5432 -U immich immich
+ pigz -q -3 -p 12
+ sudo -Eu dbbackup pg_dump -h postgresql_immich -p 5432 -U immich immich
+ run_as_user tee /tmp/backups/03_dbbackup.fUuzVj/pgsql_immich_postgresql_immich_20250726-205245.sql.gz
+ sudo -Eu dbbackup tee /tmp/backups/03_dbbackup.fUuzVj/pgsql_immich_postgresql_immich_20250726-205245.sql.gz
+ exit_code=0
+ var_true ''
+ '[' '' = true ']'
+ '[' '' = yes ']'
+ check_exit_code backup pgsql_immich_postgresql_immich_20250726-205245.sql.gz
+ var_true ''
+ '[' '' = true ']'
+ '[' '' = yes ']'
+ case "${1}" in
+ write_log debug 'DB Backup exit Code is 0'

As you can see, the exit code checker properly detects a "0" on 4.1.19 for success whereas on 4.1.20 the variable is undefined and therefore the exit code checker recieves no variable at all.

What is the expected correct behavior?

Successful backups on 4.1.20 should output "exit_code" instead of "exitcode" so the exit code check recieves the actual exit code.

Relevant logs and/or screenshots

See above.

Environment

N/A

Possible fixes

Switching back to 4.1.19 fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions