periodically archive my torrents so i don't lose them again

This commit is contained in:
colin 2022-12-06 07:17:19 +00:00
parent ccaac901f7
commit c2db9fe28e

View File

@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
sane.impermanence.service-dirs = [
@ -46,5 +46,20 @@
NetworkNamespacePath = "/run/netns/ovpns";
LogLevelMax = "warning";
};
# service to automatically backup torrents i add to transmission
systemd.services.backup-torrents = {
description = "archive torrents to storage not owned by transmission";
script = ''
${pkgs.rsync}/bin/rsync -arv /var/lib/transmission/.config/transmission-daemon/torrents/ /var/backup/torrents/
'';
};
systemd.timers.backup-torrents = {
wantedBy = [ "multi-user.target" ];
timerConfig = {
OnStartupSec = "11min";
OnUnitActiveSec = "240min";
};
};
}