From 0ae0472fa9850557477e9921ad6cca4f979f9a2d Mon Sep 17 00:00:00 2001 From: Albert Perez Toro Date: Wed, 16 Oct 2024 21:32:06 +0200 Subject: [PATCH] Restoring the snapshot --- Dockerfile.ledgerdownloader | 3 ++- downloadLedgerSnapshot.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile.ledgerdownloader b/Dockerfile.ledgerdownloader index ab6567f6..9a729d7a 100644 --- a/Dockerfile.ledgerdownloader +++ b/Dockerfile.ledgerdownloader @@ -8,7 +8,8 @@ RUN apt-get update \ curl \ wget \ bash \ - aria2 + aria2 \ + zstd # Copy the script from the host into the container COPY downloadLedgerSnapshot.sh /usr/local/scripts/downloadLedgerSnapshot.sh diff --git a/downloadLedgerSnapshot.sh b/downloadLedgerSnapshot.sh index 5233d362..53d3bdfc 100755 --- a/downloadLedgerSnapshot.sh +++ b/downloadLedgerSnapshot.sh @@ -31,4 +31,9 @@ else ls -l "$DATA_DIR" fi +tar --use-compress-program=zstdmt -xvf RADIXDB-INDEX.tar.zst --exclude=./address_book -C . +rm -rf RADIXDB-INDEX.* +rm -rf latest-snapshot-INDEX.sh* +echo "Snapshot restored" +