Bacula-users

Re: [Bacula-users] exchange 2003 restoration error

2010-03-30 09:24:38
Subject: Re: [Bacula-users] exchange 2003 restoration error
From: Graham Keeling <graham AT equiinet DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 30 Mar 2010 14:30:03 +0100
On Tue, Mar 30, 2010 at 02:04:35PM +0200, Koldo Santisteban wrote:
> Hello
> 
> I am trying to restore Ms Exchange Server 2003 SP2 backup to the recovery
> storage group witn no success.
> Backups are working fine with no errors, but when i try to restore fails
> with this message:
> 
> JobId 1073: Fatal error: HrESERestoreOpen failed with error 0xc7ff0bce
> - Unknown error
> 
> 
> All bacula components are from last version, bacula-dir,bacula-sd and
> bacula-fd are working with 5.0.1. I have tried too many things and,
> now, i don´t know what else can i do.
> The exchange and windows server installation is on spanish (perhaps it
> is a clue).
> 
> I hope that someone could help me, because i need to restore only one
> mailbox, and for that reason i need the recovery storage group.
> Regards ans thanks in advance

Hello,
I managed to get this working on bacula-3.0.2 and bacula-3.0.3.
The steps that I made are in a bacula bug report with bug id=1348, but I think
you need to have a bacula bugzilla account to see that. The crash bug that
it talks about was fixed in bacula-3.0.3.
So I'll paste from the report now, in case it is helpful to you:

=====Graham Keeling==============

I am testing the Exchange plugin again. This time, I am using bacula 3.0.2
(for all daemons).

a) Set up a Microsoft 2003 Server, with Exchange 2003 installed, with the
default settings.

b) Set up a Microsoft XP machine, with Office 2007 installed.

c) Joined the XP machine to the domain of the server, and added a domain user
called 'user2', who can collect mail from the Exchange server using whatever
default protocol Exchange uses.

d) Telnetted to port 25 of the exchange server and set a couple of mails to
'user2', which the Outlook client then picks up.

e) Installed the bacula client on the Exchange machine, making sure that the
'Plugins Directory =' line is correct in the fd configuration file.

f) Set up the fileset as follows, and did a full backup.
FileSet {
  Name = "Windows:win-2k8-64:Windows Exchange Server data"
  Ignore FileSet Changes = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP9
      IgnoreCase = yes
    }
    Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"
  }
}

g) Sent a few more mails to 'user2'.

h) On the 2003 Server, opened Exchange System Manager, went to Servers and
right-clicked my server name (DEVEL-WK3-32) and chose 'New -> Recovery Storage
Group...', then 'OK'.
A Recovery Storage Group appears under my server name. I right-clicked
'Recovery Storage Group' and chose 'Add Database to Recover...' and
double-clicked 'Mailbox Store (DEVEL-WK3-32)', then 'OK'. 'Mailbox Store
(DEVEL-WK3-32)' then appears beneath my 'Recovery Storage Group'.

i) Went to bconsole, and restored the following directory:
C:/@EXCHANGE/Microsoft Information Store/First Storage Group/Mailbox Store 
(DEVEL-WK3-32)/

Bacula reports that the restore failed, and bacula-fd on the Windows server
crashes. This is the log on the bacula director machine:

