From 38fb9c424fbc96b20471d78fa6ac5e835263c3bb Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Fri, 15 Sep 2023 08:53:24 +1000 Subject: [PATCH] Added a restore helper script --- restore.sh | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 restore.sh diff --git a/restore.sh b/restore.sh new file mode 100755 index 0000000..92faab6 --- /dev/null +++ b/restore.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# Support script for restoring individual directories and files +# + +CONFIG=/etc/duplicity-daily.conf +eval $(grep ^TARGET= $CONFIG) +eval $(grep ^OPTIONS= $CONFIG) +: ${RESTORE:=/restore} + +SRCS=( $(grep ^/ $CONFIG) ) +if [ -z "$SRCS" ] ; then + cat < $LIST + +echo + +# Restore pathname $1 +restore() { + local X + cat <