From b3feafcaef5c7e30e1bb9e39ef67f23673ba0112 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Wed, 1 May 2024 17:50:16 +0200 Subject: [PATCH] Add remote restic backup --- hosts/franz/restic.nix | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/hosts/franz/restic.nix b/hosts/franz/restic.nix index 7a0c481..ceba489 100644 --- a/hosts/franz/restic.nix +++ b/hosts/franz/restic.nix @@ -68,6 +68,7 @@ in { from: /storage/dataset/docker/dashboard to: - zfs + - eustachius cron: '0 4 * * 0' # Every Sunday at 4:00 hooks: before: @@ -78,6 +79,7 @@ in { from: /storage/dataset/docker/dns to: - zfs + - eustachius cron: '0 4 * * 0' # Every Sunday at 4:00 hooks: before: @@ -88,6 +90,7 @@ in { from: /storage/dataset/docker/feed to: - zfs + - eustachius cron: '0 4 * * 0' # Every Sunday at 4:00 hooks: before: @@ -99,6 +102,7 @@ in { to: - zfs - ssd + - eustachius cron: '0 4 * * *' # Every Day at 4:00 hooks: before: @@ -109,6 +113,7 @@ in { from: /storage/dataset/docker/media to: - zfs + - eustachius cron: '0 4 * * *' # Every Day at 4:00 hooks: before: @@ -120,6 +125,7 @@ in { to: - zfs - ssd + - eustachius cron: '0 4 * * *' # Every Day at 4:00 hooks: before: @@ -130,6 +136,7 @@ in { from: /storage/dataset/docker/smarthome to: - zfs + - eustachius cron: '0 4 * * 0' # Every Sunday at 4:00 hooks: before: @@ -141,6 +148,7 @@ in { to: - zfs - ssd + - eustachius cron: '0 4 * * *' # Every Day at 4:00 hooks: before: @@ -151,7 +159,33 @@ in { from: /storage/dataset/docker/matrix to: - zfs + - eustachius cron: '0 4 * * 0' # Every Sunday at 4:00 + hooks: + before: + - arion -f ${arionPath}/matrix/arion-compose.nix -p ${arionPath}/matrix/arion-pkgs.nix stop + after: + - arion -f ${arionPath}/matrix/arion-compose.nix -p ${arionPath}/matrix/arion-pkgs.nix start + music: + from: /storage/dataset/data/media/music + to: + - eustachius + cron: '0 4 * * 0' # Every Sunday at 4:00 + hooks: + before: + - arion -f ${arionPath}/media/arion-compose.nix -p ${arionPath}/media/arion-pkgs.nix stop + after: + - arion -f ${arionPath}/media/arion-compose.nix -p ${arionPath}/media/arion-pkgs.nix start + headscale: + from: /storage/dataset/docker/headscale + to: + - zfs + cron: '55 3 * * *' # Every Day at 3:55 + hooks: + before: + - arion -f ${arionPath}/headscale/arion-compose.nix -p ${arionPath}/headscale/arion-pkgs.nix stop + after: + - arion -f ${arionPath}/headscale/arion-compose.nix -p ${arionPath}/headscale/arion-pkgs.nix start backends: zfs: type: local @@ -162,8 +196,8 @@ in { path: /home/ghoscht/Backups key: '${config.sops.placeholder."autorestic/ssd_key"}' eustachius: - type: sftp - path: ghoscht@100.64.0.3:/mnt/Backups + type: rest + path: http://100.64.0.3:8000/Backups key: '${config.sops.placeholder."autorestic/eustachius_key"}' ''; };