How can I import blockchain.dat into bitcoind?

4

1

I'm getting the latest torrent and I'm running bitcoind on my linux box. How can I import this once it's downloaded?

Ryan Detzel

Posted 2014-01-31T20:18:16.343

Reputation: 333

Related: Bitcoin qt synchronization problems!

Murch 2014-02-07T11:19:29.993

Answers

5

If you are downloading the blockchain from scratch I strongly recommend using the bootstrap.dat file, which allows your computer to simply verify blocks and import them without needing to download for days or even weeks on end.

The main issue with downloading from the network is that your client will only download one block at a time. It starts with block #1 and will not try to download anything except for block #2 after block #1 is verified, and so on. As you can imagine, with network latency this can become a rather painful process, as you have endured.

The bootstrap.dat file is widely available on bittorrent, torrent files can be found here: http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/

Direct torrent link: http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bootstrap.dat.torrent/download

Downloading the bootstrap.dat file is just as secure as downloading the blockchain from peers, but since all the data is already there, the only latency you suffer between blocks is going to your hard drive and finding the next block.

You simply need to place the bootstrap.dat in your %appdata%\Bitcoin folder, (on linux/unix in your .bitcoin folder). The file will be renamed to bootstrap.dat.old when the data import is complete. Using this, it took me only 4 hours to catch up with the network, as opposed to the 1-2 weeks it took me before reformatting on the same computer.

Mark

Posted 2014-01-31T20:18:16.343

Reputation: 1 647

1Only the last paragraph is actually relevant to this question, perhaps you could crop it to that?Murch 2014-02-04T21:33:19.170

On second thought, I highlighted the most relevant part as the other information might be useful to other users.Murch 2014-02-07T11:28:23.697

3

Copy the blockchain.dat file into your bitcoind directory, and the application will begin processing the file, checking for validity as it goes. Once it parses the entire blockchain file, it will connect to peers to continue downloading more-recent blocks.

Jtibble

Posted 2014-01-31T20:18:16.343

Reputation: 31

If I already have data will I have to remove that first?Ryan Detzel 2014-01-31T21:08:06.977