Files
pezkuwi-subxt/cumulus/zombienet/tests/0007-prepare-warp-sync-db-snapshot.md
T
Chevdor a30092ab42 Markdown linter (#1309)
* Add markdown linting

- add linter default rules
- adapt rules to current code
- fix the code for linting to pass
- add CI check

fix #1243

* Fix markdown for Substrate
* Fix tooling install
* Fix workflow
* Add documentation
* Remove trailing spaces
* Update .github/.markdownlint.yaml

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix mangled markdown/lists
* Fix captalization issues on known words
2023-09-04 12:02:32 +03:00

1.6 KiB

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/