Created
February 4, 2019 19:26
-
-
Save cransom/8efe056c6250387e42980a5ac539fe05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd.services.somemachine-rsync = { | |
after = [ | |
"zfs-import-tank.service" | |
]; | |
path = [ pkgs.rsync ]; | |
#this notifies another unit in case it fails, i get a text to my phone. | |
onFailure = [ | |
"unit-status@%n" | |
]; | |
script = '' | |
rsync -Hax --delete somemachine.example.com::root/ /tank/backup/somemachine/ | |
''; | |
}; | |
systemd.timers.somemachine-rsync = { | |
timerConfig.OnCalendar = "*-*-* 3:00:00"; | |
wantedBy = [ "timers.target" ]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment