<p>OK, thanks.
For anyone else doing this type of migration, the procedure I did was :</p>
<ol>
<li>bitcoin-cli listaccounts   //to get amounts of all balances on each account</li>
<li>copy old wallet to newer version node</li>
<li>bitcoind -upgradewallet //to upgrade wallet to newest version</li>
</ol>
<p>This procedure preserves all keys, addresses and makes account a label so now when you enter bitcoin-cli listlabels you get all labels as were accounts before</p>
<ol start="4">
<li>Since label can not have any balance, in separate database enter balance of each account/label from first step.</li>
</ol>
<p>While upgrading make note of new transactions that should be added to wallet and run</p>
<ol start="5">
<li><p>bitcoin-cli listtransactions XXX where XXX is number of last transactions you want to see</p>
</li>
<li><p>add each new incoming transaction (if any) to database balance so balance in database match balance on wallet</p>
</li>
</ol>
<p>That is it. Seems complex but it can be done in no time even for large number of accounts.</p>
<p>Best regards</p>

CC BY-SA 4.0
2021-04-05T09:47:32.563Z
2021-04-05T09:47:32.563Z
nklak
<p>From what I have read, when you upgrade Bitcoin core, the accounts will become labels. If my understanding is correct. addresses previously associated with an account will now be associated with a label with the same name.</p>
<p>You will not be able to ask Bitcoin core to compute a balance for a label. The accounts feature had some significant problems and was being used in ways that had not been anticipated. Therefore many associated actions and APIs for accounts are not available for labels.</p>
<hr />
<p>Useful references</p>
<ul>
<li><a href="https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getbalance/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getbalance/</a></li>
<li><a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getbalance/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getbalance/</a></li>
</ul>

CC BY-SA 4.0
2021-04-04T09:28:22.647Z
2021-04-04T09:48:33.417Z
2021-04-04T09:48:33.417Z
RedGrittyBrick
<p>I have multiple accounts on older bitcoin core version (0.16.3) but in order to move to newer releases I must migrate accounts to new label format with additional database which hold each account balance. Since I have many accounts what is best (and easier) way to move all accounts to label format and to keep addresses that each account has.</p>
<p>Best regards</p>

<wallet>
Migration of wallet accounts to labels
nklak
# Migration of wallet accounts to labels

(Asked by: username_0 on 2021-04-04)

I have multiple accounts on older bitcoin core version (0.16.3) but in order to move to newer releases I must migrate accounts to new label format with additional database which hold each account balance. Since I have many accounts what is best (and easier) way to move all accounts to label format and to keep addresses that each account has.

Best regards

**Tags:** wallet


---

## 2 answers

### Answer by username_0 on 2021-04-05. Score: 1

OK, thanks.
For anyone else doing this type of migration, the procedure I did was :

1. bitcoin-cli listaccounts //to get amounts of all balances on each account
2. copy old wallet to newer version node
3. bitcoind -upgradewallet //to upgrade wallet to newest version

This procedure preserves all keys, addresses and makes account a label so now when you enter bitcoin-cli listlabels you get all labels as were accounts before

4. Since label can not have any balance, in separate database enter balance of each account/label from first step.

While upgrading make note of new transactions that should be added to wallet and run

5. bitcoin-cli listtransactions XXX where XXX is number of last transactions you want to see
6. add each new incoming transaction (if any) to database balance so balance in database match balance on wallet

That is it. Seems complex but it can be done in no time even for large number of accounts.

Best regards


---

### Answer by username_1 on 2021-04-04. Score: 0

From what I have read, when you upgrade Bitcoin core, the accounts will become labels. If my understanding is correct. addresses previously associated with an account will now be associated with a label with the same name.

You will not be able to ask Bitcoin core to compute a balance for a label. The accounts feature had some significant problems and was being used in ways that had not been anticipated. Therefore many associated actions and APIs for accounts are not available for labels.

---

Useful references

* <https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getbalance/>
* <https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getbalance/>


---

