From d65a07c701bc693b546b3abdde7a4a912712c969 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Jun 2014 14:37:44 -0400 Subject: propellor spin --- config-joey.hs | 6 ++++-- src/Propellor/Property/Obnam.hs | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index 6d3505ed..1229d182 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -168,11 +168,13 @@ hosts = -- (o) ` & Hostname.sane & Postfix.satellite - -- Joey gets pocasts here. - & Apt.installed ["git-annex"] & alias "podcatcher.kitenet.net" + & Apt.installed ["git-annex"] & JoeySites.githubBackup + + & alias "eubackup.kitenet.net" + & Apt.installed ["obnam", "sshfs", "rsync"] & Docker.docked hosts "voltagex" diff --git a/src/Propellor/Property/Obnam.hs b/src/Propellor/Property/Obnam.hs index 32374b57..e5ef7365 100644 --- a/src/Propellor/Property/Obnam.hs +++ b/src/Propellor/Property/Obnam.hs @@ -38,8 +38,12 @@ data NumClients = OnlyClient | MultipleClients -- -- How awesome is that? backup :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Property -backup dir crontimes params numclients = cronjob `describe` desc +backup dir crontimes params numclients = backup' dir crontimes params numclients `requires` restored dir params + +-- | Does a backup, but does not automatically restore. +backup' :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Property +backup' dir crontimes params numclients = cronjob `describe` desc where desc = dir ++ " backed up by obnam" cronjob = Cron.niceJob ("obnam_backup" ++ dir) crontimes "root" "/" $ -- cgit v1.2.3