Repository Public
1#!/bin/zsh2# Pulls the (already encrypted) backups of the hosting node to another machine. Usage: scripts/offsite-pull.sh <node> <dest-dir>3set -euo pipefail4NODE="${1:?node}"; DEST="${2:?destination directory}"; mkdir -p "$DEST"; chmod 700 "$DEST"5rsync -a --delete "$NODE:backups/sp-vault/" "$DEST/"6echo "$(date -u +%FT%TZ) offsite copy ok: $(ls "$DEST" | grep -c dump.enc) dumps, $(du -sh "$DEST" | cut -f1)"7