[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578157: and another!



On Mon, Jan 10, 2011 at 02:15:17PM -0500, micah anderson wrote:
On Mon, Jan 10, 2011 at 12:54:58AM -0500, micah anderson wrote:
Transaction logs are great, if you want to do recovery, but I wonder if they are really needed. If I recall, they simply grow, until you rotate them, unless you set specific DB_CONFIG flags.

Database transaction logs are there in the case of crash, you can do a restore by replaying the logs.

Bitcoin stores inside the *database* the entire history of all bitcoin operations. The fact that database transaction logs are on just means that the entire history of all database operations, (which, incidentally aren't exclusively bitcoin trades between users), is also written to the transaction logs.

Ok.  I think I get it now.  Thanks for clarifying.

I consider adding a shell wrapper looking something like this:

 set -e
 umask=077
 basedir=~/.bitcoin
 dbfile="$basedir/DB_CONFIG"
 cfgfile="$basedir/bitcoin.conf"
 [ -d ~/.bitcoin ] || mkdir ~/.bitcoin
 [ -e "$dbfile" ] || echo 'set_flags DB_LOG_AUTOREMOVE' > "$dbfile"
 [ -e "$cfgfile" ] || perl -le 'print"rpcpassword=",map{(a..z,A..Z,0..9)[rand 62]}0..9' > "$cfgfile"
 exec bitcoind "$@"

What do you think about that?


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature


Reply to: