After extracting the file, locate the dump folder and the pg_restore.list file. Put both to the main directory, instead of default under βexternal_nodeβ.
Make sure you have the correct vars, volume attachment under the correct path.
Note
EN_PRUNING_ENABLED: Determines whether the node is set to pruning mode. When enabled, the node retains only recent chain data and discards older data to conserve storage space.
EN_SNAPSHOTS_RECOVERY_ENABLED, EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL, and EN_SNAPSHOTS_OBJECT_STORE_MODE: Enable snapshots recovery (similar to state-sync) and allows the node to recover from the latest batch without containing the full historical data.
Adddebug to namespaces: Enables debug tracing and saves debug data.EN_API_NAMESPACES:Defines the enabled API namespaces, including eth, net, web3, zks, pubsub, and debug.
Step 3: Database Restoration
3.1 - Start PostgreSQL Container:
docker compose up -d postgres
Please note postgres was named in docker-compose.
When container is running, list containers to find the container ID:
docker ps
Below is the example output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e29741123132 postgres:16 "docker-entrypoint.sβ¦" 31 seconds ago Up 30 seconds zkevm_mainnet-postgres-1
3.2 - Restore Database from Dump
Run the following and docker retrieve and manipulate the data from data dump: