Backing up and Restoring your wallet

In this guide we will show you how to backup and restore TWINS wallet.

Backup :

This documentation describes how to safely back up your wallet file for safe storage in case your computer or laptop is damaged or lost. TWINS Core stores all data necessary to control your TWINS addresses in a single file called wallet.dat. This wallet is in the Berkeley DB format and stores the pairs of private/public cryptographic keys used to manage your balances on the TWINS blockchain.

Backup from TWINS core :

Firstly, never copy your wallet.dat file while TWINS Core is open. Always use the File > Backup Wallet menu if the wallet is open.

When you select this menu item, a dialog box will appear to specify where the file should be saved. Enter a name for the file, select a location and click Save.

Backup by copying wallet.dat

If TWINS Core is not running, you can also backup your wallet by simply copying the wallet.dat file to another location. This file is located in the TWINS data folder. You were given the option to specify the location of this folder during installation, but by default the folder is in the following locations on different operating systems:

  • Windows

    C:\Users\YourUserName\Appdata\Roaming\TWINS

    You can access this folder directly by Windows Key + R and typing %APPDATA%\twins

  • Linux

    /home/YourUserName/.twins

    You can access this folder directly by typing cd ~/.twins at the terminal or ~/.twins in the path bar using the Go > Enter Location… menu item in Files

  • macOS

    /Users/YourUserName/Library/Application Support/TWINS

    You can access this folder by typing cd ~/Library/Application Support/TWINS at the terminal or ~/Library/Application Support/TWINS in dialog at the Go > Go To Folder menu item in Finder

Ensure TWINS Core is not running, then simply copy the wallet.dat file from this folder to another folder in the normal way for your operating system.

If you have masternodes you must also backup your masternode.conf file.

It's also a good idea to backup twins.conf since it contains your custom wallet settings.

Both files are in the same directory as your wallet.dat file.

Keep a backup of your wallet file on a usb drive in a location away from your computer.

Restore:

To restore a backup, install TWINS Core on the target system (or stop it, if already installed) and rename the existing wallet.dat file in the twins folder to wallet.old

Then copy the backup wallet file to the twins data folder and ensure it is named wallet.dat. Now, when you start TWINS Core again, it will load the new wallet. Do not replace wallet.dat while TWINS Core is running, since this will result in data corruption.

Do not forget to copy over masternode.conf and twins.conf if you backed it up.