diff --git a/VPS/restic-backup.sh b/VPS/restic-backup.sh index 44c969c..3128457 100755 --- a/VPS/restic-backup.sh +++ b/VPS/restic-backup.sh @@ -1,7 +1,8 @@ #!/bin/bash # Use setcap'd binary in home directory -PATH="/home/restic/bin/:$PATH" +#PATH="/home/restic/bin/:$PATH" +# Now uses binary in /usr/bin, which is also setcap'd backup_origin="/backups/restic" backup_container="central-backup" diff --git a/VPS/restic-local-copy.sh b/VPS/restic-local-copy.sh new file mode 100755 index 0000000..fd51479 --- /dev/null +++ b/VPS/restic-local-copy.sh @@ -0,0 +1,19 @@ +#!/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