mailcow / mailcow-dockerized

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

backup_and_restore.sh sql backup echoed to terminal #3412

Open Mycah opened 4 years ago

Mycah commented 4 years ago

Prior to placing the issue, please check following: (fill out each checkbox with an X once done)

Description of the bug:

I have a cronjob that does a backup every night that pipe the backup output to a file that is archived.
backup_and_restore.sh backup all > logfile.txt A few days ago I started getting data coming to stdout instead of the file, since my backup jobs run through cron and pipe to a report I usually only see stderr in my cron emails, but that is no longer the case.

Seems to be related to this commit: https://github.com/mailcow/mailcow-dockerized/commit/a1156c38fc03ad454a139f0be0da446e192fc527#diff-eb10ec60ac73ac11924fa7b0e9fb6109

Thanks!

Docker container logs of affected containers:

N/A

Reproduction of said bug:

run a backup that includes sql and pipe it to a file.

System information:

Question Answer
My operating system Ubuntu 18.04.4 LTS
Is Apparmor, SELinux or similar active? No
Virtualization technlogy (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported No
Server/VM specifications (Memory, CPU Cores) 16gb ram, 4 cores
Docker Version (docker version) 19.03.7
Docker-Compose Version (docker-compose version) 1.25.4
Reverse proxy (custom solution) caddy
andryyy commented 4 years ago

Looks like it is streamed to stderr, cannot change that.

heavygale commented 3 years ago

Should be fixed/avoidable with https://github.com/mailcow/mailcow-dockerized/pull/4005.