public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
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
Make restore not only find .tar.gz but also .gz for mysql backup (#3113)
* Make restore not only find .tar.gz but also .gz for mysql backup * Fix coment for changed restore * Fix cosmetic for selection
34532073
helper-scripts/backup_and_restore.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Diff
diff --git a/helper-scripts/backup_and_restore.sh b/helper-scripts/backup_and_restore.sh
index cf590f21..6f77cab0 100755
--- a/helper-scripts/backup_and_restore.sh
+++ b/helper-scripts/backup_and_restore.sh
@@ -220,9 +220,9 @@ elif [[ ${1} == "restore" ]]; then
exit 1
fi
- echo "[ 0 ] all"
- # find all files in folder with .tar.gz extension, print their base names, remove backup_, remove .tar, remove .gz
- FILE_SELECTION[0]=$(find "${FOLDER_SELECTION[${input_sel}]}" -type f -name "*.tar.gz" -printf "%f\n" | sed 's/backup_*//' | sed 's/\.[^.]*$//' | sed 's/\.[^.]*$//')
+ echo "[ 0 ] - all"
+ # find all files in folder with *.gz extension, print their base names, remove backup_, remove .tar (if present), remove .gz
+ FILE_SELECTION[0]=$(find "${FOLDER_SELECTION[${input_sel}]}" -type f -name '*.gz' -printf '%f\n' | sed 's/backup_*//' | sed 's/\.[^.]*$//' | sed 's/\.[^.]*$//')
for file in $(ls -f "${FOLDER_SELECTION[${input_sel}]}"); do
if [[ ${file} =~ vmail ]]; then
echo "[ ${i} ] - Mail directory (/var/vmail)"