Migration of wallet accounts to labels 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
OK, thanks.
For anyone else doing this type of migration, the procedure I did was :

bitcoin-cli listaccounts   //to get amounts of all balances on each account
copy old wallet to newer version node
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

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

bitcoin-cli listtransactions XXX where XXX is number of last transactions you want to see

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