duplicity: add script to restore from backup

This commit is contained in:
colin 2022-11-21 11:47:07 +00:00
parent 439c7d9ef2
commit 8fc6b05c07

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# N.B. must be run as root
set -ex
dest_path="$1"
source_path="$2"
# source the URL; hack to satisfy resholve
external_cmd="source /run/secrets/duplicity_passphrase"
$external_cmd
duplicity restore --archive-dir /var/lib/duplicity --file-to-restore "$source_path" $DUPLICITY_URL "$dest_path"