How do I make a backup of the blockchain so I can avoid a full resync if something goes wrong?

After a successful full resync, and if your wallet it working fine, you can make a backup of the good blockchain by following these steps below:

1) Close your wallet gracefully (File -> Exit or ./pivx-cli stop)

2) Go to your blockchain data directory. (default directories listed in this article)

3) Copy the 4 folders (blocks, chainstate, sporks, & zerocoin) elsewhere. (Some other directory or drive)

4) You can now start the wallet again.

Now, if you face a corrupt blockchain issue again (as in Question 1 above), you can close the wallet then delete the 2 folders (chainstate & blocks), copy over the good backup blocks & chainstate folders to it, then restart the wallet.

Back to top