eb07ab3613
Add the FUSE dependencies for our hosts backed up with borg, along with a small script to make mounting the backups easier. This is the best way to recover something quickly in what is sure to be a stressful situation. Documentation and testing is updated. Change-Id: I1f409b2df952281deedff2ff8f09e3132a2aff08
22 lines
509 B
Django/Jinja
22 lines
509 B
Django/Jinja
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Must specify backup host"
|
|
exit 1
|
|
fi
|
|
|
|
BORG="/opt/borg/bin/borg"
|
|
|
|
# Setting this, so the repo does not need to be given on the commandline:
|
|
export BORG_REPO="ssh://{{ borg_username}}@${1}/opt/backups/{{ borg_username }}/backup"
|
|
|
|
# some helpers and error handling:
|
|
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
|
|
|
|
info "Mounting backup to /opt/backups"
|
|
|
|
mkdir -p /opt/backups
|
|
$BORG mount $BORG_REPO /opt/backups
|
|
|
|
info "To unmount: $BORG umount /opt/backups"
|