Clear nextcloud.log?

Hi all, I’m not a coder, so apologies in advance. My 50gb mailinabox server is getting full,only 8.6gb availiable in the status checks. I only have 3 users and it doesnt seem as if anyone’s mailbox is that large. The server has been running since 2015 or so. my nextcloud.log file in /home/user-data/owncloud is 8.8gb. There is also an owncloud.log file thats 1gb. is there any way to clean these up?
Also, is there any other places I should be looking for oversize files?

1 Like

a little further digging, no ones mailbox is over a gig, my total /home/user-data/mail directory with all the mailboxes is only 1.9gb. the owncloud folder is 9.6gb with 8.8gb being the nextcloud.log file. (so 0.8 gb owncloud usage) What else could be filling up my system?

So in an attempt to fix some of this on my own, I created a logrotate entry for nextcloud - let me know if I’m way off base here…

or possibly this needs to go into a future release?

sudo nano /etc/logrotate.d/nextcloud

paste the below in and ctrl-x in for save

/home/user-data/owncloud/nextcloud.log {
rotate 6
su www-data www-data
create 640 www-data www-data

after I saved the above file, I ran:
sudo logrotate --force /etc/logrotate.d/nextcloud

'll give it a few days to ensure the new log file is working then I’ll delete the old one. However there is still a lot of space being taken up on my susyem, I’ll have to keep looking

My personal opinion would have been to simply delete those two files.

A question - which version of MiaB are you running?

Im on the most current version, i did some further digging, and none of my Logrotate.d conf files are working. Some program in my box (postfix?) changed the ownership from root root to root www-data in my /var/log directory. I had To manually input a su line in each .conf file, otherwise they are skipped due to insecure permissions. I freed up 30gb of old log files. My box is pretty stock, i migrated to a new box when we went to 18.04 and i update the box whenever there is a new version. Others may have the same issue.

Would you be kind enough to open a new issue on GitHub for this please?