[Box Backup] Wanting to write a new program.
Bob
boxbackup@fluffy.co.uk
Mon, 16 May 2005 12:01:09 +0200
Ben,
I'll like to contribute doing a gui client for windows, there're any way
to access to the win32 port code too?
I don't know if should be easier to have the CVS in sourceforge updated
and work over it, in this way several developers could contribute.
best regards
Ben Summers wrote:
>
> On 16 May 2005, at 09:52, Scott McNee wrote:
>
>> Hi All,
>> Thankyou for writing a very complete backup system. I am
>> interested in developing an addition to the existing system. I would
>> like to
>> develop a command line client for windows that will directly access a
>> backup
>> stored on disc/CD/DVD. i.e.. A copy of the Server directory for the
>> username.
>>
>> Is there any information that you could provide to assist in this
>> process.
>> i.e.. pseudo code on accessing the file structures Directly?
>
>
> There is plenty of actual code to look at! And some overview docs in
> the notes directory.
>
> The relevant code is in lib/backupstore and lib/backupclient. You can
> easily create a new executable which includes these bits of code, look
> in the modules.txt file.
>
> Look in StoreStructure.h for functions to generate local filenames
> from object IDs. Start by loading the root directory with ID
> BACKUPSTORE_ROOT_DIRECTORY_ID as a BackupStoreDirectory (Use the
> filename with a RaidFileRead stream, then use
> BackupStoreDirectory::ReadFromStream() to load up the contents.) Then
> go through the entries with a BackupStoreDirectory::Iterator, and
> examine them. Recurse to other directories. To restore a file, use
> BackupStoreFile::DecodeFile().
>
> To set up the crypto so dirs and files can be decoded properly, use
> BackupClientCryptoKeys_Setup(), given the keys file used to create the
> data. To be able to use the RaidFile stuff, call
> RaidFileController::GetController().Initialise() with the path to a
> suitable configuration file, which you'll probably have to generate on
> the fly given the location of the data on the CD.
>
> There are some tests which show these principles. The tests are not
> written to the same quality standards as the rest of the code.
> test/backupstore is worth a look, even if most of the code
> communicates with the server. (But bear in mind that the structures
> are all the same, just downloaded from the server rather than loaded
> from the disc.)
>
> Finally, ask Nick for a copy of the source for the Win32 port, which
> will make it easier to work under Windows. The RaidFile stuff won't
> have been ported, and indeed some of it might not be possible given
> that the write side of things relies on the way UNIX filesystems work.
> But you should be able to get the RaidFileRead stuff to work.
> Alternatively, if your server doesn't use the RaidFile in RAID mode
> (ie just one disc in each set, not three) simply append ".rfw" and
> prepend the root of the "RAID" files to the names given by the
> StoreStructure utilities, and use a FileStream object instead. It'd be
> better to use the proper interface, but you may have no choice under
> Win32. Maybe you could use a special function to open the files, and
> later it could be replaced by one which used the RaidFile interface
> properly?
>
> I'm curious, why do you want this tool?
>
> Ben
>
>
> _______________________________________________
> boxbackup mailing list
> boxbackup@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup