Skip to content

Instantly share code, notes, and snippets.

@a1300
Created April 7, 2022 07:22
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/26086f1069a5fd125fd7b23332ebc042 to your computer and use it in GitHub Desktop.
Save a1300/26086f1069a5fd125fd7b23332ebc042 to your computer and use it in GitHub Desktop.
mainnet upgrade 07.04.2022
#!/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