fine-tune backup repo
This commit is contained in:
parent
c2bcbd7ba2
commit
e3d1d34f5b
@ -118,14 +118,17 @@ let ssh_pubkeys = {
|
||||
restic.backups = {
|
||||
var_lib = {
|
||||
paths = ["/var/lib/.snapshot-latest/gitea" "/var/lib/.snapshot-latest/headscale"];
|
||||
repository = "sftp:zh2769@zh2769.rsync.net:hel1-a.servers.jakst/var_lib";
|
||||
repository = "sftp:zh2769@zh2769.rsync.net:hel1-a.servers.jakst";
|
||||
initialize = true;
|
||||
passwordFile = "/var/src/secrets/restic/password";
|
||||
backupPrepareCommand = ''
|
||||
set -euo pipefail
|
||||
${pkgs.util-linux}/bin/umount /var/lib/.snapshot-latest || :
|
||||
mkdir -p /var/lib/.snapshot-latest
|
||||
${pkgs.util-linux}/bin/mount -t zfs $(${pkgs.zfs}/bin/zfs list -H -t snapshot -o name /var/lib | sort | tail -1) /var/lib/.snapshot-latest
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
set -euo pipefail
|
||||
${pkgs.util-linux}/bin/umount /var/lib/.snapshot-latest
|
||||
'';
|
||||
timerConfig = {
|
||||
|
Loading…
Reference in New Issue
Block a user