Skip to content

hetzner-backend2 free disk space

Hetzner-backend2

In this server we have running goTeleport (vpn zero trust) Because the server have 40gb of hard disk, free size is quickly fill. Another factor of quick filling is windows RDP connections. This connections have session recording in gif format. We need to often check this server and to clean this recordings.

How to clean the space?

Login to hetzner-backend2 using teleport. go to cd /var/lib/teleport/log/records in this folder are saved all session recording files. check for sure that space is filling form here du -h last command is: First be sure that you are in correct folder!!! find /var/lib/teleport/log/records/ -type f -mtime +10 -exec rm {} \;

journalctl also can fill up some disk space.

The self maintenance method is to vacuum the logs by size or time. Retain only the past two days:

journalctl --vacuum-time=2d

Retain only the past 500 MB:

journalctl --vacuum-size=500M