duplicity: add script to restore from backup
This commit is contained in:
parent
439c7d9ef2
commit
8fc6b05c07
13
pkgs/sane-scripts/src/sane-backup-restore
Executable file
13
pkgs/sane-scripts/src/sane-backup-restore
Executable 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"
|
Loading…
Reference in New Issue
Block a user