On a PBS server, the root filesystem can periodically fill up due to the lack of log rotation in the directory:
/var/log/proxmox-backup/tasks/
Because of this, I decided to add a simple scheduled cleanup command to remove files older than 31 days.
Interestingly, the server does not have the crontab -e command available:
# crontab -e
bash: crontab: command not found
I didn’t want to search for or install additional packages just to enable this command, so I created a script here:
/etc/cron.daily/clean-pbs-log-tasks
Script contents:
# find and clean /var/log/proxmox-backup/tasks/* older than 31 day
## initial PBS task logs have no rotation, so the root directory can become full
cd /var/log/proxmox-backup/ && /usr/bin/find ./tasks/* -mtime +31 -type f -delete
Done!
You can check the total size of the tasks directory with:
du -h --max-depth=1 /var/log/proxmox-backup/