OSSEC HIDS Linux security

Why did this server run out of disk space?

Less than two hours after I logged into the admin end of this website, which is powered by WordPress, the site went offline, with a 502 Bad Gateway error. What the…?

So I logged in via ssh and noticed a serious lag between when I type a letter and when it appears on the screen. I’ve got a problem. And with latency like that, running top will not help. After verifying that all the server applications were running, I checked disk usage using df -h. The output hinted at the problem I was facing.

The server was out of disk space! But this is a Cloud server with 40 GB of disk space and only serving a couple of websites. What could have consumed all the disk space?

Just to recover some space and see if I could get the site back online, I decided to delete a few zip files that had served their purpose. Another

Related Post:  You'll need to do this after installing Elementary OS 5 Juno
df -h after that revealed that I had recovered 500 MB.

That brought the site back online and put a smile on my face. And just at that point I recalled having installed a backup plugin. Perhaps the backups were the culprits. An ls -lh in the backup directory confirmed my suspicion.

Two huge backup files were in the directory and the latest had a timestamp that matched when the site went offline. Since I had already downloaded the previous backup, I deleted it from the server. Another

Related Post:  Eyes in the Sky: The Rise of Gorgon Stare and How It Will Watch Us All
df -h broadened my smile.

Now the site is running like it’s supposed to. The server running out of disk space was an oversight. The main lesson here is I need a better backup strategy. Probably need to be backing up to a Cloud storage service. The other lesson is I need to have a script that reports disk usage by email daily, because this should never happen again.

Please share:
Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *