Big log size (22GB!)

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.1.39
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

My YunoHost system runs on a VPS that has 100 GB of storage.

I’ve noticed how the size has kept growing lately even though I didn’t add any videos or big files… so I tried to find what was taking up so much space and it turns out it’s logs.

/var/log is 28 GB… of which syslog.1 is 22 GB (I was recently the target of Meta AI scraping that sent my usage stats through the roof)

is there a safe way to trim syslog.1?

Why do I care? I’m afraid of running backups because I’m always near capacity these days… and I don’t feel very safe not having manual backups

Share relevant logs or error messages

n/a

1 Like

Try this, command allows cleaning storage

sudo yunohost tools basic-space-cleanup

Clear the server cache and SWAP :

sync; echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a
find /var/log/yunohost/operations -name "*.log" -type f -delete;\
find /var/log/yunohost/operations -name "*.yml" -type f -delete;\
sudo journalctl --rotate;\
sudo journalctl --vacuum-time=2w;\
rm /var/log/borg *.log *.err
4 Likes

thanks! I will try this… is it safe to do? (I read a few other posts on here of people clearing logs and breaking things as a result)…

1 Like

Personally, I use it regularly and have no problems.

1 Like

Oh my THANK YOUUUUU!!! Problem solved… my disk space usage went from 70GB to 40GB after running the commands you recommended!

5 Likes

Can you elaborate how you discovered that? We may find a way to block it

1 Like