-
Notifications
You must be signed in to change notification settings - Fork 22
First Backup Sync Implementation #115
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
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,4 @@ coverage | |
| /agent-linux.bin | ||
| /privateSeeds/ | ||
| /test/service/logs.log | ||
| /backup-sync/ | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| rm -rf testnet-backup | ||
| mkdir -p testnet-backup | ||
| cp -rf target/databases/db testnet-backup/mongo | ||
| cp -rf target/nodes/api-node/data testnet-backup/data | ||
| rm -rf testnet-backup/data/spool | ||
|
|
||
| cd testnet-backup | ||
| zip -r testnet-full-backup.zip * | ||
| cd .. | ||
|
|
||
| # push testnet-backup/testnet-full-backup.zip into S3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| rm -rf backup-sync/testnet-backup | ||
| mkdir -p backup-sync/testnet-backup | ||
| cp -rf target/testnet-dual/databases/db backup-sync/testnet-backup/mongo | ||
| cp -rf target/testnet-dual/nodes/api-node/data backup-sync/testnet-backup/data | ||
| rm -rf backup-sync/testnet-backup/data/spool | ||
|
|
||
| cd backup-sync/testnet-backup | ||
| zip -r testnet-local-full-backup.zip * | ||
| cd ../.. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/bash | ||
| set -e -x | ||
| rm -rf backup-sync/testnet-backup | ||
| mkdir -p backup-sync/testnet-backup/data | ||
| cp -rf target/testnet-dual/nodes/api-node/data/0* backup-sync/testnet-backup/data | ||
| cp -rf target/testnet-dual/nodes/api-node/data/proof.index.dat backup-sync/testnet-backup/data | ||
| cp -rf target/testnet-dual/nodes/api-node/data/index.dat backup-sync/testnet-backup/data | ||
| rm -rf backup-sync/testnet-backup/data/spool | ||
| touch backup-sync/testnet-backup/data/server.lock # force docker compose to run a recover | ||
|
|
||
| cd backup-sync/testnet-backup | ||
| zip -r testnet-local-minimal-backup.zip * | ||
| cd ../.. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| symbol-bootstrap backup -t target/testnet-dual --destinationFile ./backup-sync/testnet-local-backup.zip $1 $2 $3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| symbol-bootstrap start -p testnet -a dual -t target/testnet-dual $1 $2 $3 | ||
| symbol-bootstrap start -p testnet -a dual -t target/testnet-dual -c test/testnet-custom-preset.yml $1 $2 $3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| symbol-bootstrap start -p testnet -a dual -t target/testnet -c test/voting_preset.yml $1 | ||
| symbol-bootstrap start -p testnet -a dual -t target/testnet -c test/voting_preset.yml $1 $2 $3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| `symbol-bootstrap backup` | ||
| ========================= | ||
|
|
||
| The command backs up the Mongo and RocksDb data folder into a Zip file that can then be used by the `--backupSync` feature. Bootstrap compose services must be stopped before calling this command. | ||
|
|
||
| Note: This command is designed for NGL to be used when running public main or public test networks. It's not backing up any node specific information. | ||
|
|
||
| * [`symbol-bootstrap backup`](#symbol-bootstrap-backup) | ||
|
|
||
| ## `symbol-bootstrap backup` | ||
|
|
||
| The command backs up the Mongo and RocksDb data folder into a Zip file that can then be used by the `--backupSync` feature. Bootstrap compose services must be stopped before calling this command. | ||
|
|
||
| ``` | ||
| USAGE | ||
| $ symbol-bootstrap backup | ||
|
|
||
| OPTIONS | ||
| -h, --help It shows the help of this command. | ||
| -t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated | ||
|
|
||
| --destinationFile=destinationFile The file location where the backup zip file will be created. Default destination is | ||
| target/backup.zip. | ||
|
|
||
| --nodeName=nodeName The dual/api node name to be used to backup the data. If not provided, the first | ||
| configured api/dual node would be used. | ||
|
|
||
| DESCRIPTION | ||
| Note: This command is designed for NGL to be used when running public main or public test networks. It's not backing | ||
| up any node specific information. | ||
|
|
||
| EXAMPLE | ||
| $ symbol-bootstrap backup | ||
| ``` | ||
|
|
||
| _See code: [src/commands/backup.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.2/src/commands/backup.ts)_ | ||
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.