aplysia: add backup cronjob
This commit is contained in:
parent
c21f3ee608
commit
cfad7061f8
24
aplysia.nix
24
aplysia.nix
@ -204,4 +204,28 @@ in
|
||||
${pkgs.hdparm}/bin/hdparm -B127 -S100 /dev/sd{a,b,c,d,e,f}
|
||||
'';
|
||||
|
||||
systemd.services.backup-fotos = rec {
|
||||
wants = [ "network.target" "mnt-aplysia.mount" ];
|
||||
after = wants;
|
||||
|
||||
serviceConfig = {
|
||||
User = "gebner";
|
||||
Group = "users";
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
script = ''
|
||||
${pkgs.rclone}/bin/rclone sync -v --update --use-server-modtime \
|
||||
/mnt/aplysia/fotos/lightroom/ \
|
||||
glacier:gebner-fotos-raw-backup/
|
||||
'';
|
||||
};
|
||||
systemd.timers.backup-fotos = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "Mon,Fri 03:00";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user