Created
November 8, 2019 06:54
-
-
Save rocket-pig/802f3e13dc34268c6ca8233fc6cd6d2d to your computer and use it in GitHub Desktop.
navcoin forked? you on wrong chain? dont want to spend ten mins trying to remember where everything is and what to type, well here ya go
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/bash | |
# might need to change instances of 'user' to your username. | |
# add following line to your crontab to have a fresh (ish) bootstrap on hand. | |
# @weekly tar -czf /home/user/projects/bootstrap/bootstrap.tar /home/user/.navcoin4/chainstate /home/user/.navcoin4/blocks | |
navcoin-cli stop | |
echo "Waiting a bit so navcoind has completed..." | |
sleep 10 | |
cd /home/user | |
mkdir tmp_bootstrap | |
echo "Saving wallet.dat" | |
mv .navcoin4/wallet.dat tmp_bootstrap | |
echo "Deleting old files" | |
rm -rf .navcoin4/* | |
echo "restoring from projects/bootstrap/bootstrap.tar" | |
tar xf projects/bootstrap/bootstrap.tar -C .navcoin4/ | |
echo "Restoring wallet" | |
mv tmp_bootstrap/wallet.dat .navcoin4/ | |
navcoind -daemon | |
rm -rf tmp_bootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment