aboutsummaryrefslogtreecommitdiffstats
path: root/ops/backups.md
diff options
context:
space:
mode:
Diffstat (limited to 'ops/backups.md')
-rw-r--r--ops/backups.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/ops/backups.md b/ops/backups.md
index 74de1ec..da09436 100644
--- a/ops/backups.md
+++ b/ops/backups.md
@@ -36,12 +36,13 @@ report to the [ops mailing list][ops ml].
We have an off-site backup system in a separate datacenter (in a different city)
from our primary datacenter. We use borg backup to send backups to this server,
-typically hourly. The standard backup script is:
+typically hourly. The standard backup script looks something like this, but is
+tweaked for each service:
```
#!/bin/sh -eu
-export BORG_REPO='ssh://CHANGE ME@konpaku.sr.ht/~/backup'
-export BORG_PASSPHRASE='CHANGE ME'
+export BORG_REPO='ssh://gitsrht@konpaku.sr.ht/~/backup'
+export BORG_PASSPHRASE='redacted'
backup_start="$(date -u +'%s')"
@@ -76,21 +77,21 @@ stats() {
printf 'backup_duration{instance="git.sr.ht"} %d\n' "$((backup_end-backup_start))"
}
-stats | curl --data-binary @- https://push.metrics.sr.ht/metrics/job/CHANGE ME
+stats | curl --data-binary @- https://push.metrics.sr.ht/metrics/job/git.sr.ht
```
Our `check` script is:
```
#!/bin/sh -eu
-export BORG_REPO='ssh://CHANGE ME@konpaku.sr.ht/~/backup'
-export BORG_PASSPHRASE='CHANGE ME'
+export BORG_REPO='ssh://gitsrht@konpaku.sr.ht/~/backup'
+export BORG_PASSPHRASE='redacted'
check() {
cat <<-EOF
To: SourceHut Ops <~sircmpwn/sr.ht-ops@lists.sr.ht>
- From: CHANGE ME backups <borg@git.sr.ht>
- Subject: CHANGE ME backups report $(date)
+ From: git.sr.ht backups <borg@git.sr.ht>
+ Subject: git.sr.ht backups report $(date)
EOF
borg check --last 2 --info 2>&1