[SOLVED] root disk full because of logfile

Feb 20, 2021
88
10
13
Code:
#
du -hs /var/log/proxmox-backup/*
119M    /var/log/proxmox-backup/api
3,9G    /var/log/proxmox-backup/tasks

Code:
# find /var/log/proxmox-backup |wc -l
50269

Code:
# find /var/log/proxmox-backup -mtime +400 |wc -l
250


how can we shrink the size of the directory? is a "find /var/log/proxmox-backup -mtime +30 -delete " ok?

on the host a lot of chunks/backups are stored and the logfiles are mostly from verifications.
 
how can we shrink the size of the directory? is a "find /var/log/proxmox-backup -mtime +30 -delete " ok?
should be ok, but the task logs you delete will not be available anymore (obviously) even if they show in the gui still

we automatically delete older tasks, but AFAIR we try to save 50000-100000 tasks (maybe we should make this configurable...)
 
i've added that as cron job:

find /var/log/proxmox-backup -mtime +30 -delete

and everything seems fine. thanks!

we automatically delete older tasks, but AFAIR we try to save 50000-100000 tasks (maybe we should make this configurable...)
making this configurable would be nice!
 
should be ok, but the task logs you delete will not be available anymore (obviously) even if they show in the gui still

we automatically delete older tasks, but AFAIR we try to save 50000-100000 tasks (maybe we should make this configurable...)
would be a good idea we got back error cause it filled 100gb on the PBS disk.
we used to have only a 100gb disk as the PBS root partition as all target are secondary drives.
is there a way so far to make a maximum collected ?
 
I have been playing cat and mouse using logrotate. Is there any news about this? After every backup I need to check whether PBS has filled up /var/log.
 
there is a configuration nowadays to rotate after a certain amount of days:

Code:
proxmox-backup-manager update --task-log-max-days <number-of-days-to-keep>
the cleanup job should run once a day
 
there is a configuration nowadays to rotate after a certain amount of days:

Code:
proxmox-backup-manager update --task-log-max-days <number-of-days-to-keep>
the cleanup job should run once a day
Thanks! Should I put that into my crontab? I can't find it in PBS.

Is there a way to reduce the amount of lines logged?
 
Thanks! Should I put that into my crontab? I can't find it in PBS.
no that's an option you set once and the proxmox-backup-proxy takes care of cleaning up once a day

Is there a way to reduce the amount of lines logged?
not really, which logs are you having a problem with exactly? maybe we can find a solution to tweak this, or reduce the overall log amount?
 
not really, which logs are you having a problem with exactly? maybe we can find a solution to tweak this, or reduce the overall log amount?
As an example: When running a backup job for container 123 the log file grows to 15MB.

Code:
root@pve:/var/log/proxmox-backup/tasks/EA# du -h UPID\:pve\:000C5FBA\:0B65A3EA\:00004223\:65AA35DC\:backup\:rsync\\x2dnet\\x3act-123\:root@pam\: 
15M    UPID:pve:000C5FBA:0B65A3EA:00004223:65AA35DC:backup:rsync\x2dnet\x3act-123:root@pam

The zram-Partition for /var/log has a size of 90MB, so that's kind of a problem for me :D
 
Last edited:
As an example: When running a backup job for container 123 the log file grows to 15MB.
it's not small, but it's not that big either ;)

The zram-Partition for /var/log has a size of 90MB, so that's kind of a problem for me :D
i guess for a "typical" pbs installation that will be too little space though...

you could open a feature request/bug report to reduce the amount of logging we do here: https://bugzilla.proxmox.com
no promises though ;)
 
  • Like
Reactions: dekiesel
neither. the proposal there was to make PBS_LOG influence the server side task logging as well. @ggoller probably knows more about the current state of logging-related patches on the devel list ;)
 
  • Like
Reactions: dekiesel

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!