Bitcoin Forum
November 12, 2024, 04:21:43 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: wallet.dat file or Private Keys, What to Backup?  (Read 213 times)
ironfeast (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
October 24, 2018, 06:37:01 AM
 #1

Hi there,

I am a newbie to Bitcoin and am using bitcoin core CLI for a while. I know that it's very important to take backups.

What should I take backup of:

wallet.dat file

or

Private Keys

or

Both
---------------------------------------------

And in how many days I should take backup. And how I can make recovery of my balance in both cases if my node goes down.

Help really-really needed. Thanks in advance.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 24, 2018, 06:58:30 AM
Merited by achow101 (4), S_Therapist (1)
 #2

You need private keys to access your coins. So, basically you need just a backup of your private keys.

The wallet.dat file contains your master private key (which is needed to derive all further private keys).
Therefore it is more convenient to simply backup the wallet.dat instead of backing up each private key individually.



And in how many days I should take backup.

You only need to backup once (assuming you don't change your password). If you change your wallet password, a new backup is required.
You don't need to back it up each X days. Just after each password change.

Also make sure to have multiple copies spread. And do NOT keep all backups connected to a power source (one lightning strike could easily roast all of your hardware connected).

Ideally, you make an paper-backup of your master private key (starting with xprv..). Just to be on the safe side.



And how I can make recovery of my balance in both cases if my node goes down.

If your node simply crashes, your wallet.dat file shouldn't be corrupted at all.
Simply start core and let it repair the database itself (it will redownload, resync, whatever is necessary..). But your private keys stay untouched.

However, if somehow the wallet.dat gets corrupted, you simply need to install core (assuming its not installed) and place your wallet.dat into the data directory.
Then startup core. That's it.

Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
October 24, 2018, 01:54:28 PM
 #3

Use the option in the file menu to backup your wallet.dat file. If it says HD in the bottom right corner of the bitcoin qt window you only need to backup the wallet file once. If it doesn't then you need to back it up every 90 or so spending transactions.

If you don't have a GUI then see whether getwalletinfo says you have an hdseedid or not and act accordingly: https://bitcoin.org/en/developer-reference#getwalletinfo
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!