Skip to main content

Snapshot

We take one node snapshot every day. We then delete all the previous snapshots to free up the space on the file server. Since we periodically state-sync our snapshot nodes, you might notice that sometimes the size of our snapshot is surprisingly small.

Installation

Stop your node
sudo systemctl stop andromeda
Install lz4 if needed
sudo apt update
sudo apt install snapd -y
sudo snap install lz4
warning

If you use this snapshot on a validator node during a chain halt, make sure you back up priv_validator_state.json and then replace it after the snapshot is extracted but before you start the node process. This is very important in order to avoid double-sign. When in doubt, reach out to the project team.

cp $HOME/.andromedad/data/priv_validator_state.json $HOME/.andromedad/priv_validator_state.json.backup

Reset your node. This will erase your node database. If you are already running validator, be sure you backed up your priv_validator_key.json 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.

andromedad tendermint unsafe-reset-all --home $HOME/.andromedad --keep-addr-book
Download and decompress the snapshot
curl -L  https://snap.blockval.io/andromeda/andromeda-1_latest.tar.lz4  | tar -Ilz4 -xf - -C $HOME/.andromedad

If you run a validator node and the chain is in halt, it is time to replace the priv_validator_state.json file that you have backed up.

mv $HOME/.andromedad/priv_validator_state.json.backup $HOME/.andromedad/data/priv_validator_state.json
Start your node
sudo systemctl start andromeda
Make sure that your node is running
sudo service andromeda status
sudo journalctl -u andromeda -f