homeassistant: backup database
All checks were successful
flake / flake (push) Successful in 2m3s

This commit is contained in:
Jake Hillion 2024-11-06 00:40:59 +00:00
parent a3fd10be31
commit 0703d831c1
3 changed files with 36 additions and 11 deletions

View File

@ -14,19 +14,44 @@ in
owner = "hass";
group = "hass";
};
age.secrets."backups/homeassistant/restic/1.6T" = {
file = ../../secrets/restic/1.6T.age;
owner = "hass";
group = "hass";
};
services = {
restic.backups."homeassistant" = {
user = "hass";
timerConfig = {
OnCalendar = "03:00";
RandomizedDelaySec = "60m";
postgresqlBackup = {
enable = true;
compression = "none"; # for better diffing
databases = [ "homeassistant" ];
};
restic.backups = {
"homeassistant-config" = {
user = "hass";
timerConfig = {
OnCalendar = "03:00";
RandomizedDelaySec = "60m";
};
repository = "rest:https://restic.ts.hillion.co.uk/128G";
passwordFile = config.age.secrets."backups/homeassistant/restic/128G".path;
paths = [
config.services.home-assistant.configDir
];
};
"homeassistant-db" = {
user = "hass";
timerConfig = {
OnCalendar = "03:00";
RandomizedDelaySec = "60m";
};
repository = "rest:https://restic.ts.hillion.co.uk/128G";
passwordFile = config.age.secrets."backups/homeassistant/restic/128G".path;
paths = [
"${config.services.postgresqlBackup.location}/homeassistant.sql"
];
};
repository = "rest:https://restic.ts.hillion.co.uk/128G";
passwordFile = config.age.secrets."backups/homeassistant/restic/128G".path;
paths = [
config.services.home-assistant.configDir
];
};
};
};

Binary file not shown.

View File

@ -93,7 +93,7 @@ in
"restic/128G-wasabi.env.age".publicKeys = jake_users ++ [ ts.st.phoenix ];
"restic/128G-backblaze.env.age".publicKeys = jake_users ++ [ ts.st.phoenix ];
"restic/1.6T.age".publicKeys = jake_users ++ [ ts.st.phoenix ts.home.router ];
"restic/1.6T.age".publicKeys = jake_users ++ [ ts.st.phoenix ts.home.router ts.home.microserver ];
"restic/1.6T-wasabi.env.age".publicKeys = jake_users ++ [ ts.st.phoenix ];
"restic/1.6T-backblaze.env.age".publicKeys = jake_users ++ [ ts.st.phoenix ];