Last active
April 7, 2022 06:10
-
-
Save a1300/3640f0e144c9fcfcd5dc2090c0c629d5 to your computer and use it in GitHub Desktop.
upgrade testnet | restore backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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