This script downloads and extracts the Cardano node database snapshot from csnapshots.io to a directory of your choice. It supports both mainnet and testnet (pre-production) databases, and checks for the presence of lz4, curl, and jq, installing them if necessary.
- Linux operating system
lz4,curl, andjqtools (will be installed if necessary)
To download and run the script, run the following command:
curl -O -s https://raw.githubusercontent.com/stakepool247/csnapshots/master/snapshot-recovery.sh && bash snapshot-recovery.sh
download the script
curl -O -s https://raw.githubusercontent.com/stakepool247/csnapshots/master/snapshot-recovery.sh &&
make the script executable:
chmod +x snapshot-recovery.sh
execute the script:
./snapshot-recovery.sh
When you run the script, you will be prompted to choose a database (mainnet or testnet), a location to save the database (either /home/cardano/cnode/db, /opt/cardano/cnode/db, or a custom path), and whether to proceed with the download and extraction.
This script is released under the MIT License.