summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-07-17 15:06:24 -0400
committerJoey Hess2014-07-17 15:06:24 -0400
commitebb7353f49249967c219ed2aaffd9be8be70e6b8 (patch)
tree47104d0544440d531ee80a87f7bd0fb78d97a3f1
parent581ec5fb3344be5f246ee6c879c61530c40cd00a (diff)
propellor spin
-rw-r--r--config-joey.hs13
-rw-r--r--src/Propellor/Property/Obnam.hs4
2 files changed, 15 insertions, 2 deletions
diff --git a/config-joey.hs b/config-joey.hs
index 229286d7..d4af95ea 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -8,6 +8,7 @@ import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.Network as Network
import qualified Propellor.Property.Ssh as Ssh
+import qualified Propellor.Property.Gpg as Gpg
import qualified Propellor.Property.Cron as Cron
import qualified Propellor.Property.Sudo as Sudo
import qualified Propellor.Property.User as User
@@ -22,6 +23,7 @@ import qualified Propellor.Property.Apache as Apache
import qualified Propellor.Property.Postfix as Postfix
import qualified Propellor.Property.Service as Service
import qualified Propellor.Property.Grub as Grub
+import qualified Propellor.Property.Obnam as Obnam
import qualified Propellor.Property.HostingProvider.DigitalOcean as DigitalOcean
import qualified Propellor.Property.HostingProvider.CloudAtCost as CloudAtCost
import qualified Propellor.Property.HostingProvider.Linode as Linode
@@ -87,6 +89,17 @@ hosts = -- (o) `
& Apt.unattendedUpgrades
& Apt.installed ["systemd"]
& Ssh.hostKeys (Context "kitenet.net")
+ & Obnam.backup "/" "33 1 * * *"
+ [ "--repository=sftp://joey@eubackup.kitenet.net/~/lib/backup/kite.obnam"
+ , "--encrypt-with="
+ , "--exclude=/var/cache"
+ , "--exclude=/var/tmp"
+ , "--exclude=/home/joey/lib"
+ , "--exclude=.*/tmp/"
+ ] Obnam.OnlyClient
+ `requires` Gpg.keyImported "" "root"
+ `requires` Ssh.keyImported SshRsa "root"
+ (Context "kite.kitenet.net")
, standardSystem "diatom.kitenet.net" Stable "amd64"
[ "Important stuff that needs not too much memory or CPU." ]
diff --git a/src/Propellor/Property/Obnam.hs b/src/Propellor/Property/Obnam.hs
index 15a8494c..b5c6d776 100644
--- a/src/Propellor/Property/Obnam.hs
+++ b/src/Propellor/Property/Obnam.hs
@@ -33,8 +33,8 @@ data NumClients = OnlyClient | MultipleClients
-- > [ "--repository=sftp://2318@usw-s002.rsync.net/~/mygitrepos.obnam"
-- > , "--encrypt-with=1B169BE1"
-- > ] Obnam.OnlyClient
--- > `requires` Gpg.keyImported "1B169BE1" "root"
--- > `requires` Ssh.keyImported SshRsa "root"
+-- > `requires` Gpg.keyImported "1B169BE1" "root"
+-- > `requires` Ssh.keyImported SshRsa "root" (Context hostname)
--
-- How awesome is that?
backup :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Property