-
Notifications
You must be signed in to change notification settings - Fork 92
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
Restore snapshots to parachains #673
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e1288cb
fix for k8 images
samelamin 605c23c
Support collator db snapshots
samelamin dacd9e5
add support for k8 and podman
samelamin 1483121
add guide to taking and restoring a snapshot
samelamin 8af20f8
Merge branch 'main' into fix_for_k8_images_paths
pepoviola 7bab0c3
Merge branch 'main' into fix_for_k8_images_paths
samelamin 3bbfb54
remove empty lines
samelamin b28b928
fix for setting parachain and relaychain spec
samelamin 33dda4e
Merge branch 'main' into fix_for_k8_images_paths
pepoviola 40019d3
pr comments
samelamin a61c8a4
move guide to docs
samelamin 4ef346b
Merge branch 'main' into fix_for_k8_images_paths
samelamin 95d6839
revert root volume changes
samelamin 30022b2
Merge branch 'main' into fix_for_k8_images_paths
samelamin e565caf
Update javascript/packages/orchestrator/src/providers/podman/podmanCl…
pepoviola 2911243
Update javascript/packages/orchestrator/src/providers/native/nativeCl…
pepoviola 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 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,39 @@ | ||
# Database snapshot guide | ||
|
||
For this guide we will be taking a snapshot of a parachain and relay chain. Please note we are using a local chain here `rococo_local_testnet` and `local_testnet`. Live chains will have different values | ||
|
||
*Please ensure that the database is not in current use, i.e no nodes are writing to it* | ||
|
||
# How to prepare database for a relaychain | ||
To prepare snapshot for a relay chain we need to copy the database. | ||
|
||
``` | ||
mkdir -p relaychain-snapshot/alice/data/chains/rococo_local_testnet/db/ | ||
|
||
cp -r chain-data/alice/data/chains/rococo_local_testnet/db/ relaychain-snapshot/alice/data/chains/rococo_local_testnet/db/ | ||
|
||
tar -C relaychain-snapshot/alice/ -czf relaychain.tgz data | ||
``` | ||
# How to prepare database for a parachain | ||
|
||
To prepare snapshot for a parachain we need to copy the database for both the collator node (parachain data) and validator (relay data) | ||
|
||
``` | ||
#Parachain data | ||
mkdir -p parachain-snapshot/charlie/data/chains/local_testnet/db/ | ||
|
||
# Relay data | ||
mkdir -p parachain-snapshot/charlie/relay-data/chains/rococo_local_testnet/db/ | ||
|
||
|
||
cp -r chain-data/charlie/data/chains/local_testnet/db/ parachain-snapshot/charlie/data/chains/local_testnet/db/ | ||
|
||
|
||
cp -r chain-data/charlie/relay-data/chains/rococo_local_testnet/db/ parachain-snapshot/charlie/relay-data/chains/rococo_local_testnet/db/ | ||
|
||
tar -C parachain-snapshot/charlie/ -czf parachain.tgz data relay-data | ||
``` | ||
|
||
# Restoring a snapshot | ||
Zombienet will automatically download the `*.tgz` file to the respective folder for a run. However you can also download it manually, just ensure you extract the tar file in the correct directory, i.e. the root directory | ||
`chain-data/charlie/` |
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a reorder in the code, or I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a reorder because we need to generate the parachain files, and since the relay chain we provided isnt raw, these codeblock does not run and the cumulus parachains fail to get created