Chain ID: core-1 | Current Node Version: v7.0.2
|11674615||527 MB||15 hours ago||persistence_11674615.tar.lz4|
We take a node snapshot every day. We then delete all the previous snapshots to free up the space on the file server.
The snapshot is designed for node opeartors to run an efficient validator service on Persistence chain. To make the snapshot as small as possible while still viable as a validator, we use the following setting to save on the disk space. We suggest you make the same adjustment on your node too. Please notice that your node will have very limited functionality beyond signing blocks with the efficient disk space utilization. For example, your node will not be able to serve as a RPC endpoint (which is not suggested to run on a validator node anyway).
Since we periodically state-sync our snapshot nodes, you might notice that sometimes the size of our snapshot is surprisingly small.
# Prune Type pruning = "custom" # Prune Strategy pruning-keep-recent = "100" pruning-keep-every = "0" pruning-interval = "10"
indexer = "null"
Install lz4 if needed
sudo apt update sudo apt install snapd -y sudo snap install lz4
Download the snapshot
wget -O persistence_11674615.tar.lz4 https://snapshots.polkachu.com/snapshots/persistence/persistence_11674615.tar.lz4 --inet4-only
Stop your node
sudo service persistence stop
Reset your node. WARNING: This will erase your node
If you are
already running validator, be sure you backed up your
prior to running the the command.
The command does not wipe the file. However, you
should have a backup of it already in a safe location.
# On some tendermint chains persistenceCore unsafe-reset-all # On other tendermint chains persistenceCore tendermint unsafe-reset-all --home $HOME/.persistenceCore --keep-addr-book
Since Persistence has enabled wasm and its
wasm folder is outside the
our snapshot also includes a
wasm folder. Notice that we
have taken out the
cache sub-folder from the snapshot to ensure the
wasm folder is compatible for all CPUs.
To sure that you have a
clean start, please delete your
wasm folder manually
unsafe-reset-all does not reset the
rm -r ~/.persistenceCore/wasm
Decompress the snapshot to your database location. You database location
will be something to the effect of
depending on your node implemention.
lz4 -c -d persistence_11674615.tar.lz4 | tar -x -C $HOME/.persistenceCore
Now double-check the
folder to ensure that it is not empty (it is okay for Osmosis wasm
folder to be empty). If it is empty, it means that our snapshot
script has a bug. Please
contact us via Discord Server.
If everything is good, now restart your node
sudo service persistence start
Remove downloaded snapshot to free up space
rm -v persistence_11674615.tar.lz4
Make sure that your node is running
sudo service persistence status sudo journalctl -u persistence -f
ADVANCED ROUTE: The above solution requires you to download the compressed file, uncompressed it and then delete the original file. This requires extra storage space on your server. You can run the following combo command to stream the snapshot into your database location. For advanced users only:
curl -o - -L https://snapshots.polkachu.com/snapshots/persistence/persistence_11674615.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.persistenceCore
ALTERNATIVE ROUTE: We also have Persistence state-sync service to help you bootstrap a node.