mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.75k stars 1.17k forks source link

backup and restore cannot use "10" threads #5938

Closed G2G2G2G closed 2 months ago

G2G2G2G commented 3 months ago

Contribution guidelines

I've found a bug and checked that ...

Description

backup/restore if you use "THREADS=10" you get "Thread input is not a number!"

I tried backup on bash shell and restore on fish shell (different machines)
I don't think the shell matters

Logs:

MAILCOW_BACKUP_LOCATION=/mnt/4tbhdd/mailcow/ THREADS=10 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all
Thread input is not a number!

Steps to reproduce:

https://docs.mailcow.email/backup_restore/b_n_r-backup/
just use "THREADS=10"

Which branch are you using?

master

Which architecture are you using?

x86

Operating System:

debian 10 and 12

Server/VM specifications:

8gb and 32gb of ram, 12 and 20 cpu cores

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

none on 1 system and kvm/qemu on other

Docker version:

newest

docker-compose version or docker compose version:

v2.28.1 and v2.7.0

mailcow version:

newest

Reverse proxy:

nginx

Logs of git diff:

unrelated

Logs of iptables -L -vn:

unrelated

Logs of ip6tables -L -vn:

unrelated

Logs of iptables -L -vn -t nat:

unrelated

Logs of ip6tables -L -vn -t nat:

unrelated

DNS check:

unrelated
mrclschstr commented 3 months ago

I think the regex in the script is wrong as it allows no zeroes at all: ^[1-9]+$

To allow numbers from 1 to 99 without a leading zero you could use something like this (source): ^([1-9][0-9]?)$

G2G2G2G commented 3 months ago

I think the [[:digit]] or just 0-9 is enough. don't think anyone is going to be trying decimal points for amount of threads lol

MAGICCC commented 3 months ago

Hm there is https://github.com/mailcow/mailcow-dockerized/pull/5634 Can we get this merged @DerLinkman?

G2G2G2G commented 2 months ago

Good find.. man stale bots kill a lot of useful stuff.

DerLinkman commented 2 months ago

Merged and will be part of next update (sorry missed to write that yesterday)