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

Re: [Bacula-devel] Backing up MS Exchange


> 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/
/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:
/MIS/FSG/

Or (I think) a Store:
/MIS/FSG/Mailbox Store (MYSERVER)/

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.

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

James

*list files jobid=816
+-------------------------------------------------------------------------------------------------------------+
| Filename                                                                                                    |
+-------------------------------------------------------------------------------------------------------------+
| /Microsoft Information Store/First Storage Group/Mailbox Store (TRANTOR)/                                   |
| /Microsoft Information Store/First Storage Group/Mailbox Store (TRANTOR)/DatabaseBackupInfo                 |
| /Microsoft Information Store/First Storage Group/Mailbox Store (TRANTOR)/D:\Exchsrvr\MDBDATA\priv1.edb      |
| /Microsoft Information Store/First Storage Group/Mailbox Store (TRANTOR)/D:\Exchsrvr\MDBDATA\priv1.stm      |
| /Microsoft Information Store/First Storage Group/Public Folder Store (TRANTOR)/                             |
| /Microsoft Information Store/First Storage Group/Public Folder Store (TRANTOR)/DatabaseBackupInfo           |
| /Microsoft Information Store/First Storage Group/Public Folder Store (TRANTOR)/D:\Exchsrvr\MDBDATA\pub1.edb |
| /Microsoft Information Store/First Storage Group/Public Folder Store (TRANTOR)/D:\Exchsrvr\MDBDATA\pub1.stm |
| /Microsoft Information Store/First Storage Group/                                                           |
| /Microsoft Information Store/First Storage Group/D:\Exchsrvr\MDBDATA\E00068F0.log                           |
| /Microsoft Information Store/First Storage Group/D:\Exchsrvr\MDBDATA\E00068F1.log                           |
| /Microsoft Information Store/First Storage Group/D:\Exchsrvr\MDBDATA\E00068F2.log                           |
| /Microsoft Information Store/                                                                               |
-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilot Consulting.