Change of proxmox-backup-client output makes cron annoying

Bubbagump210

Member
Oct 1, 2020
53
25
23
45
It appears somewhere between 2.2.1-1 and 2.2.4-1 the output formatting changed. Specifically previously running a cron with
Code:
proxmox-backup-client> /dev/null
gave no output to cron. Now cron is picking up the output of proxmox-backup-client as it appears it shows as an error and/or not going to stdout. Is there any documentation on this? Was this intentional? It's an issue now as I can't suppress successful backups even using a tool like Cronic which makes running proxmox-backup-client spammy/annoying. Is there a way to suppress output like a --quiet option?
Code:
proxmox-backup-client help backup
doesn't give any hints.
 
Last edited:
  • Like
Reactions: JohnTanner
Hey,

it is now controlled by the PBS_LOG environment variable, so PBS_LOG=error proxmox-backup-client .... Also described here [1], but you're right the help command should probably also contain that information. In general, you can redirect both stdout and stderr with command > /dev/null 2>&1.

[1] https://pbs.proxmox.com/docs/command-syntax.html
 
Last edited:
  • Like
Reactions: JohnTanner
Are there descriptions as to how each log level behaves? Ideally in my case there would only be output for errors so would I use “error”? I don’t want to suppress all output with > /dev/null 2>&1 as I want an alert if a job fails.
 
For a message to be shown it has to be at least as 'severe' as the log level. So if you set the log level to warn everything that is a warning or worse is shown(warnings and errors). In the description, they are ordered by severity(a > b = a is more severe than b), so:
error > warn > info > debug > trace
off
disables logging completely.
 
Hey,

it is now controlled by the PBS_LOG environment variable, so PBS_LOG=error proxmox-backup-client .... Also described here [1], but you're right the help command should probably also contain that information. In general, you can redirect both stdout and stderr with command > /dev/null 2>&1.

[1] https://pbs.proxmox.com/docs/command-syntax.html

I'm not sure of the syntax.

which of these should be used ?
Code:
export PBS_LOG='error proxmox-backup-client'

# or
export PBS_LOG='error'
 
Hi,

I tried with using PBS_LOG=error. It works but I still get the skipping mount point: "..." messages. How to suppress those? IMHO skipping a mount point is not an error but should be classified as warn or info?

Update
I also get warning: file size increased while reading: "...", file will be truncated! with PBS_LOG=error.

My script:
Bash:
#!/bin/bash
export PBS_REPOSITORY="...";
export PBS_PASSWORD="...";
export PBS_FINGERPRINT="...";
export PBS_LOG=error

proxmox-backup-client backup root.pxar:/ --include-dev /etc/pve --include-dev /boot --include-dev /boot/efi --exclude /var/lib/vz/dump/ --keyfile /etc/pve/priv/storage/xxx.enc

proxmox-backup-client version 2.2.5
 
Last edited:
Apologies for necro'ing this thread, but did you get anywhere suppressing the skipping mount point messages, @l_fish? I just started using Proxmox recently, and am setting up scheduled host backups using the client.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!