fin backups

This commit is contained in:
2025-10-18 17:57:38 -05:00
parent 3eb9c9b402
commit 7fd8610476
26 changed files with 122 additions and 396 deletions

View File

@@ -5,7 +5,14 @@
inputs,
unstable_pkgs,
...
}: let
}:
/*
to restore database ensure it exists
sudo -u postgres psql -c "DROP DATABASE IF EXISTS immich; CREATE DATABASE immich;"
zstd -dc <path_to_backup> | sudo -u postgres psql -d immich
*/
let
service = "immich";
cfg = config.homelab.${service};
sec = config.sops.secrets;
@@ -111,7 +118,7 @@ in {
services.postgresqlBackup.databases = ["immich"]; # set to all databases defined in esure databases
# add to backups
homelab.baks = {
homelab.backups.baks = {
${service} = {paths = [cfg.data_dir "/var/lib/redis-immich" "/var/backup/postgresql/immich.sql.zstd"];};
};
};