I just noticed that /var/log/proxmox-backup is using quite a lot of space.
It seems as log rotation is not explicitly defined in logrotate.
Is there any other setting that is taking care of this log rotation or can I just use logrotate as for any other logs?
I didn’t find anything related in documentation, so probably rotation can be defined in logrotate as for any other service?
Thanks for the answer, I will implement this cleaning as you suggested until the feature is available in update.
I guess I can clean the /var/log/proxmox-backup/api as well, actually, better to use logrotate here as the logs are moved daily to zst compressed access.log and auth.log?
The used space of proxmox-backup logs:
Code:
$ du -sh /var/log/proxmox-backup/*
4.8G /var/log/proxmox-backup/api
4.5G /var/log/proxmox-backup/tasks
I guess I can clean the /var/log/proxmox-backup/api as well, actually, better to use logrotate here as the logs are moved daily to zst compressed access.log and auth.log?
we do not use logrotate but use our own logrotation (since we can then use zstd which should be better than gzip) in the proxmox-backup-proxy (which is not configurable at the moment, though you can open a feature request here if you want: https://bugzilla.proxmox.com)
deleting old logs manually should not be a problem though
also, can you show the content of /var/log/proxmox-backup/api ? it may be that the daemon did not rotate because of a bug (fixed in git but also not yet rolled out). that could be fixed by restarting proxmox-backup-proxy (systemctl restart proxmox-backup-proxy) but beware, that will abort running tasks (backup/restore/etc)
we did fix some log rotation related things, namely the cleanup would not continue if it encountered an error... but this only affects the proxmox-backup logs, the syslog + daemon.log are managed by logrotate
Hi,
I'm facing the same issue, in particular, my garbage collection tasks log occupies around 1.1GB of space (there are like 5 million warning inside, which i can't see cause webgui crashes).
Where can i use this "proxmox-backup-manager node update --task-log-max-days N" code? And when will it delete the older logs to give me a bit of time to investigate further the Warning issue?
I'm facing the same issue, in particular, my garbage collection tasks log occupies around 1.1GB of space (there are like 5 million warning inside, which i can't see cause webgui crashes).
sounds like there is some serious issue here, you can check the task log manually with
'proxmox-backup-manager task log <UPID>'
Where can i use this "proxmox-backup-manager node update --task-log-max-days N" code? And when will it delete the older logs to give me a bit of time to investigate further the Warning issue?
that is simply a command you can enter on the cli (via ssh or the web console), but this will probably not help if you have few task logs that are big
the log-rotation is triggered every day at midnight
yup, I've entered 60 days and it will delete a bit of logs which will give me a bit of space/time for the analysis.
About the 1.1GB logs instead, i've this situation:
I used to have a daily backup schedule with like 200 VMs
I moved two of em into a new backup schedule (with dedicated datastore on PBS) without deleting the old ones and the warnings are all like this.
Code:
2022-05-13T02:26:11+02:00: WARN: warning: unable to access non-existent chunk 56e479d7042cb81f6dd00db0b80660f8f24b971b092962329f3fb3886757b956, required by "/backup/proxmox/SQLDumps/vm/11273/2022-04-24T21:12:02Z/drive-virtio0.img.fidx"
Is it safe to delete my backups on the older datastore? I think this might solve the issue cause the garbage collection task which gives me pain is the on on the older datastore, while the one on the newer is ok and properly dimensioned
If i check the /etc/proxmox-backup/node.cfg file it's empty, how can i check that the PBS has correctly taken/understood the above command?
This is my backup manager version:
Aside from that the main issue is that the task log rotation is not working, see #16 post for more details, this is the log in my "Log rotation" task
Code:
2022-05-15T00:00:00+02:00: starting task log rotation
2022-05-15T00:00:00+02:00: task log archive was not rotated
2022-05-15T00:00:00+02:00: API access log was not rotated
2022-05-15T00:00:00+02:00: API authentication log was rotated
2022-05-15T00:00:00+02:00: TASK OK
the log rotation only works on our 'index' (/var/log/proxmox-backup/tasks/archive.*) files, so only if those rotate out, then will task logs be removed
thats why i said:
but this will probably not help if you have few task logs that are big
Ok, thanks for the info, a couple more questions, given that i'm already pursuing the double, not nested, datastores.
1. Why if i type "proxmox-backup-manager node update --task-log-max-days 60" it doesn't appear in my node.cfg config?
my version on another server is the latest and it still doesn't appear, any idea on how i can troubleshoot that? Can i type it directly in the node.cfg and restart proxmox-backup-manager?
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