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
fix(backup): make infrastructure DB backup opt-in, add unit tests
Addresses @weizhouapache's review: by default, production deployments should
manage CloudStack DB backups via existing external tooling (cron + mysqldump,
replication, etc), not via the in-process backup task. The DB component is now
gated on a new explicit ConfigKey that defaults to false.
- New ConfigKey: nas.infra.backup.include.database (Boolean, default false,
Global scope). When false, the InfrastructureBackupTask runs only the
configs + certs path (where there is no reasonable external alternative).
- nas.infra.backup.enabled description rewritten to make the new split clear
and to steer production users toward the cron-job pattern for the DB.
- nas.infra.backup.include.usage.db description updated to clarify it has
no effect unless include.database is also true.
- New InfrastructureBackupTaskTest with 9 tests covering the gating decisions:
master switch off, empty location, DB-skipped-by-default, both DBs when
usage enabled, usage flag ignored when DB excluded, props unreadable,
retention always runs, daily interval. Addresses codecov coverage gap on
this PR (143 untested lines was the original report).
- backupDatabase/backupDirectory/cleanupOldBackups + loadDbProperties +
the ConfigKey accessors made protected so tests can override the
side-effecting paths without standing up ProcessBuilder.
0 commit comments