The question is published on by Tutorial Guruji team.
Since version 0.13.0 Bitcoin Core supports HD wallets. In a .txt dump of the wallet (created by JSON-RPC dumpwallet command), one can find an “extended private masterkey” which is intended to be used for generation of rest of the private keys.
How can lost private keys be restored with the help of the mentioned masterkey in Bitcoin Core? I have not found any RPC method that would accept the masterkey to generate private keys
Unfortunately, Bitcoin Core itself does not provide methods to generate private keys from master key. However, there are libraries that can produce correct keys from xprv string (chain m/iH/0/k with hardened keys according to BIP0032) – I used https://github.com/prusnak/bip32utils for Python.