Tuesday, August 25, 2009

Backing up Exchange 2010 and Exchange 2007 SP2 using Windows Server Backup

2/17/2010 Update

Hi there - this was written in August 2009, 3 months before Exchange 2010 released, and these screen shots are Windows 2008, not Windows 2008 R2. We are now almost 3 mos PAST RTM of Exchange 2010 and there are starting to be other options for backup solutions. I am trying to keep a running list of these here:

http://chrislehr.com/2010/02/exchange-2010-backup-product-support.htm

Now, on to the main article:

In both Exchange 2007 SP2 on Windows 2008 and Exchange 2010, Microsoft has enabled Windows Server Backup to allow VSS backups of the Exchange database. I hope to shed some light on how to configure these backups, for both one off backups as well as scheduled daily backups.

First off - how to take a ONE off backup.

Launch Windows Server Backup on your mailbox role, and click the "Backup Once…" action.

Not having a schedule at this point, only "Different Options" is a choice

Only full server or custom is a choice. I am OK with Full server, but I will go with Custom for this.

Now, we can see that there is not much granularity to selections. Since this is VSS based, it has to be by disk. You can also see there is no "Information Store" to choose. Select ALL volumes that host Exchange (this is why I am OK with Full Server above)

For location - if I choose local drive, I will have only the DVD as an option. You cannot back up a drive to a drive that it is backing up. (this is the one down side of VSS in my opinion. It was nice to exclude e:\backups and save them there)

Specify location:

If you specify a location already used, you will receive this message.

This is nice because unlike old scheduled ntbackup.exe BKF files, we won't have an ever-growing backup set that is not being watched.

Something to note here - when you do this as a scheduled job, it needs to be a local disk. A network share will not suffice. I have used an iSCSI SAN device

This is an IMPORTANT step. If you choose copy, your tlogs won't be flushed, and your databases will not register as backed up.

Confirm the settings (not pictured screen) and then click BACKUP and you can watch progress of the VSS backup. Here the shadow copy is produced.

Exchange 2010 consistency check being run:

This backup process flushed transaction logs in Exchange 2010, marked the databases housed on Exchange 2010 as backed up. The backup set is larger than my actual Exchange data would be since I am backing up all the binaries on C every time.

This is a GREAT tool and I am very glad Microsoft listened to the need for an included backup utility.

12 comments:

Jeroen Reijling said...

Hi,

I'm missing the feature to truncate the logfiles...
Scheduled backup is what I want...

Chris Lehr said...

When you perform the full VSS copy, that will perform the log truncation.

Ivan Mckenzie said...

Hi everyone, been doing some backup testing and found some problems. It backs up Mailbox Databases from drive c: but not those from drive Y: I'll explain.
First I will detail my lab. All computers are Windows 2008 SP2, Exchange 2010 RTM (updated from Exchange 2010 RC).
2 EDGE Computers, 2 AD computers, 2 HUB/CLIENT computers.
2 Exchange Mailbox Role computers in DAG: These 2 last computers have the next config each:
Drive c: Besides O.S and Exchange files also database and logs for Mailbox Databases installed by default.
Drive Y: (LUN from SAN) Mailbox Database 3
Drive L: (LUN from SAN) Logs for Mailbox 3
Drive w: Backup destination.
Circular logging disabled on all databases.
All active mailboxes from DAG on server from which I do the backup.
1 Test: Backup of C: with ENABLE SYSTEM RECOVERY option and Drive Y. Backup finishes OK but when I start to recover and I choose View details of Exchage Application I can Only see the Mailboxes Databases from Drive C:.
2 Test: Backup of Drive Y. Backup finishes OK but when I start to recover and I can’t choose Applications because it is grayed out.
3 Test: I move the Mailbox Database and logs from drive Y: and L: to C: and do a backup of C: with ENABLE SYSTEM RECOVERY option. When I start to recover and I choose View details of Exchage Application I can see all Mailbox Databases.
My Conclusion: I’m doing something wrong or there is a bug because I can only backup Mailbox Databases from drive C:\.
I hope it’s not a bug and someone can give me some help.

Thanks to all,

Ivan Mckenzie

Chris Lehr said...

Ivan,

You need to select ALL the drives that have Exchange Data and logs on them to be backed up, and must use VSS Full backups. Sorry if that wasn't clear.

Chris

Ivan Mckenzie said...

Nice one my friend, worked fine. I wasn't backing up L: which is where the logs are saved.

Thanks,

Ivan

Ivan Mckenzie said...

Hi, not sure if I should post this one here, but it is about backing up Exchange 2010.
I've done 4 full copies of an exchange Mailbox Database with an interval of 30 min on local drive W:. When I explore this drive I can see a bunch of XML files and one VHD file. I was thinking I should see 4 VHD files one for each full copy I have done. Anyway, is it possible to copy these files to tape (using backupexec), so that I can then delete the files on W. If possible and supposing I delete the files from W: and restore later the files from the tape to any of the computer drives, How can I tell Windows Backup to restore from these files?
Thanks to all,
Ivan

Chris Lehr said...

Ivan - test, test, test any procedure you plan to use as a production DR procedure. I did some articles on Exchange 2010 recovery here:
Part One
Part Two

Ivan Mckenzie said...

Hi everyone, does anyone know if it’s ok to enable circular logging in a Dag and use Windows 2008 backup. I’m OK with restoring only until the last Full Backup.
Thanks,
Ivan

Chris Lehr said...

Yes, that is supported.

Ivan Mckenzie said...

Thanks Chris for you answer about circular logging.
I’ve just discovered a workaround for a backup problem I was having. I don’t think this should be a normal behavior for a DAG configuration.
Problem. My backups from Windows 2008 Backup only work if I have all my Mailbox Databases mounted on the same DAG member.
If a put 2 Mailbox Databases on 1 DAG member and another two Mailbox Databases on the other DAG member, the backups fails during the Exchange consistency check. It’s taken me days to find this. I hope it’s not by design. If you have any suggestions please let me know. I’m running the backups from both DAG members and selecting only the active databases from each one, as I Know it’s not supported to do copies of the passive databases if you are using Windows 2008 Backup.
Thanks for your time,
Ivan
P.S
Reminder Lab: All computers are Windows 2008 SP2, Exchange 2010 RTM (updated from Exchange 2010 RC).
2 EDGE Computers, 2 AD computers, 2 HUB/CLIENT computers.
2 Exchange Mailbox Role computers in DAG: These 2 last computers have the next config each:
Drive c: Besides O.S and Exchange files also database and logs for Mailbox Databases installed by default.
Drive Y: (LUN from SAN) Mailbox Database 3
Drive L: (LUN from SAN) Logs for Mailbox 3
Drive w: Backup destination.
Circular logging disabled on all databases.

Unknown said...

Awesome guide. It's a little different in 2008 R2, but I was able to get backup my Exchange mailboxes (I think). Now, it's time to follow your restore guides. Thank you for the guide.

candai said...

I have Exch2010 running on W2K8 R2 Ent edition. I have followed the steps here to backup my exchange DB & Log drives to a network path, but backup does not run and instead gives "failed" status as "A Volume Shadow Copy Service operation failed". In the errors tab, it gives mores details as "The operation to backup the volume was stopped before the operation started running".
Any helpful suggestions would be greatly appreciated. Thanks in advance.