diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-28 01:05:36 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-28 01:05:36 +0100 |
commit | 6533428a7b06fef01bebf1b8f93052884f77ea68 (patch) | |
tree | dadeea3cfdeed490a499f4c33cf1114fcc934f60 | |
parent | 591ebd877b8d5465da95fd7e212da5ef747944ca (diff) | |
download | Nix-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.nix | 9 |
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 | } |