Created
April 7, 2021 09:00
-
-
Save stepansnigirev/c5d60a5e53b0bd632c3e8f9a60ce8f7e to your computer and use it in GitHub Desktop.
A shell script that creates a prunednode.today snapshots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
bitcoin-cli stop | |
now=$(date +"%y%m%d") | |
sleep 1m | |
mkdir /home/ss/snapshots/core_snapshot | |
cp -r /home/ss/.bitcoin/chainstate /home/ss/snapshots/core_snapshot/chainstate | |
cp /home/ss/.bitcoin/fee_estimates.dat /home/ss/snapshots/core_snapshot/ | |
cp /home/ss/.bitcoin/bitcoin.conf /home/ss/snapshots/core_snapshot/ | |
cp -r /home/ss/.bitcoin/blocks /home/ss/snapshots/core_snapshot/blocks | |
cp /home/ss/.bitcoin/mempool.dat /home/ss/snapshots/core_snapshot/ | |
bitcoind -disablewallet --daemon | |
cd /home/ss/snapshots/core_snapshot/ | |
zip -r ../snapshot${now}.zip ./* | |
cd .. | |
rm -rf core_snapshot | |
sha256sum snapshot${now}.zip > snapshot${now}.txt | |
mv snapshot* /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment