summaryrefslogtreecommitdiff
path: root/src/Propellor/Property
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property')
-rw-r--r--src/Propellor/Property/SiteSpecific/Branchable.hs36
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs8
2 files changed, 18 insertions, 26 deletions
diff --git a/src/Propellor/Property/SiteSpecific/Branchable.hs b/src/Propellor/Property/SiteSpecific/Branchable.hs
index 7675fc35..4f8c3ad6 100644
--- a/src/Propellor/Property/SiteSpecific/Branchable.hs
+++ b/src/Propellor/Property/SiteSpecific/Branchable.hs
@@ -9,6 +9,7 @@ import qualified Propellor.Property.Postfix as Postfix
import qualified Propellor.Property.Sudo as Sudo
import qualified Propellor.Property.Borg as Borg
import qualified Propellor.Property.Cron as Cron
+import Propellor.Property.SiteSpecific.JoeySites (rsyncNetBorgRepo)
server :: [Host] -> Property (HasInfo + DebianLike)
server hosts = propertyList "branchable server" $ props
@@ -38,27 +39,26 @@ server hosts = propertyList "branchable server" $ props
& Postfix.installed
& Postfix.mainCf ("mailbox_command", "procmail -a \"$EXTENSION\"")
- & Borg.backup "/" (Borg.BorgRepo "joey@eubackup.kitenet.net:/home/joey/lib/backup/branchable/pell.borg") Cron.Daily
- [ "--exclude=/proc/*"
- , "--exclude=/sys/*"
- , "--exclude=/run/*"
- , "--exclude=/tmp/*"
- , "--exclude=/var/tmp/*"
- , "--exclude=/var/backups/ikiwiki-hosting-web/*"
- , "--exclude=/var/cache/*"
- , "--exclude=/home/*/source/*"
- , "--exclude=/home/*/public_html/*"
- , "--exclude=/home/*/.git/*"
- ]
- [ Borg.KeepDays 7
- , Borg.KeepWeeks 5
- , Borg.KeepMonths 12
- , Borg.KeepYears 1
- ]
+ -- & Borg.backup "/" (rsyncNetBorgRepo "pell.borg" []) Cron.Daily
+ -- [ "--exclude=/proc/*"
+ -- , "--exclude=/sys/*"
+ -- , "--exclude=/run/*"
+ -- , "--exclude=/tmp/*"
+ -- , "--exclude=/var/tmp/*"
+ -- , "--exclude=/var/backups/ikiwiki-hosting-web/*"
+ -- , "--exclude=/var/cache/*"
+ -- , "--exclude=/home/*/source/*"
+ -- , "--exclude=/home/*/public_html/*"
+ -- , "--exclude=/home/*/.git/*"
+ -- ]
+ -- [ Borg.KeepDays 7
+ -- , Borg.KeepWeeks 5
+ -- , Borg.KeepMonths 12
+ -- , Borg.KeepYears 1
+ -- ]
& Ssh.userKeys (User "root") (Context "branchable.com")
[ (SshRsa, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2PqTSupwncqeffNwZQXacdEWp7L+TxllIxH7WjfRMb3U74mQxWI0lwqLVW6Fox430DvhSqF1y5rJBvTHh4i49Tc9lZ7mwAxA6jNOP6bmdfteaKKYmUw5qwtJW0vISBFu28qBO11Nq3uJ1D3Oj6N+b3mM/0D3Y3NoGgF8+2dLdi81u9+l6AQ5Jsnozi2Ni/Osx2oVGZa+IQDO6gX8VEP4OrcJFNJe8qdnvItcGwoivhjbIfzaqNNvswKgGzhYLOAS5KT8HsjvIpYHWkyQ5QUX7W/lqGSbjP+6B8C3tkvm8VLXbmaD+aSkyCaYbuoXC2BoJdS7Jh8phKMwPJmdYVepn")
]
- & Ssh.knownHost hosts "eubackup.kitenet.net" (User "root")
& Ssh.knownHost hosts "usw-s002.rsync.net" (User "root")
& adminuser "joey"
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 0267e971..a18e4367 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -413,14 +413,6 @@ rsyncNetBackup hosts = Cron.niceJob "rsync.net copied in daily" (Cron.Times "30
(User "joey") "/home/joey/lib/backup" "mkdir -p rsync.net && rsync --delete -az 2318@usw-s002.rsync.net: rsync.net"
`requires` Ssh.knownHost hosts "usw-s002.rsync.net" (User "joey")
-backupsBackedupFrom :: [Host] -> HostName -> FilePath -> Property DebianLike
-backupsBackedupFrom hosts srchost destdir = Cron.niceJob desc
- (Cron.Times "@reboot") (User "joey") "/" cmd
- `requires` Ssh.knownHost hosts srchost (User "joey")
- where
- desc = "backups copied from " ++ srchost ++ " on boot"
- cmd = "sleep 30m && rsync -az --bwlimit=300K --partial --delete " ++ srchost ++ ":lib/backup/ " ++ destdir </> srchost
-
podcatcher :: Property DebianLike
podcatcher = Cron.niceJob "podcatcher run hourly" (Cron.Times "55 * * * *")
(User "joey") "/home/joey/lib/sound/podcasts"