My question is : How to restore a wallet including all the addresses i had created in the past ?
Which version of Bitcoin Core are you using? You might wanna try the prompt "rescan" after importing ur private key. It tells Bitcoin Core to scan the blockchain for transactions associated with the imported private key.
This process might take some time but once it is successfully completed, all addresses corresponding to the imported private key should now be part of your wallet.
Another consideration would be the import of the wallet.dat because importing HD wallets via "importprvkey" might not restore all addresses that were associated.
With the release of v0.13.0 all created wallets were HD wallets by default.
Thank you for your reply !
I tried the -rescan option but it's seems it's not existing anymore since the v21 version.
I also read that normally this scan should be automatic now that why they remove the flag.
The problem is i still don't have all my addresses.
An other solution would be to backup directly the file "*.dat" but that's mean each time i generate a new address i need to backup the last version of this file right ?
Or maybe someone has bettter solution ?
Thanks you !