summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2018-10-09 10:05:59 -0400
committerJoey Hess2018-10-09 10:05:59 -0400
commiteda94ac1e7f56c00f5beb86cc7caa7d4de45fdaa (patch)
treea5c982de9bb638e4abea05a33670207ea97d694f
parent900fec76cdbd24a3c3f4304198dd4afd9a87c8d3 (diff)
propellor spin
-rw-r--r--joeyconfig.hs12
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs6
2 files changed, 14 insertions, 4 deletions
diff --git a/joeyconfig.hs b/joeyconfig.hs
index 15f0aeb4..cb2ef8e1 100644
--- a/joeyconfig.hs
+++ b/joeyconfig.hs
@@ -250,13 +250,15 @@ kite = host "kite.kitenet.net" $ props
& Apt.serviceInstalledRunning "ntp"
& "/etc/timezone" `File.hasContent` ["US/Eastern"]
- & Borg.backup "/" (Borg.BorgRepo "joey@eubackup.kitenet.net:/home/joey/lib/backup/kite/kite.borg") Cron.Daily
+ & Borg.backup "/" (JoeySites.rsyncNetBorgRepo "kite.borg") Cron.Daily
[ "--exclude=/proc/*"
, "--exclude=/sys/*"
, "--exclude=/run/*"
, "--exclude=/tmp/*"
, "--exclude=/var/tmp/*"
, "--exclude=/var/cache/*"
+ , "--exclude=/var/lib/swapspace/*"
+ , "--exclude=/var/lib/container/*"
, "--exclude=/home/joey/lib"
-- These directories are backed up and restored separately.
, "--exclude=/srv/git"
@@ -266,7 +268,7 @@ kite = host "kite.kitenet.net" $ props
, Borg.KeepWeeks 4
, Borg.KeepMonths 6
]
- `requires` Ssh.knownHost hosts "eubackup.kitenet.net" (User "root")
+ `requires` Ssh.knownHost hosts "usw-s002.rsync.net" (User "root")
`requires` Ssh.userKeys (User "root")
(Context "kite.kitenet.net")
[ (SshRsa, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5Gza2sNqSKfNtUN4dN/Z3rlqw18nijmXFx6df2GtBoZbkIak73uQfDuZLP+AXlyfHocwdkdHEf/zrxgXS4EokQMGLZhJ37Pr3edrEn/NEnqroiffw7kyd7EqaziA6UOezcLTjWGv+Zqg9JhitYs4WWTpNzrPH3yQf1V9FunZnkzb4gJGndts13wGmPEwSuf+QHbgQvjMOMCJwWSNcJGdhDR66hFlxfG26xx50uIczXYAbgLfHp5W6WuR/lcaS9J6i7HAPwcsPDA04XDinrcpl29QwsMW1HyGS/4FSCgrDqNZ2jzP49Bka78iCLRqfl1efyYas/Zo1jQ0x+pxq2RMr root@kite")
@@ -612,8 +614,10 @@ myDnsPrimary domain extras = Dns.signedPrimary (Weekly Nothing) hosts domain
, JoeySites.domainKey
] ++ extras
-monsters :: [Host] -- Systems I don't manage with propellor,
-monsters = -- but do want to track their public keys etc.
+-- Systems I don't manage with propellor,
+-- but do want to track their public keys etc.
+monsters :: [Host]
+monsters =
[ host "usw-s002.rsync.net" $ props
& Ssh.hostPubKey SshEd25519 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB7yTEBGfQYdwG/oeL+U9XPMIh/dW7XNs9T+M79YIOrd"
, host "github.com" $ props
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 4b3b06ad..cc7d19af 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -1317,3 +1317,9 @@ autoMountDrive label (USBHubPort port) malias = propertyList desc $ props
[ "stop " ++ mountpoint
, "start " ++ mountpoint
]
+
+rsyncNetBorgRepo :: String -> Borg.BorgRepo
+rsyncNetBorgRepo d = Borg.BorgRepoUsing
+ -- rsync.net has a newer borg here
+ [ Borg.UsesEnvVar ("BORG_REMOTE_PATH", "borg1")
+ ] ("2318@usw-s002.rsync.net:" ++ d)