formatting
This commit is contained in:
@@ -36,27 +36,27 @@ in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
# backups homelab with borg
|
||||
services.borgbackup.jobs.homelab = lib.mkIf (cfg.baks != {}) {
|
||||
archiveBaseName = "homelab";
|
||||
repo = cfg.backup_repo;
|
||||
paths = lib.flatten (lib.attrsets.mapAttrsToList (_: arg: arg.paths) cfg.baks);
|
||||
compression = "auto,zstd";
|
||||
startAt = "03:30";
|
||||
group = "archives";
|
||||
encryption.mode = "repokey-blake2";
|
||||
encryption.passCommand = "cat ${sec."borg_passwd".path}";
|
||||
preHook = ''
|
||||
systemctl start mysql-backup.service
|
||||
systemctl start $(systemctl list-unit-files 'postgresqlBackup-*.service' --no-legend --no-pager | cut -d' ' -f1)
|
||||
'';
|
||||
extraArgs = ["--verbose" "--show-rc" "--umask" "0007"];
|
||||
extraCreateArgs = ["--list" "--stats" "--filter" "AME"];
|
||||
prune.keep = {
|
||||
within = "1d"; # Keep all archives from the last day
|
||||
daily = 7;
|
||||
weekly = 12;
|
||||
monthly = -1; # Keep at least one archive for each month
|
||||
};
|
||||
archiveBaseName = "homelab";
|
||||
repo = cfg.backup_repo;
|
||||
paths = lib.flatten (lib.attrsets.mapAttrsToList (_: arg: arg.paths) cfg.baks);
|
||||
compression = "auto,zstd";
|
||||
startAt = "03:30";
|
||||
group = "archives";
|
||||
encryption.mode = "repokey-blake2";
|
||||
encryption.passCommand = "cat ${sec."borg_passwd".path}";
|
||||
preHook = ''
|
||||
systemctl start mysql-backup.service
|
||||
systemctl start $(systemctl list-unit-files 'postgresqlBackup-*.service' --no-legend --no-pager | cut -d' ' -f1)
|
||||
'';
|
||||
extraArgs = ["--verbose" "--show-rc" "--umask" "0007"];
|
||||
extraCreateArgs = ["--list" "--stats" "--filter" "AME"];
|
||||
prune.keep = {
|
||||
within = "1d"; # Keep all archives from the last day
|
||||
daily = 7;
|
||||
weekly = 12;
|
||||
monthly = -1; # Keep at least one archive for each month
|
||||
};
|
||||
};
|
||||
|
||||
# mysql backups currently minecraft_recpro is the only thing using this
|
||||
services.mysqlBackup = lib.mkIf (config.services.mysql.ensureDatabases != []) {
|
||||
|
||||
Reference in New Issue
Block a user