[MDEV-25929] Mariabackup stderr Created: 2021-06-15  Updated: 2024-01-29  Resolved: 2023-07-23

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.3.27
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Luca Assignee: Unassigned
Resolution: Incomplete Votes: 1
Labels: None
Environment:

Debian Buster, MariaDB 10.3.27



 Description   

Hi,
if i execute "/usr/bin/mariabackup --backup --target-dir=/backup/mariadb --user=root > out 2>error" all the good output go to error (stderr). It seems that the default output is to stderr.
thank you
Luca



 Comments   
Comment by Tilman Vogel [ 2023-05-16 ]

This is a problem for us when running `mariabackup` from cron using the wonderful https://habilis.net/cronic/ wrapper.

Comment by Tilman Vogel [ 2023-05-16 ]

Of course, writing diagnostics to stderr is necessary when using --stream, so a useful idiom is

(mariabackup --backup --target-dir=<target-dir> --user=<user> --stream=mbstream | xz -1 > backup.stream.xz) 2>&1

Do not forget the parentheses, otherwise, you'll redirect xz's stderr into your backup.stream.xz which is not what you want and might break your backup.

Comment by Sergei Golubchik [ 2023-06-19 ]

I'm not sure I understand what is the bug. That diagnostics is printed to stderr and not stdout?

Comment by Nikita Borisenkov [ 2024-01-29 ]

Yes, the bug is that information messages are printed to stderr and not stdout

UPD: I found that this is how it was intended: https://perconadev.atlassian.net/browse/PXB-1469

Generated at Thu Feb 08 09:41:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.