feat(servers): add automatic backups using restic.

This commit is contained in:
CronyAkatsuki 2025-06-24 18:07:43 +02:00
parent 1eab73b20a
commit e6d21b8850
13 changed files with 74 additions and 2 deletions

View file

@ -38,4 +38,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/crafty-controller"];
server.paths = ["/var/lib/crafty-controller"];
};
} }

View file

@ -19,4 +19,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/audiobookshelf"];
server.paths = ["/var/lib/audiobookshelf"];
};
} }

View file

@ -24,4 +24,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/navidrome"];
server.paths = ["/var/lib/navidrome"];
};
} }

View file

@ -24,4 +24,16 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.postgresqlBackup = {
enable = true;
databases = [
"immich"
];
};
services.restic.backups = {
local.paths = ["/var/lib/immich" "/var/backup/postgresql"];
server.paths = ["/var/lib/immich" "/var/backup/postgresql"];
};
} }

View file

@ -27,8 +27,8 @@ in {
server = { server = {
initialize = true; initialize = true;
passwordFile = config.age.secrets.restic-server-pass.path; passwordFile = config.age.secrets.restic-server-pass.path;
repositoryFile = config.age.secrets.restic-server-pass.path; repositoryFile = config.age.secrets.restic-server-repo.path;
environmentFile = config.age.secrets.restic-server-pass.path; environmentFile = config.age.secrets.restic-server-env.path;
paths = opts.paths; paths = opts.paths;
pruneOpts = opts.pruneOpts; pruneOpts = opts.pruneOpts;
checkOpts = opts.checkOpts; checkOpts = opts.checkOpts;

View file

@ -44,4 +44,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/beszel"];
server.paths = ["/var/lib/beszel"];
};
} }

View file

@ -25,4 +25,14 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.postgresqlBackup = {
enable = true;
databases = ["miniflux"];
};
services.restic.backups = {
local.paths = ["/var/backup/postgresql"];
server.paths = ["/var/backup/postgresql"];
};
} }

View file

@ -26,4 +26,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/syncyomi"];
server.paths = ["/var/lib/syncyomi"];
};
} }

View file

@ -54,4 +54,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/upfast"];
server.paths = ["/var/lib/upfast"];
};
} }

View file

@ -30,4 +30,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/wallabag"];
server.paths = ["/var/lib/wallabag"];
};
} }

View file

@ -22,4 +22,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/changedetection-io"];
server.paths = ["/var/lib/changedetection-io"];
};
} }

View file

@ -38,4 +38,9 @@
AllowUsers = ["forgejo"]; AllowUsers = ["forgejo"];
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/forgejo"];
server.paths = ["/var/lib/forgejo"];
};
} }

View file

@ -15,4 +15,9 @@
entrypoints = "websecure"; entrypoints = "websecure";
}; };
}; };
services.restic.backups = {
local.paths = ["/var/lib/lemmy"];
server.paths = ["/var/lib/lemmy"];
};
} }