As far as I know, there is no command to restore the wallet from a backup file.
The only way to do this is to replace the wallet.dat
of a newly created wallet with the backup file, which is hardly an intuitive way.
This PR implements the restorewallet
RPC command which restores the wallet from the backup file.
To test:
First create a backup file:
$ bitcoin-cli -rpcwallet="wallet-01" backupwallet /home/Backups/wallet-01.bak
Then restore it in another wallet:
$ bitcoin-cli restorewallet "restored-wallet-01" /home/Backups/wallet-01.bak