diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-03-05 17:12:30 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-03-05 17:12:30 -0500 |
commit | 341931b78c387c751b43b6c490d962c2886a2541 (patch) | |
tree | 4a8641f9d77a6d0961a27fecf3ea34c5d1183468 | |
parent | 0b3db4ca2e161c78d9d5e7f4d6fe924298c0f4a0 (diff) | |
download | sr.ht-docs-341931b78c387c751b43b6c490d962c2886a2541.tar.gz |
Update ops/backups.md
-rw-r--r-- | ops/backups.md | 17 |
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 |