mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
vanadium: setup systemd backup service
This commit is contained in:
parent
60b130a65d
commit
72bcb6d137
4 changed files with 68 additions and 14 deletions
|
|
@ -63,6 +63,7 @@
|
|||
restic_backblaze_env.file = ../../../secrets/restic_backblaze_env.age;
|
||||
|
||||
seagate_pwd.file = ../../../secrets/seagate_pwd.age;
|
||||
restic_seagate_pwd.file = ../../../secrets/restic_seagate_pwd.age;
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,55 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.restic.backups."Documents-backblaze" = {
|
||||
paths = [
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
];
|
||||
|
||||
passwordFile = config.age.secrets.restic_backblaze_pwd.path;
|
||||
repositoryFile = config.age.secrets.restic_backblaze_repo.path;
|
||||
environmentFile = config.age.secrets.restic_backblaze_env.path;
|
||||
services.restic.backups = {
|
||||
|
||||
"Documents-backblaze" = {
|
||||
paths = [
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
];
|
||||
|
||||
passwordFile = config.age.secrets.restic_backblaze_pwd.path;
|
||||
repositoryFile = config.age.secrets.restic_backblaze_repo.path;
|
||||
environmentFile = config.age.secrets.restic_backblaze_env.path;
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
};
|
||||
|
||||
"Music-seagate" = {
|
||||
paths = [
|
||||
"/home/leana/Music"
|
||||
];
|
||||
|
||||
repository = "/mnt/seagate/restic";
|
||||
passwordFile = config.age.secrets.restic_seagate_pwd.path;
|
||||
|
||||
timerConfig = {
|
||||
onCalendar = "02:00";
|
||||
};
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
};
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."restic-backups-Music-seagate" = {
|
||||
requires = [ "mnt-seagate.mount" ];
|
||||
after = [ "mnt-seagate.mount" ];
|
||||
unitConfig = {
|
||||
PropagatesStopTo = [ "mnt-seagate.mount" ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue