Bitcoin Forum
June 20, 2024, 02:27:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: database/log.00000XXX  (Read 1014 times)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
August 28, 2012, 08:50:36 AM
 #1

How can I remove these without having to manually do it?

BANKBOOK GWT Wallet & no-FIAT Billing API
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
August 28, 2012, 08:58:35 AM
Last edit: August 28, 2012, 05:27:31 PM by Stephen Gornick
 #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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
August 28, 2012, 01:53:00 PM
 #3

Bitcoin should automatically purge them either when it starts, or when it exits.  Just restart now and then and they'll be fine.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
August 28, 2012, 02:14:47 PM
 #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.

I do Bitcoin stuff.
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
August 28, 2012, 10:22:54 PM
 #5

But what's in the database? The block chain is in the blkXXXX.dat files...

BANKBOOK GWT Wallet & no-FIAT Billing API
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
August 28, 2012, 10: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.

I do Bitcoin stuff.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!