diff --git a/ansible/archival-snapshots/resources/main.sh b/ansible/archival-snapshots/resources/main.sh index 4309fc5f8..1f8b526e7 100755 --- a/ansible/archival-snapshots/resources/main.sh +++ b/ansible/archival-snapshots/resources/main.sh @@ -32,8 +32,8 @@ while ((LATEST_EPOCH - CURRENT_EPOCH > 30000)); do # Export full snapshot to generate lite and diff snapshots EPOCH_TIMESTAMP=$((GENESIS_TIMESTAMP + NEW_EPOCH*SECONDS_PER_EPOCH)) DATE=$(date --date=@"$EPOCH_TIMESTAMP" -u -I) - NEW_SNAPSHOT="forest_snapshot_mainnet_"$DATE"_height_"$NEW_EPOCH".forest.car.zst" - + NEW_SNAPSHOT="forest_snapshot_mainnet_$DATE_height_$NEW_EPOCH.forest.car.zst" + if [ ! -f "./$NEW_SNAPSHOT" ]; then echo "Exporting snapshot: $NEW_SNAPSHOT" $FOREST_CLI snapshot export --tipset "$NEW_EPOCH" --depth 30000 > export.txt