From: Ismaƫl Bouya Date: Mon, 28 Jan 2019 00:05:36 +0000 (+0100) Subject: Add crontab to send backup to immae.eu X-Git-Tag: nur_publish~279 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=6533428a7b06fef01bebf1b8f93052884f77ea68;p=perso%2FImmae%2FConfig%2FNix.git Add crontab to send backup to immae.eu Fixes https://git.immae.eu/mantisbt/view.php?id=80 --- diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 7ce33a9..b54702e 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix @@ -89,5 +89,14 @@ source = ldap_authorized_keys; }; + services.cron = { + enable = true; + systemCronJobs = [ + '' + # The star after /var/lib/* avoids deleting all folders in case of problem + 0 3,9,15,21 * * * root rsync -e "ssh -i /root/.ssh/id_charon_vpn" -aAXvz --delete --numeric-ids --super --rsync-path="sudo rsync" /var/lib/* immae@immae.eu: + '' + ]; + }; }; }