<p>The addresses that you get from <code>getnewaddress</code> are part of your wallet. To back them up, use the <code>backupwallet</code> RPC command. This will create a copy of your wallet file at the location that you specify.</p>

<p>Bitcoin Core by default has a keypool of 1000 keys. However because Bitcoin Core uses BIP 32 Hierarchical Deterministic wallets, one backup is sufficient for you to be able to generate all of the private keys your wallet will ever have. </p>

<p>Although you will have access to all private keys, it is still recommended  that you backup regularly in order to preserve transactional data and other metadata stored in the wallet, as well as have all of the keys and not need to regenerate them upon restore (restoring may not necessarily get all of the transactions associated with keys that were not in the keypool at the time of backup). Thus you should backup the wallet every 1000 keys so that the latest unused keypool is always part of your most recent backup.</p>

<p>Also, if your wallet is encrypted (it should be), then you will need to unlock your wallet every 1000 keys so that the keypool can be refilled. You can do that with the <code>walletpassphrase</code> RPC command.</p>

CC BY-SA 3.0
2017-12-02T05:50:38.057Z
2017-12-02T05:56:24.540Z
2017-12-02T05:56:24.540Z
Ava Chow
<p>i am working on website which receives and store bitcoins 
each user will credited with newaddress for deposit BTC how would i take backup of their privatekeys with bitcoind
i think bitcoind generate address from key pool which is limited to 100 after that it will generate new key pool 
what are the best practices to maintain backups </p>

<bitcoin-core><bitcoind><client>
how do i backup private keys of user address which are generated by getnewaddress?
Jignesh Chaudhary
# how do i backup private keys of user address which are generated by getnewaddress?

(Asked by: username_0 on 2017-12-02)

i am working on website which receives and store bitcoins
each user will credited with newaddress for deposit BTC how would i take backup of their privatekeys with bitcoind
i think bitcoind generate address from key pool which is limited to 100 after that it will generate new key pool
what are the best practices to maintain backups

**Tags:** bitcoin-core, bitcoind, client


---

## 1 answers

### Answer by username_1 on 2017-12-02. Score: 2

The addresses that you get from `getnewaddress` are part of your wallet. To back them up, use the `backupwallet` RPC command. This will create a copy of your wallet file at the location that you specify.

Bitcoin Core by default has a keypool of 1000 keys. However because Bitcoin Core uses BIP 32 Hierarchical Deterministic wallets, one backup is sufficient for you to be able to generate all of the private keys your wallet will ever have.

Although you will have access to all private keys, it is still recommended that you backup regularly in order to preserve transactional data and other metadata stored in the wallet, as well as have all of the keys and not need to regenerate them upon restore (restoring may not necessarily get all of the transactions associated with keys that were not in the keypool at the time of backup). Thus you should backup the wallet every 1000 keys so that the latest unused keypool is always part of your most recent backup.

Also, if your wallet is encrypted (it should be), then you will need to unlock your wallet every 1000 keys so that the keypool can be refilled. You can do that with the `walletpassphrase` RPC command.


---

