Skip to content

Improve logic and quality of life for local backups

Jcrespo requested to merge 820664 into main

Imported from: https://gerrit.wikimedia.org/r/c/operations/software/wmfbackups/+/820664

Miscelaneous local backup improvements, made now behave like its remote counterpart:

  • INCOMPATIBLE CHANGE: make the local backups command line (backup-mariadb) now have a compulsory argument (sections). To recover the previous behaviour, now one has to run: 'backup-mariadb all' This is to prevent accidental test runs by just running the executable, without arguments. This also allows rerunning only some backups easilly, by running 'backup-mariadb s1 s2 x1', which will run the backups from config, but only the selected ones.
  • INCOMPATIBLE CHANGE: return 0 (success error code) as long as no config parsing or command line error, or any other unacaught exception (such as control-c) argument happens, independently of the exit status of the backups. This is because a single backup failure caused the systemd timer running this process to alarm, causing alert fatigue. There is already a check process with proper time thresholds- focus on that and logging reading for debugging.
  • A few improvements on logging: Now print the list of sections that failed at the end, for easier manual log monitoring. This is in addition to existing db metadata monitoring.
  • Fix new linter requirements on unrelated file

Change-Id: I60d91795769747ac71b41ea02e6c68b293131d11

Merge request reports