Task logs not rotated

joke

Member
Sep 19, 2020
7
0
21
51
I maintain 8 PBS servers. Most of them are version 1.1-9.

I've noticed that in some servers, files in sub directory of /var/log/proxmox-backup/tasks take a lot of space. In one server they use as much as 2.6 GB.

After analyze, I found that:
- The files in these directories are never rotated. (Or stop rotate for a long time.) In some server, there are old files from 2020.
- Most files are from sync job request. The servers without incoming sync request have only few files.
- There are archive.XX.zst files. But it seem that it still keep very old files.

How to make it clear old files and how can I specify rotate parameters. (Such as how long to keep log or how much space it can keep log.)

I've attached list of some files in this directory.
 

Attachments

The server should rotate these files automatically, after a certain amount of entries are reached. Did you install via the PBS ISO installer?
 
The server should rotate these files automatically, after a certain amount of entries are reached. Did you install via the PBS ISO installer?
All of them are installed on Debian LXC with apt command. Some servers are upgraded from 0.9 but most of them are installed with 1.0.
 
Does it happen to be the ones that were upgraded which display this behavior or is it all of the containers?
Could you run du -sh /var/log/proxmox-backup/tasks/* | sort -hr on the node with the +2GB log files to get an overview of where storage is being used (i.e., archives or not-yet-rotated directories). The output of ls -l /var/log/proxmox-backup/tasks/ on the same system would be nice for reference.
 
I've attached result from 3 servers. Here's summary.

First Server
============
(The same server with pbs.txt file)
- Install PBS on 0.9 and upgraded to 1.0 and 1.1
- About 10 local VM/CT and about 4 VM sync from remote
- Hourly backup
- Hourly incoming sync request from remote PBS
- Hourly outgoing sync request to remote PBS

Result
- Large log files

Second Server
=============
- Install PBS on 1.0 and upgraded to 1.1
- 4 CT
- Daily backup
- No incoming sync
- No outgoing sync

Result
- Small log files

Third Server
============
- Install PBS on 0.9 and upgraded to 1.0 and 1.1
- About 4 local CT and about 15 VM/CT sync from remote
- Daily backup
- No incoming sync
- Hourly outgoing sync request to 2 remote PBSes (One of them is First Server)

Result
- Small log files
 

Attachments

It's hard to say the reason for which the old logs remain in the task history, after they get rotated out, but it could have been due to issues in the older (beta) versions. For now I would delete the logs older than 20 days with:
find /var/log/proxmox-backup/tasks/[0-9A-F][0-9A-F]/ -mtime +20 -type f -exec rm {} \;

Then update the containers and see if the problem persists.
 
OK. I've deleted logs older than 40 days. Upgrade PBS to 1.1-12. I'll wait and see the result. Thanks.
 

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!