2021-09-22 10:16:11 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
services.restic.backups = {
|
|
|
|
"gitea" = {
|
|
|
|
paths = [ "/var/lib/gitea" ];
|
|
|
|
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/wind/gitea";
|
|
|
|
initialize = true;
|
|
|
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
|
|
|
|
timerConfig = { "OnCalendar" = "02:15"; };
|
2021-09-23 16:45:06 +02:00
|
|
|
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
|
2021-09-22 10:16:11 +02:00
|
|
|
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
|
2021-09-27 14:55:55 +02:00
|
|
|
user = "gitea";
|
2021-09-22 10:16:11 +02:00
|
|
|
};
|
|
|
|
"postgres" = {
|
|
|
|
paths = [ "/var/lib/postgresql/backup" ];
|
|
|
|
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/wind/postgres";
|
|
|
|
initialize = true;
|
|
|
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
|
|
|
|
timerConfig = { "OnCalendar" = "03:00"; };
|
2021-09-23 16:45:06 +02:00
|
|
|
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
|
2021-09-22 10:16:11 +02:00
|
|
|
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
|
2021-09-27 14:55:55 +02:00
|
|
|
user = "postgres";
|
2021-09-22 10:16:11 +02:00
|
|
|
};
|
|
|
|
"synapse" = {
|
|
|
|
paths = [ "/var/lib/matrix-synapse" ];
|
|
|
|
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/wind/synapse";
|
|
|
|
initialize = true;
|
|
|
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
|
|
|
|
timerConfig = { "OnCalendar" = "03:30"; };
|
2021-09-23 16:45:06 +02:00
|
|
|
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
|
2021-09-22 10:16:11 +02:00
|
|
|
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
|
2021-09-27 14:55:55 +02:00
|
|
|
user = "matrix-synapse";
|
2021-09-22 10:16:11 +02:00
|
|
|
};
|
2021-09-22 15:31:20 +02:00
|
|
|
"vaultwarden" = {
|
2021-09-27 14:55:55 +02:00
|
|
|
paths = [ "/var/lib/bitwarden_rs" ];
|
2021-09-22 15:31:20 +02:00
|
|
|
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/wind/vaultwarden";
|
|
|
|
initialize = true;
|
|
|
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
|
2021-09-23 08:34:01 +02:00
|
|
|
timerConfig = { "OnCalendar" = "23:45"; };
|
2021-09-23 16:45:06 +02:00
|
|
|
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
|
2021-09-22 15:31:20 +02:00
|
|
|
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
|
2021-09-27 14:55:55 +02:00
|
|
|
user = "vaultwarden";
|
2021-09-22 15:31:20 +02:00
|
|
|
};
|
2021-09-22 10:16:11 +02:00
|
|
|
};
|
|
|
|
}
|