]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add crontab to send backup to immae.eu
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 28 Jan 2019 00:05:36 +0000 (01:05 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 28 Jan 2019 00:05:36 +0000 (01:05 +0100)
Fixes https://git.immae.eu/mantisbt/view.php?id=80

nixops/eldiron.nix

index 7ce33a927f194985f9f3e0b2199d9e8baa63afcb..b54702e68e71d2460c35174a97150aad1aae0083 100644 (file)
       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:
+        ''
+      ];
+    };
   };
 }