[Box Backup] raidfile location per client

Peter Jalajas, GigaLock Backup Services boxbackup@fluffy.co.uk
Sun, 29 Jun 2008 09:33:58 -0400


I had some uncertainty when I set up my second disk set, so to
clarify, here's an extreme artificial example /etc/box/raidfile.conf
(on the backup store server) and proposed explanation that likely
contain errors.  I hope more knowledgeable folks can correct them as
needed.

MyFirstDiskSet
{
        SetNumber = 5
        BlockSize = 4096
        Dir0 = /media/firststore
        Dir1 = /media/firststore
        Dir2 = /media/firststore
}
DiskSet_Z
{
        SetNumber = 9
        BlockSize = 1024
        Dir0 = /media/secondstore
        Dir1 = /media/secondstore
        Dir2 = /media/secondstore
}

Then, when you issue something like
    /usr/local/bin/bbstoreaccounts create 10002045 9 4096M 4505M
that client account 10002045 will be backed up into
/media/secondstore/backup/10002045/

I believe, but am not at all sure, that you can name the disk sets
(here, MyFirstDiskSet, DiskSet_Z) almost anything you want, but you
should stick to simple alphanumerics, I would think.  I'm not sure if
that name is used anywhere (maybe it's a leftover legacy redundancy?).

Similarly, I think, the SetNumber can be any reasonable integer.
raidfile-config is a run-only-once convenience script that simply
defaults the first SetNumber to be 0.  Note, do not run
raidfile-config again in an attempt to setup your additional second
disk set.  Not sure if SetNumber can be alpha, but I doubt it, and see
no reason to go there.  See
http://www.boxbackup.org/man-html/raidfile-config.html

The "Dir0", "Dir1", "Dir2" strings on the left side of the = sign are
bb system variable names and must not be modified.  You need all three
lines, even if they point to the same directory.

(My setup above is for _not_ using the bb internal RAID tool, so all
my "Dir? =" are pointing to the same directory within a disk set.
When you see the phrase "set" anywhere in this regard, note that that
is implying or emphasizing that we are talking about the bb internal
RAID set of separate disks, which can be disabled by using the same
path for all 3 "Dir? =" in that "set" as I've done.)

You can see which SetNumber, and thus which disk set, a client is
being backed up into by looking at the value after the colon in
/etc/box/bbstored/accounts.txt:
10002035:5
10002042:9
10002043:5
10002045:9

Going a little astray now:  I'm not sure, but I think some account
details are stored in the o01.rfw and/or info.rfw files in the client
store directories.

$ sudo hd /media/secondstore/backup/10002045/o01.rfw
00000000  44 49 52 5f 00 00 00 00  00 00 00 00 00 00 00 01  |DIR_............|
00000010  00 00 00 00 00 00 00 01  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00                           |........|
00000028
$ sudo hd /media/secondstore/backup/10002045/info.rfw
00000000  34 83 24 76 10 00 20 45  00 04 4d 03 57 ca ed 00  |4.$v.. E..M.W...|
00000010  00 00 00 00 00 01 e5 65  00 00 00 00 00 00 00 01  |.......e........|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 01  00 00 00 00 01 90 00 00  |................|
00000040  00 00 00 00 01 e0 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00                           |........|
00000058
(I've redacted a little, so maybe I broke some logic chain here.)

I hope some of the above ramble helps a little, and does not hinder
too much.  Again, I'm not sure of its accuracy.

Enjoy,
Pete

On Sun, Jun 29, 2008 at 7:30 AM, Chris Wilson <chris@qwirx.com> wrote:
> Hi Jeff,
>
> On Sat, 28 Jun 2008, Jeff wrote:
>
>> I'm playing around with boxbackup on a nslu2. I don't see an option
>> where different clients could have individual backup locations.
>>
>> Client A >>> /dataA/clienta
>> Client B >>> /dataB/clientb
>>
>> Is this possible?
>
> Yes, you can add raidfile disk sets in /etc/raidfile.conf, although
> there's only one in the default configuration, and when you create
> users, assign them to different disk sets.
>
> Cheers, Chris.