Created
May 5, 2022 15:05
-
-
Save serge-medvedev/7bc0606c78150f5b1eea5a7d525e8859 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| RESTORE_DB=${RESTORE_DB:-false} | |
| jq ".restore_db = ${RESTORE_DB}" /mnt/node/config.json > /tmp/config.json | |
| mv /tmp/config.json /mnt/node/config.json |
Author
Author
Look for exact node config volume name via the command below (jq must be installed):
$ docker inspect -f '{{ json .Mounts }}' $(docker ps -q -f 'name=node') | jq -r '.[].Name | select(test("node-config"))'should probably add that when you grab the restore_db.sh one should make it executable:
chmod 775 restore_db.sh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1. Update the node:
2. Stop the node:
3. Download
restore_db.shto/tmp/restore_db.shand modify the config:4. Start the updated node and patiently wait for it to fix the DB and start sync'ing (console won't work during the fix):
5. Stop the node:
6. Modify the config:
7. Start the node: