How to: backup ION coin blockchain database

You probably already know that it’s important to maintain a backup of your wallet.dat, the file that contains all the private keys for your wallet. Did you know it’s also a good practice to backup your local copy of the blockchain database to speed recovery in case your data gets corrupted. When your blockchain data gets corrupted it doesn’t affect the security of your coins, but it does interfere with your wallet usage, and can keep you from connecting with the network for basic functions like sending and receiving as well as advanced functions like staking and operating masternodes. Several  known events can corrupt the database: a power outage, improper shutdown, and interrupted data writes. When you have a backup, you can save yourself many hours or even days of resyncing if you’re on a slow connection. As the blockchain is not current, loss of stakes or masternode rewards is possible due to downtime. Follow the steps below to create a backup of the essential data directory chain folders that can be easily and quickly restored in the event of an emergency.

Exit the wallet

 Close your wallet gracefully (File -> Exit or ./ion-cli stop)*

*If running Qt client, wait for the shutdown message to disappear.

If running daemon, wait for the command line to reappear.

Locate the blockchain data directory

Via the file explorer of your operating system or via command console, go to your blockchain data
directory
:

Windows data directory

Go to Start -> Run (or press WinKey+R) and run this:

%APPDATA%\ioncoin

ionomy's data folder will open. For most users, this is the following locations:

C:\Documents and Settings\YourUserName\Application data\ioncoin (XP)

C:\Users\YourUserName\Appdata\Roaming\ioncoin (Vista and 7, 8 & 10)

"AppData" and "Application data" are hidden by default. (Show hidden files and folders from the menu to enable viewing).

You can also store ionomy data files in any other drive or folder.

Linux Data directory

By default ION will put its data here:

~/.ioncoin/

You need to do a "ls -a" to see directories that start with a dot.

If that's not it, you can do a search like this:

find / -name wallet.dat -print 2>/dev/null

Mac Data directory

By default ionomy will put its data here:

~/Library/Application Support/ioncoin

To search for above data directory:

Open Finder and Go to: `~/Library` ​*NOT*​ `/Library` as it’s a big difference. From there, navigate to “Application Support” -> ioncoin

Copy the following Four Folders (blocks, chainstate, sporks, & zerocoin)  

Choose a secure destination other than the computer on which the client is installed. You could choose a secure external hard drive, for instance. If you don’t have a secondary storage device, save the folders in a different directory or drive.

While you’re at it, backup the wallet.dat from the file menu to a secure location.

Restart the wallet again.

Should there be a corrupt blockchain issue on client startup, this can be remedied with your backup:

  • Close the wallet
  • Open the .ioncoin data directory
  • Delete the chainstate and blocks folder
  • Navigate to your backup folder
  • Copy over all backup folders to the directory
  • Restart the wallet

The wallet will still have to download any new blocks since the last backup was saved. This process can save potential client and node downtime.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.