[SOLVED] Proxmox-backup logs

ah ok i'm just seeing that you use proxmox-backup-server 2.1.5, that option is only availble since 2.1.6 (this is already available on no-subscription, not on enterprise yet, but it will probably be moved soon)
thats the reason it's not working

2. When does a log task ends up in the archive? Cause some of those logs are definitely older than 60 days, and after I've a clean situation with the double datastore, I'd like to slowly cleanup those bigger logs
when a task is finished, it will be appended in the archive file. those will be rotated when that file reaches 512KiB. then the rotated files (archive.1.zst archive.2.zst, etc) will be checked if there are ones where
there are only oder tasks than the given days, and then those will be deleted...

so it's not immediate and super precise, but does not take super long and is not very disk intensive
if we'd want to do it instantly and every day, we'd either have to split those up in much smaller files (which makes it slower when we need to read them) or do much more complicated operations on rotation
(reading + rewriting every time)
 
I ran into the same issue. The root partition ran full because of too many old log files in /var/log/proxmox-backup. This was also mentioned in this forum channel. So I deleted all content of this folder.
But then I ran into another issue: The Proxmox backup server was not operational, because it created the missing folder /var/log/proxmox-backup/tasks with wrong permissions root:root! Therefore, another forum channel exists.

Here is my solution as workaround for the old and IMHO obsolete nested folders in /var/log/proxmox-backup/tasks:
  1. create a bash script /opt/cleanlogs.sh
    Code:
    #!/bin/bash
    # Cleanup the PBS "tasks" logs
    set -eu
    DAYS=30
     
    # find folders older than $DAYS
    for FOLDER in $(/usr/bin/find /var/log/proxmox-backup/tasks -type d -mtime +$DAYS)
    do
      PARENT=$(/usr/bin/dirname $FOLDER)
      [[ "tasks" == "$(/usr/bin/basename $PARENT)" ]] && /usr/bin/rm -rf $FOLDER
    done
  2. set the right permissions: chmod ug+x /opt/cleanlogs.sh
  3. add an entry to cron, e.g. crontab -e
    Code:
    @monthly     /opt/cleanlogs.sh
I hope that helps saving time for other guys running into the same issues...
 

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!