Back up and Restore Wallet

Backing up your wallet in QT

It is important to back-up your wallet on initial use and throughout use, you can do this very easily following the guide below. Firstly, the wallet.dat file must be backed up in case the current wallet version corrupts or is lost in some way.

From the File menu > Backup Wallet...

This will allow you to save your .dat file somewhere safe. It is recommend to save it to a USB stick or similar.

Saving your .dat file on a secondary USB stick will provide extra redundancy, incase the file becomes corrupt or lost.

If you have encrypted your wallet prior to backing up as above, please be sure to make a note or remember your wallet passphrase.

If you forget or cannot access the passphrase, your coins will be unobtainable, this goes for RPC server functions including those of Masternodes.

Private Key Backup from Console

You can also back up your private keys.

Go to the receive tab of the wallet and copy the address you would like to back up, if there are many, follow listaccountgroupings further down. If you are creating a new address, you can straight away copy the address for the next step.

Enter the console

From the File tools menu. Select > ‘Debug console’.

As you have encrypted your wallet, you now need to unlock it from within the console to perform these additional tasks, so type:

walletpassphrase YourP455w0rdh3re! 600

*Replacing YourP455w0rdh3re! with your own strong password you created when encrypting the wallet.

* The 600 part is the amount of seconds before the wallet autolocks after entering the command.

Dump the private keys

  • Find your addresses.

  • In console type

 listaddressgroupings

  • Make a note of the addresses listed.

  • While still in console type

dumpprivkey <yourwagerraddress>

The console will now output your private key for that address. Repeat the process for all your addresses and store the private key somewhere safe. If you get an error: Error: Please enter the wallet passphrase with wallet passphrase first. (code -13) you need to unlock your wallet from the console with walletpassphrase command.

walletpassphrase YourP455w0rdh3re! 600

DO NOT store your wallet.dat private keys on any sort of online backup space, it is highly not advised to store them in your email address account as some do when they mail the private keys to themselves. If a hacker gets into your online storage account via getting into your email account, your coins will most likely be lost forever.

The console

The debug console, or just console for short, is a service space within the wallet whereby you can send RPC commands as you would on a wagerrd terminal version of the software. You can find more information from within the terminal by typing help, and hitting return.

How to restore the wallet.dat file

If you need to restore the previous wallet.dat file that you backed up in case of a computer malfunction or just to reconcile your addresses to a new instance, simply shut down the client wallet and wait for the shut down message to disappear.

If this is a brand new wallet, first open and shut down the client as the data folders and wallet.dat must be created automatically.

Once the wallet is shut down, open the data directory for your operating system. The data directory varies on different operating systems and platforms as follows:

  • Windows - %appdata%/wagerr

    • (open using file explorer or run)

    • Windows users can copy %APPDATA%\Wagerr into the search pane and press return

  • Mac OS - ~/Library/Application Support/Wagerr -

    • (Using the finder app, Go to menu then folder, enter ~/Library/Application Support/wagerr)

    • Mac users could also copy ~/Library/Application Support/Wagerr into the spotlight search (Command + Spacebar) and press return.

Then select the folder:

  • Linux - ~/.wagerr

Now the client is completely shut down and the data directory is open, you will see the new instance of the wallet.dat file, it will have a small size in kilobytes as little blockchain information is held there.

Just rename the existing "wallet.dat" file to "install_wallet.dat" or similar. You can then copy the previously backed up wallet.dat into the folder alongside the renamed install_wallet.dat.

Make sure to COPY and not CUT the backed up wallet.dat file in case of a computer error, you will always have the original copy.

After you have copied the backed up wallet.dat into the data folder you can restart the client wallet and after synchronization, you should see the correct coin balance.

If the balance does not appear correct, open Tools > Wallet repair and click on the ‘Rebuild index’ button.

The client will then reindex the existing blocks from the hard disk and then fully synchronize up to the current blockheight, any missing transactions will then be restored. Note that syncronizing will take several hours.

How to restore the wallet address private keys

Should you need to restore your previously backed up private keys, firstly open the client wallet and then the ‘Debug console’ from Tools > Debug Console.

Now you have opened the Debug console, unlock the client wallet for further commands using:

walletpassphrase YourPassphrase 600

The press return on the keyboard:

(The 600 addition is the time seconds the client wallet will be unlocked for before auto locking again - this equates to ten minutes)

Now you can import the private keys, one at a time by doing:

importprivkey  WaXSXeWeeE93qs449finW3oSK2U1CvPpe6i8Qa7WoWby MyAddress

(replace WaXSXeWeeE93qs449finW3oSK2U1CvPpe6i8Qa7WoWby with your own private key and if you want to name the address for easier recognition, replace MyAddress with your own preferred choice)

Now hit Return on the keyboard..

...After some time the private key will be imported and the public address for it will be accessible and you will be able to see the balances.

If the balance does not appear correct, open Tools > Wallet repair and click on the ‘Rebuild index’ button.

The client will then reindex the existing blocks from the hard disk and then fully synchronize up to the current blockheight, any missing transactions will then be restored.

Last updated