[Box Backup] How to move store to new machine

Chris Wilson boxbackup@fluffy.co.uk
Sun, 14 May 2006 15:30:14 +0000 (GMT)


Hi Pete,

> Hi again and thanks, Chris.

No problem :-)

> 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.

> Well, now thinking about it a bit more, I tried:
> user@new:~$ sudo find /media/bu/ | grep 5e53
> user@new:~$ sudo find /media/bu/ | grep 653b
> (the Directory ID and object listed above) and found nothing.
> Does that make sense?

Yes, because the filename is not the full ID. I think these files would be 
named something like "53/o5e.rfw" and "3b/o65.rfw", but I'm not sure.

> -rw-------   1 _bbstored users     0 2006-05-14 01:16 write.lock
>
> Does that look right?

Apart from the write.lock, yes.

> Wait, how did the write.lock file get there in the first place, if it 
> wasn't ever readable by the rsync from the new server?!

I guess that rsync created it even though it wasn't able to read the 
contents. But yes, it surprises me too.

> Should I try?:
> /usr/local/bin/bbstoreaccounts check <acctno> fix
> from:
> http://boxbackup.hostworks.ca/index.php/Fixing_problems_with_corruption_on_the_server

Yes, on the old server.

> 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?

> 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

> By the way, where are the account limits stored?  Are they in info.rfw?

Not sure, but I think it's either there or accounts.txt.

> 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.

> I had thought that the constraint was the other
> way around...stupid me, it's pretty clear at
> http://www.fluffy.co.uk/boxbackup/ but not mentioned on the wiki, I
> think.

Please could you add it in an appropriate place (or two)?

> Any pointers to the easiest way to upgrade Windows clients from 0.09 to 
> 0.10?

Should be quite easy:

* stop the old client service
* unzip the new zipfile
* copy all the contents into the directory where the old client is stored
* remove the old service with "bbackupd.exe -r"
* install it again with "bbackupd -i" (and the path to the configuration
   file, if not "C:\Program Files\Box Backup\bbackupd.conf")
* start the service, check that it stays running.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |