<p>Two things come to mind as possible reasons.</p>

<p>The most probable reason is that you've switched client versions. There was a switch between 0.7 and 0.8 in how the block index (not the block data itself) was stored; it was changed from BerkeleyDB to LevelDB. If you remove the <code>blkindex.dat</code> (and really want to keep an index around, which is unlikely) you can restart the client with <code>-rescan</code> and <code>-txindex</code>. It will take a while (an hour?) to complete the indexing.</p>

<p>The other reason that I can think of is that it's genuinely corrupt, but that's unlikely.</p>

CC BY-SA 3.0
2013-04-03T15:48:12.427Z
No I used the same client version, bitcoinqt, each time. I tried this on the original system used for DL'ing all the block files. Which was ubuntu 12.04 LTS and another newer system Ubuntu 12.10. Both with the 0.7 bitcoin. I'm not familiar with running bitcoin from command line yet. Silly question but can you use (send , receive bitcoins , etc) without having to get all those massive block files? I could fine no answer to this anywhere else.
maxwell
CC BY-SA 3.0
2013-04-03T16:24:15.090Z
I deleted (moved to temp directory) the blkindex.dat file and then started ./bitcoind from command line with -rescan and -txindex options. It started running but it wiped out most of the blk0004.dat file and so wants to download yet another 2 gigs of data. Is this the only way?
maxwell
CC BY-SA 3.0
2013-04-02T22:13:08.127Z
2013-04-03T00:32:37.340Z
2013-04-03T00:32:37.340Z
Rooke
<p>I had to delete my .bitcoin directory in Ubuntu 12.10, after months of getting the near 9 GB of blk data files.</p>

<p>I copied everything over to another machine (and back to the original too) and it gives me:</p>

<blockquote>
  <p>A fatal error occurred. Bitcoin can no longer continue safely and will quit.
  <br/>
     EXCEPTION: St13runtime_error <br/>
     CDB() : can't open database file blkindex.dat, error 22 <br/>
     bitcoin in Runaway exception <br/></p>
</blockquote>

<p>I tried <code>chmod +w</code> on the files, but still no go.  </p>

<blockchain><bitcoin-core>
Saved .bitcoin directory full ~9 GB block data, won't work when copied to another system
maxwell
# Saved .bitcoin directory full ~9 GB block data, won't work when copied to another system

(Asked by: username_0 on 2013-04-02)

I had to delete my .bitcoin directory in Ubuntu 12.10, after months of getting the near 9 GB of blk data files.

I copied everything over to another machine (and back to the original too) and it gives me:

> A fatal error occurred. Bitcoin can no longer continue safely and will quit.
>   
> EXCEPTION: St13runtime\_error   
> CDB() : can't open database file blkindex.dat, error 22   
> bitcoin in Runaway exception

I tried `chmod +w` on the files, but still no go.

**Tags:** blockchain, bitcoin-core


---

## 1 answers

### Answer by username_1 on 2013-04-02. Score: 1

Two things come to mind as possible reasons.

The most probable reason is that you've switched client versions. There was a switch between 0.7 and 0.8 in how the block index (not the block data itself) was stored; it was changed from BerkeleyDB to LevelDB. If you remove the `blkindex.dat` (and really want to keep an index around, which is unlikely) you can restart the client with `-rescan` and `-txindex`. It will take a while (an hour?) to complete the indexing.

The other reason that I can think of is that it's genuinely corrupt, but that's unlikely.

> **Comments:**
> **username_0**: No I used the same client version, bitcoinqt, each time. I tried this on the original system used for DL'ing all the block files. Which was ubuntu 12.04 LTS and another newer system Ubuntu 12.10. Both with the 0.7 bitcoin. I'm not familiar with running bitcoin from command line yet. Silly question but can you use (send , receive bitcoins , etc) without having to get all those massive block files? I could fine no answer to this anywhere else.  
> **username_0**: I deleted (moved to temp directory) the blkindex.dat file and then started ./bitcoind from command line with -rescan and -txindex options. It started running but it wiped out most of the blk0004.dat file and so wants to download yet another 2 gigs of data. Is this the only way?  

---

