hosts/plover: modularize Borg backup paths

This commit is contained in:
Gabriel Arazas 2023-07-02 12:23:50 +08:00
parent 752053b755
commit f27b7e045c
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
5 changed files with 14 additions and 14 deletions

View File

@ -196,20 +196,8 @@ in
services-backup = jobCommonSettings
{
paths = [
# Vaultwarden.
"/var/lib/bitwarden_rs"
# Gitea.
config.services.gitea.dump.backupDir
# PostgreSQL database dumps.
config.services.postgresqlBackup.location
# ACME accounts.
"/var/lib/acme/.lego/accounts"
# Zone files.
"/etc/bind/zones"
# ACME accounts and TLS certificates
"/var/lib/acme"
];
repo = borgRepo "services";
passCommand = "cat ${config.sops.secrets."plover/borg/repos/services/password".path}";

View File

@ -300,4 +300,7 @@ in
filter = named-refused[journalmatch='_SYSTEMD_UNIT=bind.service']
maxretry = 3
'';
# Add the following to be backed up.
services.borgbackup.jobs.services-backup.paths = [ zonesDir ];
}

View File

@ -207,4 +207,7 @@ in
"L+ ${giteaCustomDir}/public/img/logo.svg - - - - ${../../files/gitea/logo.svg}"
"L+ ${giteaCustomDir}/public/img/logo.png - - - - ${../../files/gitea/logo.png}"
];
# Add the following files to be backed up.
services.borgbackup.jobs.services-backup.paths = [ config.services.gitea.dump.backupDir ];
}

View File

@ -75,4 +75,7 @@ in
security.acme.certs."${postgresqlDomain}".postRun = ''
systemctl restart postgresql.service
'';
# Add the dumps to be backed up.
services.borgbackup.jobs.services-backup.paths = [ config.services.postgresqlBackup.location ];
}

View File

@ -195,4 +195,7 @@ in
ignoreregex =
'';
};
# Add the data directory to be backed up.
services.borgbackup.jobs.services-backup.paths = [ "/var/lib/bitwarden_rs" ];
}