fix timing
This commit is contained in:
@@ -135,11 +135,10 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# backups minecraft_recpro with borg!
|
# backups minecraft_recpro with borg!
|
||||||
services.borgbackup.jobs.${service} =
|
services.borgbackup.jobs.${service} = {
|
||||||
lib.mapAttrs (name: srv: {
|
archiveBaseName = service;
|
||||||
archiveBaseName = "${name}";
|
|
||||||
repo = cfg.backup_repo;
|
repo = cfg.backup_repo;
|
||||||
paths = [srv.data_dir] ++ lib.optionals (srv ? db_dump_dir) [srv.db_path];
|
paths = lib.flatten (lib.attrValues (lib.mapAttrs (_: srv: [srv.data_dir]) servers));
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "*-*-* *:00:00";
|
startAt = "*-*-* *:00:00";
|
||||||
group = "archives";
|
group = "archives";
|
||||||
@@ -154,7 +153,6 @@ in {
|
|||||||
weekly = 12;
|
weekly = 12;
|
||||||
monthly = -1; # Keep at least one archive for each month
|
monthly = -1; # Keep at least one archive for each month
|
||||||
};
|
};
|
||||||
})
|
};
|
||||||
servers;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
location = "/var/backup/mysql";
|
location = "/var/backup/mysql";
|
||||||
user = "root";
|
user = "root";
|
||||||
calendar = "*-*-* *:59:00";
|
calendar = "*-*-* *:59:50";
|
||||||
compressionAlg = "zstd";
|
compressionAlg = "zstd";
|
||||||
databases = config.services.mysql.ensureDatabases; # set to all databases defined in esure databases
|
databases = config.services.mysql.ensureDatabases; # set to all databases defined in esure databases
|
||||||
};
|
};
|
||||||
@@ -73,11 +73,14 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
location = "/var/backup/postgresql";
|
location = "/var/backup/postgresql";
|
||||||
compression = "zstd"; # optional: "xz", "zstd", "none"
|
compression = "zstd"; # optional: "xz", "zstd", "none"
|
||||||
startAt = "03:58";
|
startAt = "03:59";
|
||||||
databases = ["immich"]; # set to all databases defined in esure databases
|
databases = ["immich"]; # set to all databases defined in esure databases
|
||||||
#databases = config.services.postgresql.ensureDatabases; # set to all databases defined in esure databases
|
#databases = config.services.postgresql.ensureDatabases; # set to all databases defined in esure databases
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# helpful
|
||||||
|
environment.systemPackages = with pkgs; [borgbackup tree];
|
||||||
|
|
||||||
# declare secret for repo password
|
# declare secret for repo password
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"borg_passwd" = {
|
"borg_passwd" = {
|
||||||
|
|||||||
Reference in New Issue
Block a user