aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-28 01:05:36 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-28 01:05:36 +0100
commit6533428a7b06fef01bebf1b8f93052884f77ea68 (patch)
treedadeea3cfdeed490a499f4c33cf1114fcc934f60
parent591ebd877b8d5465da95fd7e212da5ef747944ca (diff)
downloadNix-6533428a7b06fef01bebf1b8f93052884f77ea68.tar.gz
Nix-6533428a7b06fef01bebf1b8f93052884f77ea68.tar.zst
Nix-6533428a7b06fef01bebf1b8f93052884f77ea68.zip
Add crontab to send backup to immae.eu
Fixes https://git.immae.eu/mantisbt/view.php?id=80
-rw-r--r--nixops/eldiron.nix9
1 files changed, 9 insertions, 0 deletions
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 @@
89 source = ldap_authorized_keys; 89 source = ldap_authorized_keys;
90 }; 90 };
91 91
92 services.cron = {
93 enable = true;
94 systemCronJobs = [
95 ''
96 # The star after /var/lib/* avoids deleting all folders in case of problem
97 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:
98 ''
99 ];
100 };
92 }; 101 };
93} 102}