[Box Backup] How to move store to new machine

Ben Summers boxbackup@fluffy.co.uk
Sun, 14 May 2006 21:35:58 +0100


On 14 May 2006, at 16:30, Chris Wilson wrote:
>
>> user@old:~$ ps -ef | grep bbstored
>> <none>
>>
>> user@old:~$ sudo find /root/.bu/ -name write.lock -exec ls -l {} \;
>> -rw-------  1 _bbstored users 0 2006-05-14 00:51
>> /root/.bu/backup/<acctno>/write.lock
>
> Pete, are you sure there were no clients logged into the store when  
> you killed bbstored? It doesn't look like there were, but it might  
> be a good idea to sanity check.
>
> I don't think the lock files should be there, but the fact that  
> they are, probably means that the server crashed while all eight  
> accounts were backing up. This probably means that you have  
> corruption on the old server, and you should run "bbstoreaccounts  
> check fix" on there, and then rsync to the new server again.

write.lock files aren't deleted. The fact it's there doesn't mean  
anything, it's whether a process has a lock on it which is important.

When a client logs in, the write.lock file will be recreated.


>
>> Hmm, I just noticed that my old store raidfile.conf has:
>> BlockSize = 4096
>> and my new store raidfile.conf has:
>> BlockSize = 1024
>
> I don't think it makes any difference without RAID, which you  
> aren't using?

No, block size is ignored for non-raid files. But do keep the configs  
the same.

>
>> Could that be the/a problem?  (See my other comment about asking for
>> someone to doc how to choose a BlockSize.  When is a high or low
>> BlockSize preferred?)
>
> There is a tradeoff between better performance with large blocks,  
> and more wasted space at the end of files. You can calculate the  
> wasted space by dividing each file size by the block size, subtract  
> the remainder from the block size, and sum over all files. E.g.
>
> 	File name == foo.txt
> 	File size == 4100 bytes
> 	Block size == 4096 bytes
> 	File % Block == 4 bytes
> 	Wasted == 4096 - 4 == 4092 bytes

Incorrect. Block size is used by the raidfile lib to make sure that  
it doesn't waste filing system blocks. So you don't "choose" a block  
size, you set it to what your filing system uses as the underlying  
unit of storage.


>
>
>> I'm too exhausted at the moment to freak out about the fact that I  
>> have
>> to upgrade my clients.
>
> I would, if I were you. I didn't like that either.

This decision was made to avoid releasing code which would be used in  
an untested manner.


Really, I would suggest starting again.

* Stop bbstored. (and make sure all the child processes terminate too  
-- they may delay doing so until the user has logged out)

* As _bbstored, tar up the accounts.

* Transfer the tar file. (if you don't have enough disc space, use  
netcat to transfer it as it's created)

* As _bbstored, untar the accounts.

* Restart bbstored on the second machine.

It seems like "something funny" has happened. This should all just work.

Ben