[Box Backup-dev] Re: [Box Backup] bbackupd - read errors on database files

Ben Summers boxbackup-dev at fluffy.co.uk
Fri Apr 13 12:18:24 BST 2007


On Thu, 12 Apr 2007 21:38:02, Chris Wilson wrote:

> compare -aq does not compare checksums of anything, as far as I  
> know, it
> just checks the file attributes. compare -a checks the file  
> contents. A
> new mode might be compare -ac, which checks the checksums of remote  
> blocks
> against their re-encrypted local block checksums.

Wrong.

compare -q does check the checksums. Here's the code, run for each file:

	// Compare file -- fetch it
	mrConnection.QueryGetBlockIndexByID(i->second->GetObjectID());

	// Stream containing block index
	std::auto_ptr<IOStream> blockIndexStream(mrConnection.ReceiveStream());
						
	// Compare
	equal = BackupStoreFile::CompareFileContentsAgainstBlockIndex 
(localName.c_str(), *blockIndexStream, mrConnection.GetTimeout());

Ben





More information about the Boxbackup-dev mailing list