Correction: I had thought that Bitcoin Core implements BIP44, which it does not. Thus, what I previously wrote about the gap-limit was wrong.
To restore your wallet-backup you place the wallet.dat into the Bitcoin Core data directory as Pieter described.
When Bitcoin Core is started, it will load the wallet.dat. The wallet.dat includes the information up to what blockchain height it was used last. So, Bitcoin Core will now from what blockchain height to search for additional transactions.
Hereby, Bitcoin Core will generate a key pool of, by default 100, unused addresses that it also checks for. Whenever it discovers a transaction corresponding to any of its addresses, it will generate more addresses from the deterministic chain to fill the key pool back up.
To recover addresses beyond the key pool, you can just request new addresses in Bitcoin Core until you have found all your funds. This type of initial backup doesn't allow you to recover meta-data such as notes about the transactions' origins or recipients as they are only stored in the wallet.dat and cannot be recovered from the preceding backup.
What's the structure of this deterministic chain (is a tree, or a single chain?)? – Yevhen – 2016-08-31T12:02:57.933
I suppose that this chain is infinite, right? – Yevhen – 2016-08-31T12:13:29.367
@Yevhen: No, there are only 2^256 possible private keys. ;) Seriously, for practical purposes it's sufficiently indistinguishable from infinite though.
– Murch – 2016-08-31T12:21:00.680And one more thing, can you please tell me, what are the paths of the chain keys (according to BIP32)? bc this formula confuses me a bit )). – Yevhen – 2016-08-31T12:21:52.663
@Yevhen: What "paths" are you talking about? Text search doesn't find that either here or in the BIP32 text. – Murch – 2016-08-31T12:27:12.263
Sorry, 'paths' was the wrong word. I meant paths as
m/44'/0'/0'/0...(m for master node, nodes with quote -- for hardened, each number is the child's index), so I can regenerate my chain in case it has larger gaps with some python bitcoin library for example. – Yevhen – 2016-08-31T12:33:56.183I don't know, you should probably ask a new question about that. – Murch – 2016-08-31T13:11:10.830
Ok. You've helped a lot, thanks very much. – Yevhen – 2016-08-31T13:13:25.653
@Murch Where do you read about that gap limit? As far as I know, Bitcoin Core has nothing like that. It's just using BIP32 to create keys deterministically from a seed. It won't reconstruct addresses when restoring a backup - only as much as the keypool will let you. But it won't skip ahead or so (which is also why there is no import support). – Pieter Wuille – 2016-08-31T13:32:36.113
@PieterWuille: There was a conversation on the Bitcoin-Dev-List about BIP44 which made me curios. BIP44which says the gap limit for BIP32 is currently set to 20. Does Bitcoin Core not implement BIP44? – Murch – 2016-08-31T15:22:16.817
I've corrected my answer. I hope it's now accurate. – Murch – 2016-08-31T15:38:42.840