<p>You will find the .dat files in the following locations:</p>

<ul>
<li>Linux: ~/.bitcoin/blocks</li>
<li>MacOS: ~/Library/Application Support/Bitcoin/blocks</li>
<li>Windows: %APPDATA%Bitcoin\blocks</li>
<li>WinXP: C:\Documents and Settings\YourUserName\Application data\Bitcoin\blocks</li>
<li>Win7/Win8/Vista: C:\Users\YourUserName\AppData\Roaming\Bitcoin\blocks</li>
</ul>

<p>I always found the following attached image helpful in order to understand the structure of the dat files. I am sure it will help you too.</p>

<p><img src="https://i.sstatic.net/r02W1.jpg" alt=".dat files data structure"></p>

CC BY-SA 3.0
2014-06-24T08:58:23.837Z
2014-06-24T09:11:07.840Z
2014-06-24T09:11:07.840Z
Biteasy.com
<p>In windows it is stored in Local>AppData>Bitcoin folder on linux it is stored in the Bitcoin folder > blockchain and then blkxxx.dat</p>

CC BY-SA 3.0
2014-01-24T20:23:53.803Z
http://bitcoin.stackexchange.com/questions/10381/creating-my-own-bootstrap-dat
Khan Shahrukh
CC BY-SA 3.0
2014-01-24T20:00:07.437Z
2014-01-24T20:00:07.437Z
Khan Shahrukh
<p>I just downloaded Bitcoin-QT, and torrented a snapshot of the block chain that is a couple weeks old. I put the bootstrap.dat in ~/Library/Application Support/Bitcoin and started up the app. Right now it is "Importing blocks from disk". Where do the blocks goes once they've been imported? A friend of mine says that the Bitcoin app makes a Merkle tree out of the blocks in the block chain. How is this stored? I want to write a program that takes snapshots of the block chain every couple hours. It would be much better if I could just update a copy of the block chain as needed instead of making an entire new copy and deleting the old copy.</p>

<p>How do I make a bootstrap.dat out of the blkXXXXX.dat files?</p>

<blockchain>
Location of blockchain locally on different platforms, and structure of blockchain file?
Broseph
# Location of blockchain locally on different platforms, and structure of blockchain file?

(Asked by: username_0 on 2014-01-24)

I just downloaded Bitcoin-QT, and torrented a snapshot of the block chain that is a couple weeks old. I put the bootstrap.dat in ~/Library/Application Support/Bitcoin and started up the app. Right now it is "Importing blocks from disk". Where do the blocks goes once they've been imported? A friend of mine says that the Bitcoin app makes a Merkle tree out of the blocks in the block chain. How is this stored? I want to write a program that takes snapshots of the block chain every couple hours. It would be much better if I could just update a copy of the block chain as needed instead of making an entire new copy and deleting the old copy.

How do I make a bootstrap.dat out of the blkXXXXX.dat files?

**Tags:** blockchain


---

## 2 answers

### Answer by username_1 on 2014-06-24. Score: 1 | Accepted answer

You will find the .dat files in the following locations:

* Linux: ~/.bitcoin/blocks
* MacOS: ~/Library/Application Support/Bitcoin/blocks
* Windows: %APPDATA%Bitcoin\blocks
* WinXP: C:\Documents and Settings\YourUserName\Application data\Bitcoin\blocks
* Win7/Win8/Vista: C:\Users\YourUserName\AppData\Roaming\Bitcoin\blocks

I always found the following attached image helpful in order to understand the structure of the dat files. I am sure it will help you too.

![.dat files data structure](https://i.sstatic.net/r02W1.jpg)


---

### Answer by username_2 on 2014-01-24. Score: 0

In windows it is stored in Local>AppData>Bitcoin folder on linux it is stored in the Bitcoin folder > blockchain and then blkxxx.dat

> **Comments:**
> **username_2**: http://bitcoin.stackexchange.com/questions/10381/creating-my-own-bootstrap-dat  

---

