From 6533428a7b06fef01bebf1b8f93052884f77ea68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 28 Jan 2019 01:05:36 +0100 Subject: Add crontab to send backup to immae.eu Fixes https://git.immae.eu/mantisbt/view.php?id=80 --- nixops/eldiron.nix | 9 +++++++++ 1 file changed, 9 insertions(+) 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: + '' + ]; + }; }; } -- cgit v1.2.3