Skip to content

Instantly share code, notes, and snippets.

@a1300
Last active April 7, 2022 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a1300/3640f0e144c9fcfcd5dc2090c0c629d5 to your computer and use it in GitHub Desktop.
Save a1300/3640f0e144c9fcfcd5dc2090c0c629d5 to your computer and use it in GitHub Desktop.
upgrade testnet | restore backup
#!/bin/bash
# If you run your node with docker, please follow the statements below.
#You need ~ 10GB of free space for this
sudo apt-get install zip unzip
# download
wget https://testnet.snapshots.gny.io/v2_height_3136119_07-04-2022_06_03_01.zip
unzip v2_height_3136119_07-04-2022_06_03_01.zip
sudo docker-compose --file docker-compose.yml down
# make space
sudo docker volume prune --force
sudo docker-compose --file docker-compose.yml pull
# restore
sudo docker-compose --file docker-compose.yml up --no-start
sudo docker-compose --file docker-compose.yml start db1
sleep 10s
cat v2_height_3136119_07-04-2022_06_03_01.sql | sudo docker exec -i db1 psql -U postgres
# start again
sudo docker-compose --file docker-compose.yml up --detach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment