move to backup
This commit is contained in:
parent
294dc66380
commit
a0e3d792a9
182 changed files with 156 additions and 103 deletions
40
bak/modules/restic/default.nix
Normal file
40
bak/modules/restic/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Root SSH
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host dnsc-storage
|
||||
AddKeysToAgent yes
|
||||
Hostname u295965.your-storagebox.de
|
||||
User u295965
|
||||
IdentityFile /root/.ssh/id_ed25519
|
||||
IdentitiesOnly yes
|
||||
Port 23
|
||||
'';
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
"dnsc-storage" = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic/dnsc-server";
|
||||
createWrapper = true;
|
||||
paths = [
|
||||
"/main/share"
|
||||
"/data/actual-server"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-last 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue