Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: kongming208 on November 05, 2010, 10:43:54 PM



Title: Block files, database files, and other stuff
Post by: kongming208 on November 05, 2010, 10:43:54 PM
Hi,

Sorry if this is a FAQ, but I didn't find the answer after a few searches.

I'm currently running bitcoin on one machine, and I see in my data directory:

./addr.dat
./blk0001.dat
./blkindex.dat
./database/log.0000000017
./__db.001
./__db.002
./__db.003
./__db.004
./__db.005
./__db.006
./db.log
./debug.log
./.lock
./wallet.dat

If I wanted to run bitcoin on multiple machines on my LAN, and I wanted to copy the block chain so that it doesn't have to re-download, which files do I need to copy? I'm guessing
./blk0001.dat
./blkindex.dat
are necessary, but what about
./__db.001
./__db.002
./__db.003
./__db.004
./__db.005
./__db.006

And the ./database/log.0000000017, db.log, debug.log, and other files don't need to be copied, yes?

Thanks for any help!


Title: Re: Block files, database files, and other stuff
Post by: MoonShadow on November 05, 2010, 11:05:30 PM
If I wanted to run bitcoin on multiple machines on my LAN, and I wanted to copy the block chain so that it doesn't have to re-download, which files do I need to copy? I'm guessing
./blk0001.dat
./blkindex.dat
are necessary, but what about

I've actually copied the blockchain before, and the two above files were all that I needed to get it to work.  I'm pretty sure that the others are checkpointing files, and it's not a bad idea to let the new client checkpoint the entire blockchain after a copy anyway.

I'm not certain, however, as that client was a while ago, and predates the checkpointing upon startup thing.


Title: Re: Block files, database files, and other stuff
Post by: BitLex on November 06, 2010, 12:12:18 AM
i copy blockchains back and forth quite often and don't copy anything else than those 2 files, blk0001.dat & blkindex.dat, never bothered with anything else.
works fine for me so far, so i guess it's alright.
i think (and please correct me if i'm worng) anything else is client-related anyway and your gonna use the copy for another client, which has/creates its own keys/hashes and DB.


Title: Re: Block files, database files, and other stuff
Post by: theymos on November 06, 2010, 12:21:58 AM
The other files are journaling files used for database recovery after a computer/Bitcoin crash. You can delete them if you're sure the database is not in an inconsistent state.


Title: Re: Block files, database files, and other stuff
Post by: thedrs on May 26, 2011, 07:50:21 PM
this should be in the FAQ...


Title: Re: Block files, database files, and other stuff
Post by: Gavin Andresen on May 27, 2011, 08:18:02 AM
this should be in the FAQ...
If only the FAQ was a wiki that anybody could edit, then thedrs could add it him or herself...

(hey, wait a minute!  it IS a wiki!)