[Box Backup] BoxBackup (chris/merge) - Store Error

Ben Summers boxbackup@fluffy.co.uk
Fri, 31 Aug 2007 10:02:35 +0100


On Thu, 30 Aug 2007, Chris Wilson wrote:
>
>
>> When I run the bbstoreaccounts check option I get ...
>>
>> root@pegasus:~# /usr/local/bin/bbstoreaccounts check 1
>> Checking store account ID 0x000001...
>> Phase 1, check objects...
>> Phase 2, check directories...
>> Phase 3, check root...
>> WARNING: Root directory doesn't exist
>>
>
> That's very interesting. Since backups are working correctly, and
> bbstoreaccounts' attempt to recreate it fails, I believe that the root
> directory does actually exist, and is not found for some reason.
> bbstoreaccounts appears to be checking some kind of block index to  
> find
> it. I don't claim to understand exactly what it's doing. Ben, do  
> you have
> any ideas?


It's possible that there are renmants of a previous attempt to over  
write the root directory, so there's enough there to stop it being  
rewritten and not enough to allow it to be read.

BackupStoreCheck::CreateBlankDirectory() in lib/backupstore/ 
BackupStoreCheck2.cpp could be modified to force overwriting of the  
root. If it couldn't be found in earlier checks, I reckon overwriting  
anything left is fine.

Change

   	obj.Open(false /* don't allow overwriting */);
to
	obj.Open(true /* allow overwriting */);

and it should be fine. Check that the other callers will be fine too.

Also, can we have an ls -la for the root directory of the store,  
containing the o01.* files? Then you can write a test which sets  
things up so it looks like your situation, and we can test to make  
sure it's recovered in future.

Ben