NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

Resolve #2794 Add restore for 'all'

752f2417
Timo Reymann <[email protected]> 7 years ago
helper-scripts/backup_and_restore.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Diff

diff --git a/helper-scripts/backup_and_restore.sh b/helper-scripts/backup_and_restore.sh
index 5054d6ee..24ff5f5a 100755
--- a/helper-scripts/backup_and_restore.sh
+++ b/helper-scripts/backup_and_restore.sh
@@ -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}..."