Read snapshot file paths

This commit is contained in:
Prathamesh Musale 2024-06-05 16:19:07 +05:30
parent 2b1fcebab2
commit b7ccf24c93
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ fi
# Use snapshot if provided # Use snapshot if provided
# Take first file from the snapshot dir # Take first file from the snapshot dir
snapshot_file=$((ls /var/tmp/snapshot/) 2>/dev/null | head -1) snapshot_file=$((ls /var/tmp/snapshot/*) 2>/dev/null | head -1)
geth_dir=${DATA_DIR}/geth geth_dir=${DATA_DIR}/geth
ADDITIONAL_FLAGS="" ADDITIONAL_FLAGS=""
if [ ! -d "$geth_dir" ] && [ "${CERC_USE_SNAPSHOT}" = "true" ] && [ -n "$snapshot_file" ]; then if [ ! -d "$geth_dir" ] && [ "${CERC_USE_SNAPSHOT}" = "true" ] && [ -n "$snapshot_file" ]; then

View File

@ -42,7 +42,7 @@ Instructions for running a BSC node
laconic-so --stack ~/cerc/bsc-stack/stack-orchestrator/stacks/bsc-node deploy create --spec-file bsc-node-spec.yml --deployment-dir bsc-node-deployment laconic-so --stack ~/cerc/bsc-stack/stack-orchestrator/stacks/bsc-node deploy create --spec-file bsc-node-spec.yml --deployment-dir bsc-node-deployment
``` ```
* (Optional) Copy over the snapshot file (`*.tar.lz4`) in snapshot data directory in the deployment (`bsc-node-deployment/data/snapshot`): * (Optional) Copy over the snapshot file (`*.tar.lz4` or `*.tar.zst`) in snapshot data directory in the deployment (`bsc-node-deployment/data/snapshot`):
```bash ```bash
# Example # Example
@ -61,7 +61,7 @@ Instructions for running a BSC node
CERC_BSC_NETWORK= CERC_BSC_NETWORK=
# Whether to sync from a snapshot (true | false) (default: false) # Whether to sync from a snapshot (true | false) (default: false)
# Requires snapshot file with extension .tar.lz4 to be placed in the snapshot directory # Requires snapshot file with extension .tar.lz4 or .tar.zst to be placed in the snapshot directory
CERC_USE_SNAPSHOT= CERC_USE_SNAPSHOT=
# Whether to run as a fast node (true | false) (default: false) # Whether to run as a fast node (true | false) (default: false)