obs-portal: add backups to garage bucket
All checks were successful
Flake checks / Check (pull_request) Successful in 4m57s

Restic backups to garage S3 bucket nachtigall-backups
This commit is contained in:
teutat3s 2024-08-25 03:29:25 +02:00
parent b6be95d032
commit eb28d9ec23
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
5 changed files with 80 additions and 0 deletions

View file

@ -10,4 +10,14 @@
mode = "400";
owner = "root";
};
age.secrets.restic-repo-garage-nachtigall = {
file = "${flake.self}/secrets/restic-repo-garage-nachtigall.age";
mode = "400";
owner = "root";
};
age.secrets.restic-repo-garage-nachtigall-env = {
file = "${flake.self}/secrets/restic-repo-garage-nachtigall-env.age";
mode = "400";
owner = "root";
};
}

View file

@ -147,4 +147,29 @@ in
};
};
};
services.restic.backups.obs-portal-garage = {
paths = [
"/var/lib/obs-portal/data"
"/tmp/obs-portal-backup.sql"
];
timerConfig = {
OnCalendar = "*-*-* 00:30:00 Etc/UTC";
};
initialize = true;
passwordFile = config.age.secrets."restic-repo-garage-nachtigall".path;
environmentFile = config.age.secrets."restic-repo-garage-nachtigall-env".path;
repository = "s3:https://buckets.pub.solar/obs-portal-backups";
backupPrepareCommand = ''
${pkgs.docker}/bin/docker exec -ti --user postgres obs-portal-db pg_dump obs > /tmp/obs-portal-backup.sql
'';
backupCleanupCommand = ''
rm /tmp/obs-portal-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}

Binary file not shown.

View file

@ -0,0 +1,43 @@
age-encryption.org/v1
-> ssh-ed25519 iDKjwg yk6WgkJbk16Yqc/aWojwDePfNZN3XgaiacpZqufw1hc
qx3x0zCUB6l7qPS9R9xGO41s6ESGsNd/ixglY4gYDtY
-> ssh-ed25519 uYcDNw nDZXlykiDEZIA+Srg6imZFRLAzhykR3PDVrfWb693Sg
MBJrrXbtLzBozetgfZaE52o1ixsrPK6Ojdp8sXhI3dc
-> ssh-rsa f5THog
WngnjCboeUafoR5NOg/+NFeW/ILxonIrcl7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
"restic-repo-droppie.age".publicKeys = nachtigallKeys ++ adminKeys;
"restic-repo-storagebox.age".publicKeys = nachtigallKeys ++ adminKeys;
"restic-repo-garage-nachtigall.age".publicKeys = nachtigallKeys ++ adminKeys;
"restic-repo-garage-nachtigall-env.age".publicKeys = nachtigallKeys ++ adminKeys;
"drone-db-secrets.age".publicKeys = flora6Keys ++ adminKeys;
"drone-secrets.age".publicKeys = flora6Keys ++ adminKeys;