Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section: How to restore snapshots #92

Open
2 tasks done
a1300 opened this issue Jan 17, 2021 · 2 comments
Open
2 tasks done

Add section: How to restore snapshots #92

a1300 opened this issue Jan 17, 2021 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@a1300
Copy link
Collaborator

a1300 commented Jan 17, 2021

Related: #89

TODO



Restore snapshot with docker (script):

# 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 http://testnet.snapshots.gny.io/v2_height_2134447_09-01-2021_19_00_13.zip
unzip v2_height_2134447_09-01-2021_19_00_13.zip


sudo docker-compose --file docker-compose.yml down


# make space
sudo docker volume prune --force


# get newest image (1.0.55)
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_2134447_09-01-2021_19_00_13.sql | sudo docker exec -i db1 psql -U postgres


# start again
sudo docker-compose --file docker-compose.yml up --detach
@a1300 a1300 added the documentation Improvements or additions to documentation label Jan 17, 2021
@xpgeng
Copy link
Contributor

xpgeng commented Aug 26, 2021

@a1300

For restoring the snapshots on the local database, I think the current snapshots on the sites (mainnet.snapshots.gny.io or testnet.snapshots.gny.io) is not the right version. They seem to be the docker version. Because in the local database for the bare metal node, the DB_user is postgres2 with the password docker. However the snapshots are all postgres with a md5 password. So should we provide both versions of the snapshots?

@a1300 a1300 assigned a1300 and unassigned liangpeili Nov 23, 2021
@a1300
Copy link
Collaborator Author

a1300 commented Nov 27, 2021

@xpgeng thanks for the summary

The problem with db user postgres2 is now fixed with the closing of ticket #94 . Now we only have one postgres user postgres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants