1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-28 08:52:00 +02:00

Resolve #2794 Add restore for 'all'

This commit is contained in:
Timo Reymann 2019-09-08 10:54:21 +02:00
parent 87e99e53d9
commit 752f2417de
No known key found for this signature in database
GPG Key ID: 6874A594841A0138

View File

@ -211,6 +211,9 @@ elif [[ ${1} == "restore" ]]; then
echo "No datasets found"
exit 1
fi
echo "[ 0 ] all"
FILE_SELECTION[0]="vmail crypt rspamd postfix mysql redis"
for file in $(ls -f "${FOLDER_SELECTION[${input_sel}]}"); do
if [[ ${file} =~ vmail ]]; then
echo "[ ${i} ] - Mail directory (/var/vmail)"
@ -240,7 +243,7 @@ elif [[ ${1} == "restore" ]]; then
done
echo
input_sel=0
while [[ ${input_sel} -lt 1 || ${input_sel} -gt ${i} ]]; do
while [[ ${input_sel} -lt 0 || ${input_sel} -gt ${i} ]]; do
read -p "Select a dataset to restore: " input_sel
done
echo "Restoring ${FILE_SELECTION[${input_sel}]} from ${RESTORE_POINT}..."