mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 09:14:24 +01:00
Backup nextcloud to backblaze using restic
This commit is contained in:
parent
3b4022d233
commit
4168626450
4 changed files with 76 additions and 6 deletions
|
|
@ -23,8 +23,8 @@
|
|||
];
|
||||
|
||||
services.restic.backups.paperless = {
|
||||
inherit (config.services.paperless) user;
|
||||
initialize = true;
|
||||
inherit (config.services.paperless) user;
|
||||
|
||||
repository = "s3:https://s3.eu-central-003.backblazeb2.com/stork-atlas/paperless";
|
||||
environmentFile = config.sops.secrets."restic/environment".path;
|
||||
|
|
@ -48,14 +48,13 @@
|
|||
]
|
||||
}
|
||||
'';
|
||||
|
||||
paths = [ "${dataDir}/backup" ];
|
||||
};
|
||||
|
||||
users.users.paperless.extraGroups = [ "redis-paperless" ];
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "restore-paperless";
|
||||
name = "paperless-restore";
|
||||
text = ''
|
||||
sudo -u paperless restic-paperless restore --target / latest
|
||||
sudo -u paperless ${dataDir}/paperless-manage document_importer ${dataDir}/backup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue