feat: utilise borgmatic to back up several services
/srv folder immich database miniflux database paperless database syncthing database
This commit is contained in:
parent
3a679356ad
commit
649f6d048b
5 changed files with 44 additions and 28 deletions
|
|
@ -16,6 +16,18 @@ in
|
|||
mediaLocation = "/srv/immich";
|
||||
};
|
||||
|
||||
# database backup
|
||||
borgmatic.settings = {
|
||||
postgresql_databases = [
|
||||
{
|
||||
name = "immich";
|
||||
hostname = "localhost";
|
||||
username = "root";
|
||||
password = "{credential systemd borgmatic-pg}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nginx = {
|
||||
clientMaxBodySize = "50000M";
|
||||
virtualHosts."${feature}.fi33.buzz" = {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,18 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# database backup
|
||||
borgmatic.settings = {
|
||||
postgresql_databases = [
|
||||
{
|
||||
name = "miniflux";
|
||||
hostname = "localhost";
|
||||
username = "root";
|
||||
password = "{credential systemd borgmatic-pg}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# reverse proxy
|
||||
nginx = {
|
||||
virtualHosts."${feature}.fi33.buzz" = {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,18 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# database backup
|
||||
borgmatic.settings = {
|
||||
postgresql_databases = [
|
||||
{
|
||||
name = "paperless";
|
||||
hostname = "localhost";
|
||||
username = "root";
|
||||
password = "{credential systemd borgmatic-pg}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# reverse proxy
|
||||
nginx = {
|
||||
virtualHosts."${feature}.fi33.buzz" = {
|
||||
|
|
|
|||
|
|
@ -63,24 +63,14 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# backup
|
||||
borgbackup.jobs =
|
||||
# we only need one syncthing host to be backed up
|
||||
# choose server because borgbackup is the most fleshed out
|
||||
# on srv currently
|
||||
borgmatic.settings =
|
||||
if userName == "srv" then
|
||||
import ../backup.nix feature
|
||||
{
|
||||
paths = [
|
||||
"/home/srv/.config/syncthing"
|
||||
"/home/srv/Sync"
|
||||
];
|
||||
}
|
||||
{
|
||||
inherit config;
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
}
|
||||
{
|
||||
source_directories = [
|
||||
"/home/srv/.config/syncthing"
|
||||
"/home/srv/Sync"
|
||||
];
|
||||
}
|
||||
else
|
||||
null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue