Exchange 2007 & Windows Server 2008 Poor Man’s Exchange Backup

I wasn’t sure of most people ran into the amount of issues I have with Exchange 2007 on Windows 2008 (x64) and backups. At Portal Dynamics we had Symantec BackupExec, until we flipped over to DPM and Hyper-V snapshots on the SAN. Backup Exec was 32bit, exchange and windows were 64 bit. We could never get the permissions right, or the client to run, and the BackExec server liked to crash a lot when we connected it to 64bit clients for some reason.

Alright, so how do we backup? And even more importantly how do we clear out those dreaded transaction logs once we backup the server? Snapshots are great, but we need to space back now…

Well, we didn’t have a ton of money to spend on a new backup solution, BackupExec isn’t cheap, and we didn’t want to go through the pain of updating all the backup clients and schedules and everything else on the network, so we needed a cheap, exchange aware, functional solution…

Here comes NTBackup to the rescue. Find an x64 system, and you can copy the required files off that server you are going to need to your exchange mail store server(s).

Files needed:

  • Edbbcli.dll
  • Eseback2.dll
  • Esebcli2.dll
  • Msvcrt40.dll
  • Ntbackup.exe
  • Ntmsapi.dll
  • Vssapi.dll

Once you have the files on the server, right click NtBackup.exe and run as administrator.

Its not bricklevel, but it’s the information store, and it will work…

Alright, we have a backup of the information store… now how do we clear out the transaction logs? According to the following screen, there are only 24k log files, each 1Mb is size…

The following script comes in pretty handy, this needs to be run as an administrator as well, just run command prompt as administrator, and then use cscript //nologo logCleanup.vbs…

Dim fso, f, f1, fc, strComments, strScanDir
‘ user variables
‘ —————————————————————-
‘Directory where MDB is stored for Exchange
strDir = “M:\MDBData\First Storage Group”
‘Number of days to leave log files 1 = past 24 hours worth
strDays = 1
‘ DO NOT EDIT BELOW THIS LINE
‘ (unless you know what you are doing)
‘——————————————————————
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set f = fso.GetFolder(strDir)
Set fc = f.Files
For Each f1 in fc
If DateDiff(“d”, f1.DateLastModified, Date) > strDays AND Instr(f1.name, “.log”) AND f1.name <> “E00.log” Then
WScript.echo f1.name & ” ” & f1.DateLastModified & vbCrLf
fso.DeleteFile(f1)
End If
Next
WScript.Quit
‘ eof

Good Luck!

Leave a comment