Created
April 7, 2022 07:22
-
-
Save a1300/26086f1069a5fd125fd7b23332ebc042 to your computer and use it in GitHub Desktop.
mainnet upgrade 07.04.2022
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://mainnet.snapshots.gny.io/v2_height_3505970_07-04-2022_06_57_21.zip | |
unzip v2_height_3505970_07-04-2022_06_57_21.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_3505970_07-04-2022_06_57_21.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