services.mysqlBackup: add assertion that all databases in singleTransaction must be included in the databases option

This commit is contained in:
6543
2025-02-02 21:09:05 +01:00
parent 00f0c5cf32
commit 16553f2c83
@@ -175,6 +175,12 @@ in
|| selectedAlg.minLevel <= cfg.compressionLevel && cfg.compressionLevel <= selectedAlg.maxLevel;
message = "${cfg.compressionAlg} compression level must be between ${toString selectedAlg.minLevel} and ${toString selectedAlg.maxLevel}";
}
{
assertion =
!(lib.isList cfg.singleTransaction)
|| lib.all (db: lib.elem db cfg.databases) cfg.singleTransaction;
message = "All databases in singleTransaction must be included in the databases option";
}
];
# ensure unix user to be used to perform backup exist.