#!/bin/bash set -euo pipefail backup_origin=${backup_origin:-"/backups/restic/"} backup_container=${backup_container:-"central-backup"} local_repository="$backup_container""-local" cd "$backup_origin" source openrc.sh export RESTIC_PASSWORD_FILE="$backup_container".pass export RESTIC_PASSWORD_FILE2="$local_repository".pass export RESTIC_REPOSITORY="swift:$backup_container:/restic" export RESTIC_REPOSITORY2="$backup_origin""$local_repository" # Higher connection count seems to help greatly with copy time restic copy -o swift.connections=100 -vv