...
sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu --sync-mode=X_SNAP storage x-trie-log prune
If you use a toml config file, then you can simply do something like:
sudo /usr/local/bin/besu/bin/besu --config-file=besu-config.toml storage x-trie-log prune
The logs should look something like this...
Code Block |
---|
2024-01-31 05:10:43.777+00:00 | main | INFO | KeyPairUtil | Attempting to load public key from /data/besu/key ... 2024-01-31 05:10:47.574+00:00 | main | INFO | TrieLogSubCommand | Calculating trie logs size before... 2024-01-31 05:10:51.100+00:00 | main | INFO | TrieLogSubCommand | Trie logs size before: 8 GiB 2024-01-31 05:12:45.907+00:00 | main | INFO | TrieLogHelper | Saving trie logs to retain in file /data/besu/database/trieLogsToRetain-1 (batch 1)... 2024-01-31 05:12:45.916+00:00 | main | INFO | TrieLogHelper | Obtaining trielogs from db, this may take a few minutes... 2024-01-31 05:12:46.036+00:00 | main | INFO | TrieLogHelper | Clear trie logs... 2024-01-31 05:12:46.100+00:00 | main | INFO | TrieLogHelper | Restoring trie logs retained from batch 1... 2024-01-31 05:12:46.168+00:00 | main | INFO | TrieLogHelper | Key(0): 0xc0a1f26bf828ae6d9af8fda8af3126f12a6d986afea05fdc61b25d0d0ab3b8d4 ... 2024-01-31 05:12:46.263+00:00 | main | INFO | TrieLogHelper | Key(511): 0x5eb700164f4190b8806c7ce3de2f6e5b4f4c05a61bba4058f1b0a5ef63ec73af 2024-01-31 05:12:46.359+00:00 | main | INFO | TrieLogHelper | Deleting files... 2024-01-31 05:12:46.363+00:00 | main | INFO | TrieLogSubCommand | Finished pruning - recalculating size... 2024-01-31 05:12:51.658+00:00 | main | INFO | TrieLogSubCommand | Trie logs size after: 0 B Prune ran successfully. We estimate you freed up 8 GiB! |
If you use a toml config file, then you can simply do something like:
sudo /usr/local/bin/besu/bin/besu --config-file=besu-config.toml storage x-trie-log prune
Subcommand Troubleshooting
...