[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Backing up MS Exchange

On Wednesday 10 September 2008 12:06:46 James Harper wrote:
> > In case, this is not clear, if Bacula has the following records for a
> > single file:
> >
> > Full,  Inc1, Inc2, Inc3.
> >
> > on a restore it will put back:
> >
> > Full, Inc3.
> >
> > while if I understand correctly, for Exchange we will want to restore:
> >
> > Full,  Inc1, Inc2, Inc3
> That depends on implementation... my current C# agent backs up such that
> the file list looks like the attached file, or, to make it fit inline
> without horrible wrapping:
> /MIS/FSG/Mailbox Store (MYSERVER)/
> /MIS/FSG/Mailbox Store (MYSERVER)/DatabaseBackupInfo
> /MIS/FSG/Mailbox Store (MYSERVER)/D:\Exchsrvr\MDBDATA\priv1.edb
> /MIS/FSG/Mailbox Store (MYSERVER)/D:\Exchsrvr\MDBDATA\priv1.stm
> /MIS/FSG/Public Folder Store (MYSERVER)/
> /MIS/FSG/Public Folder Store (MYSERVER)/DatabaseBackupInfo
> /MIS/FSG/Public Folder Store (MYSERVER)/D:\Exchsrvr\MDBDATA\pub1.edb
> /MIS/FSG/Public Folder Store (MYSERVER)/D:\Exchsrvr\MDBDATA\pub1.stm
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F0.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F1.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F2.log
> /MIS/
> (MIS = Microsoft Information Store)
> (FSG = First Storage Group)
> Now that needs a bit of explanation...
> Exchange holds several Information Stores, but (I think) only 'Microsoft
> Information Store' contains back-upable data.
> Inside each Information Store are one or more 'Storage Groups'. Each
> Storage Group holds a few databases (stores) but all those databases
> share a common set of log files.
> Inside each Storage group are the Stores. Each Store has a .ebd file
> which is where the mailbox/calendar/etc items are stored, and a .stm
> file which is where the attachments are stored.
> The Storage group also has a set of log files.
> In order to back that up in a way that makes sense to me, I created a
> virtual filesystem namespace where the path looks like:
> <Information Store>/<Storage Group>/<Store>/<Database File>
> <Information Store>/<Storage Group>/<Log File>
> Notice that each Database File and Log File in my file list above
> contains a full Microsoft path, using the Microsoft path separator?
> 'D:\Exchsrvr\MDBDATA\E00068F0.log' is a single file as far as Bacula is
> concerned. This was necessary because the original path needs to be
> given to the API on restore, even if that isn't ultimately where the
> file is going to be saved (eg if you are redirecting to the recovery
> storage group). It's a bit confusing because as well as my virtual
> namespace, we need to preserve some elements of the real NTFS path.
> Also included is the virtual 'DatabaseBackupInfo' file. This contains
> information given by the API on backup which is required to be given
> back on restore. I just created a virtual file to contain this.
> So to get back to the original example of a restore using
> incrementals... the 'full' backup above contains these log files:
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F0.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F1.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F2.log
> Which are then truncated unless flagged otherwise. A subsequent
> 'incremental' backup (Inc1) might backup (and truncate) the following
> log files:
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F3.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F4.log
> Then Inc2:
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F5.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F6.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F7.log
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F8.log
> And finally Inc3:
> /MIS/FSG/D:\Exchsrvr\MDBDATA\E00068F9.log
> Now, because of the way Exchange works there are effectively
> restrictions on what you can restore. You can't restore just:
> /MIS/FSG/Mailbox Store (MYSERVER)/D:\Exchsrvr\MDBDATA\priv1.edb
> You can restore a Storage Group:
> Or (I think) a Store:
> /MIS/FSG/Mailbox Store (MYSERVER)/

OK, the plugin has complete control over the "virtual" path and filename that 
it chooses to put the data.  For better integration with Bacula, we probably 
will want to convert the Microsoft slashes to regular Unix slashes, then 
during the restore put them back.  This is essentially what we do with other 
files.  If you want to keep them, we can, but they will all end up in one 
tree for interactive restore.

> But that's about it. Because of those restrictions, if you do a restore
> and 'mark', say, /MIS/FSG, bacula should automatically select the files
> from the full backup and all the log files from any subsequent
> incremental and differential backups... so I don't think we have a
> problem.

If you store all the files that you want restored at the same time with 
different names and all under the same Unix path, then the user just needs to 
select the full directory and everything will be correctly passed back to the 
plugin.  There is currently no logic in Bacula to recognize groupings of 
files, but as I say that can be managed by putting them under the same Unix 
directory and have separate Unix directories for each "backup".

> The procedure for a restore to the Recovery Storage Group is something
> like:
> . Create the Recovery Storage Group under Exchange. This is a well
> documented by Microsoft
> . Mark all the relevant files in the bacula restore
> . Do a 'RegexWhere' to change '/MIS/FSG' to 'MIS/Recovery Storage Group'
> . Run the restore
> . Copy the required information from the Recovery Storage Group to the
> correct mailbox
> . Remove the Recovery Storage Group
> I hope that made some sense... I also hope it's correct (it's been a
> while since I researched all of this).

Yes, thanks.  That makes a lot of sense, and it sounds like it will make our 
users happy :-)


> James

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilot Consulting.