Author

Topic: database/log.00000XXX (Read 1044 times)

legendary
Activity: 1072
Merit: 1181
August 28, 2012, 05:36:21 PM
#6
blkindex.dat, addr.dat (before 0.7.0) and wallet.dat are database files. They live in a database environment, consisting of several files, including transaction logs that are necessary in order to recover from (some) crashes.

When using -detachdb (or always for wallet.dat), BDB is asked to fully synchronize all changes to disk, and remove the references from the database files to the log files in the environment.

As to what blkindex.dat contains: where every transaction and every block can be found in the blk0000*.dat files, and where each transaction output was spent.
hero member
Activity: 725
Merit: 503
August 28, 2012, 05:22:54 PM
#5
But what's in the database? The block chain is in the blkXXXX.dat files...
legendary
Activity: 1072
Merit: 1181
August 28, 2012, 09:14:47 AM
#4
If you run with -detachdb, and exit cleanly, they can be removed.

In every other case, the database files refers to indices in the log file, and the program will fail to open the database files in many cases.
kjj
legendary
Activity: 1302
Merit: 1026
August 28, 2012, 08:53:00 AM
#3
Bitcoin should automatically purge them either when it starts, or when it exits.  Just restart now and then and they'll be fine.
legendary
Activity: 2506
Merit: 1010
August 28, 2012, 03:58:35 AM
#2
How can I remove these without having to manually do it?

Well, you can write a script, but the client has no mechanism to remove them or to reinitialize.

They can't just be deleted willy nilly though.  They include data necessary to recover the database if it didn't happen to get shut down properly.

So at a minimum, make sure you have exited cleanly the app and make a backup of the wallet.dat before purging the .log files.
hero member
Activity: 725
Merit: 503
August 28, 2012, 03:50:36 AM
#1
How can I remove these without having to manually do it?
Jump to: