mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
restic: Add dedicated paths option
This commit is contained in:
parent
2761fc8953
commit
7e25a91691
7 changed files with 19 additions and 17 deletions
|
|
@ -17,17 +17,18 @@ in
|
|||
|
||||
config = lib.mkIf cfg.doBackups {
|
||||
custom.services.resticBackups.nextcloud = {
|
||||
paths = [
|
||||
"${dataDir}/data"
|
||||
"${dataDir}/config/config.php"
|
||||
"${dataDir}/db.dump"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = ''
|
||||
${nextcloud-occ} maintenance:mode --on
|
||||
${lib.getExe pkgs.sudo} --user=${user} ${lib.getExe' config.services.postgresql.package "pg_dump"} nextcloud --format=custom --file=${dataDir}/db.dump
|
||||
'';
|
||||
backupCleanupCommand = "${nextcloud-occ} maintenance:mode --off";
|
||||
paths = [
|
||||
"${dataDir}/data"
|
||||
"${dataDir}/config/config.php"
|
||||
"${dataDir}/db.dump"
|
||||
];
|
||||
};
|
||||
|
||||
restoreCommand = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue