projects
/
rrq
/
buckap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
38fb9c4
)
Create restoration base as needed
author
Ralph Ronnquist
<rrq@rrq.au>
Fri, 22 Sep 2023 12:07:28 +0000
(22:07 +1000)
committer
Ralph Ronnquist
<rrq@rrq.au>
Fri, 22 Sep 2023 12:07:28 +0000
(22:07 +1000)
restore.sh
patch
|
blob
|
history
diff --git
a/restore.sh
b/restore.sh
index 92faab62e392d7c20a484444bbf04a10ebfb9858..872a9eba12bc0d13c70e29f322a6a4237ead7874 100755
(executable)
--- a/
restore.sh
+++ b/
restore.sh
@@
-60,20
+60,21
@@
Options = $OPTIONS
EOF
read -p "Go ahead [Yn]?" X
[ "$X" = n ] && return 0
EOF
read -p "Go ahead [Yn]?" X
[ "$X" = n ] && return 0
+ mkdir -p "$RESTORE/$TIME$BASE" || return 1
duplicity restore $OPTIONS --file-to-restore "$1" --time "$TIME" \
"pexpect+scp://$URI" "$RESTORE/$TIME$BASE/$1"
}
# $1 root
browse() {
duplicity restore $OPTIONS --file-to-restore "$1" --time "$TIME" \
"pexpect+scp://$URI" "$RESTORE/$TIME$BASE/$1"
}
# $1 root
browse() {
- local X
Y
+ local X
while true ; do
X="$(grep -oE "^$1[^/]*/?" < $LIST | uniq | iselect -fa)"
[ -z "$X" ] && break
if [ -z "${X##*/}" ] ; then
browse "$X"
else
while true ; do
X="$(grep -oE "^$1[^/]*/?" < $LIST | uniq | iselect -fa)"
[ -z "$X" ] && break
if [ -z "${X##*/}" ] ; then
browse "$X"
else
- restore "$X"
+ restore "$X"
|| read -p "push enter" X
fi
done
}
fi
done
}