Skip to content

Commit

Permalink
remove /full from the db snapshot restore path
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBesson committed Jun 6, 2022
1 parent 858e50a commit 5d356cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: node
description: A Helm chart to deploy Substrate/Polkadot nodes
type: application
version: 2.1.0
version: 2.2.0
16 changes: 8 additions & 8 deletions charts/node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ spec:
else
echo "Downloading chain snapshot"
SNAPSHOT_URL="{{ .Values.node.chainDataSnapshotUrl }}"
mkdir -p /data/chains/${CHAIN_PATH}/db/full
mkdir -p /data/chains/${CHAIN_PATH}/db/
if [ "${SNAPSHOT_FORMAT}" == "lz4" ]; then
wget -O - ${SNAPSHOT_URL} | lz4 -c -d - | tar -x -C /data/chains/${CHAIN_PATH}/
else
wget -O - ${SNAPSHOT_URL} | tar -x -C /data/chains/${CHAIN_PATH}/db/full/
wget -O - ${SNAPSHOT_URL} | tar -x -C /data/chains/${CHAIN_PATH}/db/
fi
fi
env:
Expand All @@ -107,11 +107,11 @@ spec:
else
echo "Downloading relay-chain snapshot"
RELAY_SNAPSHOT_URL="{{ .Values.node.collator.relayChainDataSnapshotUrl }}"
mkdir -p /data/relay/chains/${RELAY_CHAIN_PATH}/db/full
mkdir -p /data/relay/chains/${RELAY_CHAIN_PATH}/db
if [ "${RELAY_SNAPSHOT_FORMAT}" == "lz4" ]; then
wget -O - ${RELAY_SNAPSHOT_URL} | lz4 -c -d - | tar -x -C /data/chains/${RELAY_CHAIN_PATH}/
else
wget -O - ${RELAY_SNAPSHOT_URL} | tar -x -C /data/chains/${RELAY_CHAIN_PATH}/db/full/
wget -O - ${RELAY_SNAPSHOT_URL} | tar -x -C /data/chains/${RELAY_CHAIN_PATH}/db/
fi
fi
env:
Expand Down Expand Up @@ -143,8 +143,8 @@ spec:
echo "Failed to retrieve latest_version metadata"
exit 1
fi
mkdir -p /data/chains/${CHAIN_PATH}/db/full
gsutil -m -o "GSUtil:parallel_process_count=3" -o "GSUtil:parallel_thread_count=15" rsync -d -r ${BUCKET_URL}/${LATEST} /data/chains/${CHAIN_PATH}/db/full/
mkdir -p /data/chains/${CHAIN_PATH}/db
gsutil -m -o "GSUtil:parallel_process_count=3" -o "GSUtil:parallel_thread_count=15" rsync -d -r ${BUCKET_URL}/${LATEST} /data/chains/${CHAIN_PATH}/db/
fi
env:
- name: CHAIN_PATH
Expand Down Expand Up @@ -178,8 +178,8 @@ spec:
echo "Failed to retrieve latest_version metadata"
exit 1
fi
mkdir -p /data/relay/chains/${RELAY_CHAIN_PATH}/db/full
gsutil -m -o "GSUtil:parallel_process_count=3" -o "GSUtil:parallel_thread_count=15" rsync -d -r ${BUCKET_URL}/${LATEST} /data/relay/chains/${RELAY_CHAIN_PATH}/db/full/
mkdir -p /data/relay/chains/${RELAY_CHAIN_PATH}/db
gsutil -m -o "GSUtil:parallel_process_count=3" -o "GSUtil:parallel_thread_count=15" rsync -d -r ${BUCKET_URL}/${LATEST} /data/relay/chains/${RELAY_CHAIN_PATH}/db/
fi
env:
- name: RELAY_CHAIN_PATH
Expand Down

0 comments on commit 5d356cb

Please sign in to comment.