Saved .bitcoin directory full ~9 GB block data, won't work when copied to another system 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.
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.