[Box Backup] bbstored debug vs release database format incompatibility

Jonas Berlin boxbackup@fluffy.co.uk
Thu, 09 Feb 2006 10:06:49 +0000


Hi!

First I'd like to send my thanks for a great piece of software!

After some TODOs in the source regarding 64 bit support I decided to use
debug versions of the binaries even after fixing the 64 bit issues I
found. Then, after a month of successful use, I decided to build a
release version and start using that instead - however it seems that the
release build of bbstored makes a database that's incompatible with the
debug build.

I got this warning in the syslog:

Feb  9 10:30:16 outerspace bbstored/hk[26335]: while housekeeping
account 12345678, exception RaidFile RaidFileDoesntExist (2/11) --
aborting housekeeping run for this

I then run bbstored with "strace -f bbstored /path/to/conf" and found
out it tried to access a file that didn't exist:

[pid 22410] stat("/discs/12/boxbackup/server/backup/00000666/ob3.rfw",
0x7fffffffdb80) = -1 ENOENT (No such file or directory)

I then further went into the source and found the line that printed it
out which lead me to a couple of constants defined in
lib/backupstore/StoreStructure.h:

#ifdef NDEBUG
	#define STORE_ID_SEGMENT_LENGTH		8
	#define STORE_ID_SEGMENT_MASK		0xff
#else
	// Debug we'll use lots and lots of directories to stress things
	#define STORE_ID_SEGMENT_LENGTH		2
	#define STORE_ID_SEGMENT_MASK		0x03
#endif

After the "DOH" reaction I went ahead and changed the NDEBUG version to
use the same values as the debug version, compiled a new release build
and now it worked fine again.

Question 1: Is this kind of debug database really as resource-consuming
as the comment suggests?

Question 2: What do you suggest to do in my situation?
  a) Is it best to continue with this debug setup?
  b) Can it be converted to the "release build" setup in any way?
  c) Start from scratch with a empty database and let the clients send
everything again (I already got a weeks worth of 512/512 internet
bandwidth in there)
  d) something else?

Question 3: Regarding alternative 2c) above: will the clients freak out
if the database suddenly disappears? Or do they always work based on
what the server reports?

I'd be grateful for any suggestions and would like to avoid 2c) if
possible! Thanks in advance!

BR, xkr47