forked from bnb-chain/opbnb-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.template
36 lines (26 loc) · 1.11 KB
/
README.md.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# opbnb-snapshot
## Endpoint
Snapshot download link:
### *Mainnet*
{{mainnet}}
### *Testnet*
{{testnet}}
> Snapshots are generated and retained on a weekly basis, with each snapshot being stored for a duration of 7 days. Community developer NodeReal is responsible for creating and updating the testnet snapshot regularly.
## Usage
### Step 1: Download the snapshot and decompress it.
```bash
wget -q -O - https://tf-bnbchain-prod-opbnb-mainnet-snapshot-s3-ap-northeast-1.s3.ap-northeast-1.amazonaws.com/geth-20231012.tar.gz | tar -xvf -
```
### Step 2: Replace the data.
1. Stop the running `op-geth` client, ensuring that it has completely shut down.
2. To back up the original data, execute the following commands:
```
mv ${OPGeth_DataDir}/geth/chaindata ${OPGeth_DataDir}/geth/chaindata_backup
mv ${OPGeth_DataDir}/geth/triecache ${OPGeth_DataDir}/geth/triecache_backup
```
3. Replace the data with the snapshot by running:
```
mv ./geth/chaindata ${OPGeth_DataDir}/geth/chaindata
mv ./geth/triecache ${OPGeth_DataDir}/geth/triecache
```
4. Restart the `op-geth` client and verify the logs.