backup.example.com-dir JobId 44: Start Restore Job
devel-wk3-32-restore.2009-08-18_08.52.37_40
backup.example.com-dir JobId 44: Using Device "Disk^A1.0"
backup.example.com-sd-91 JobId 44: Ready to read from volume "backup-0011" on
device "Disk 1.0" (/write/mnt/Disk 1/var/lib/bacula/volumes).
backup.example.com-sd-91 JobId 44: Forward spacing Volume "backup-0011" to
file:block 0:237.
backup.example.com-sd-91 JobId 44: End of Volume at file 0 on device "Disk 1.0"
(/write/mnt/Disk 1/var/lib/bacula/volumes), Volume "backup-0011"
backup.example.com-sd-91 JobId 44: End of all volumes.
devel-wk3-32-fd JobId 44: Error: HrESERestoreComplete failed with error
0xc7ff1004 - Unknown error.
backup.example.com-dir JobId 44: Fatal error: Network error with FD during
Restore: ERR=Connection reset by peer
backup.example.com-dir JobId 44: Fatal error: No Job status returned from FD.
backup.example.com-dir JobId 44: Error: Bacula backup.example.com-dir 3.0.2
(18Jul09): 18-Aug-2009 08:52:43
Build OS: i686-pc-linux-gnu unknown unknown
JobId: 44
Job: devel-wk3-32-restore.2009-08-18_08.52.37_40
Restore Client: devel-wk3-32-fd
Start time: 18-Aug-2009 08:52:39
End time: 18-Aug-2009 08:52:43
Files Expected: 4
Files Restored: 0
Bytes Restored: 0
Rate: 0.0 KB/s
FD Errors: 0
FD termination status: Error
SD termination status: OK
Termination: *** Restore Error ***
backup.example.com-dir JobId 44: Begin pruning Jobs.
backup.example.com-dir JobId 44: No Jobs found to prune.
backup.example.com-dir JobId 44: Begin pruning Files.
backup.example.com-dir JobId 44: No Files found to prune.
backup.example.com-dir JobId 44: End auto prune.


The Windows Server Event Viewer has a few messages too. I've copied them here
in case they are useful:

Source: ESE BACKUP
Category: Callback
Type: Error
Description: Information Store (2936) Callback function call
ErrESECBRestoreComplete ended with error 0XC80003EB The parameter is not valid.

Source: Application Error
Category: (100)
Type: Error
Description: Faulting application bacula-fd.exe, version 0.0.0.0, faulting
module msvcrt, version 7.0.3790.3959, fault address 0x000385f0.

Source: DrWatson
Category: None
Type: Information
Description: The application, C:\Program Files\Bacula\bin\bacula-fd.exe,
generated an application error The error occurred on 08/18/2009 @ 08:52:19.575
The exception generated was c0000005 at address 77BD85F0 (msvcrt! strcmp)



I've repeated the test several times. James Harper suggested that I delete the 
Recovery Storage Group on the file system and try again, as there were some 
files lying around in there from my multiple attempts at getting this to work.

 I used the Exchange Server Manager program to remove the Recovery Storage
Group, then I went to 'C:\Program Files\Exchsrvr' and deleted the 'Recovery
Storage Group' directory completely.

I then repeated the exercise from step (h) above, and got
identical results (bacula-fd crashed and the following appeared in my log:
devel-wk3-32-fd JobId 49: Error: HrESERestoreComplete failed with error
0xc7ff1004 - Unknown error). 


=====James Harper==============

Can you please elaborate on what you said "
i) Went to bconsole, and restored the following directory:
C:/@EXCHANGE/Microsoft Information Store/First Storage Group/Mailbox Store 
(DEVEL-WK3-32)/
"?

there shouldn't have been a C: in front - i assume that is just a typo you made 
when transcribing into the bug report?

When you restore, you also need to restore the log files and the storage group 
directory itself. I think the best way to do this is:
mark "/@EXCHANGE/Microsoft Information Store/First Storage Group"
unmark "/@EXCHANGE/Microsoft Information Store/First Storage Group/<stores you 
don't want to restore"

If that does resolve it, some assistance on documenting it better for the user 
manual would be appreciated.

I'm rebuilding my exchange server now to test this on the chance that it 
doesn't resolve your problem. 

=====Graham Keeling==============

Sorry, yes you are right that it was a typo in the bug report, I didn't have a 
"C:" at the beginning.


I tried your mark/unmark suggestion, and which seems to have done the trick. I 
had lots of trouble getting the exmerge program to work (down to getting the 
correct Windows permissions), but once I had sorted that out, it was fine. I 
haven't tried it on Exchange 2007 yet.

I don't think that bacula-fd should crash as easily as it does, though.
Can that be fixed?

I think that the mark/unmark suggestion above should make an appearance in the 
user manual. I don't think that it is currently mentioned.

=====Graham Keeling==============

I've just managed to restore to a Recovery Storage Group on 2007.

I didn't have to do the mark/unmark bit that I had to do for 2003.

I only had to do the directory...
/@EXCHANGE/Microsoft Information Store/<Storage Group>
...which seems to contain all the log files that are needed. 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users