Reclaiming the Disk Space by Deleting the Logs of the Docker Container

in #witness-category25 days ago

The Steem Blockchain is huge and currently it has over 47 Million blocks and still growing!

To run a steem witness, you will need at least 16GB RAM and at least 1TB HDD/SSD. The blockchain size is currently over 300GB, and imagine you would need to restore from backup instead of replaying/reindexing the whole blockchain which takes weeks, a large Disk would certainly help.

If your Steem Node (Using the Docker Container: SIAB: Steem-In-A-Box) is running for months, you will have lots of the logs written - which you can truncate and reclaim the lost space.

First, go to the container directory - which is located at /var/lib/docker/containers/.

Then for example, the log is the -json.log file - which you can locate them by find . -name "*.log" -type f -size +100M to list log files that are larger than 100M.

Then, we can just truncate the log file (do not simply remove it otherwise the logs will be stopped writing):

echo "" > log_file-json.log

--EOF (The Ultimate Computing & Technology Blog) --

Reposted to Computing Technology


Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com

Steem On!~
Every little helps! I hope this helps!


If you like my work, please consider voting for me or Buy Me a Coffee, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Sort:  

👍👍👍

[WhereIn Android] (http://www.wherein.io)

I don't know about this. But there are 47 million blocks a lot. And just increased everyday. I have only 3 GB RAM.
@justyy

great, already upvoted

Coin Marketplace

STEEM 0.16
TRX 0.03
JST 0.026
BTC 12828.37
ETH 398.48
USDT 1.00
SBD 0.99