Showing posts with label Exchange backup and restore. Show all posts
Showing posts with label Exchange backup and restore. Show all posts

Thursday, February 27, 2014

Exchange 2013 Backup Status Alert

 Today created a task schedule which can able to read the backup status of all the Exchange 2013 database and provide you email report to your inbox.

This makes easier for our daily operation to review the backup status.

 Login to the Exchange Server - Go to Administrative Tools - Click Task Scheduler - Create New Task

 Task: Exchange 2013 Backup Status

 Description: To Monitor Exchange 2013 Backup Status

 Program/Script: C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
 Add Arugument: -Command ".'E:\Program Files\Microsoft\Exchange Server\V15\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; Send-MailMessage -From admin@mail.com -To rajis@mail.com,u1@mail.com -SmtpServer server.mail.com -Subject Exchange_2013_Backup_Status -body (Get-MailboxDatabase -Status * | Where-Object {$_.Mounted -like "True"} | Select-Object Identity, Mounted*, Last* | Sort-Object LastFullBackup -desc | format-table -autosize | out-string)"

 Note: Change the From Address, To Address, SMTPServer Detail according to your infra

Thursday, January 9, 2014

Step by Step Exchange 2013 Database Recovery

Step by Step Exchange 2013 Database Recovery
Step 1: Provide the folder path location to the backup team where the database and log file needs to restore. Note: Make sure you have enough free disk space on the restored location
Step 2: Verify the database health status after the restoration of database file. Run the following command to verify the status
eseutil.exe /mh E:\Recovery\RDB.edb | select-string "State:", "Log Required"
Step 3: If the database is Clean Shutdown move to next step. In case if it is dirty shutdown perform the soft recovery and if it fails move to hard recovery
Step 4: Create Recovery database using the following commands
New-MailboxDatabase -Recovery RDB01 -Server MBX01 -EdbFilePath E:\Recovery\RDB.edb
Step 5: Verify the database is in mounted state
Get-MailboxDatabase RDB01 -status | fl Name, Mounted
Step 6 : Mount the database
Mount-Database RDB01 –Verbose
Step 7 : Verify the database mounted status
Get-MailboxDatabase RDB01 -status | fl Name, Mounted
Step 8: Verify the mailbox statistics of the restored database
To find all mailbox in the recovery database - Get-mailboxstatistics -database RDB01
To find specific mailbox w.r.t to user account or GUID - Get-MailboxStatistics -Database RecoveryDB | ?{$_.DisplayName -like 'Raji*'} | fl DisplayName,MailboxGuid,DisconnectDate
Step 9: Restoring them using the following Exchange PowerShell command based upon your requirement
  • Restoring the complete user mailbox
New-mailboxrestorerequest –sourcedatabase “RDB01” –sourcestoremailbox “Rajis” –targetmailbox “Rajis@mail.com"
  • Restoring the mailbox using guid

New-MailboxRestoreRequest -SourceDatabase “RDB01” -SourceStoreMailbox 4a1d2118-b8cc-456c-9fd9-cd9af1f549d0 -TargetMailbox Raji
  • Restoring the source mailbox to different user mailbox
New-MailboxRestoreRequest -SourceDatabase “RDB01” -SourceStoreMailbox 'Raji' -TargetMailbox Subramanian -TargetRootFolder Restore -AllowLegacyDNMismatch
  • Restoring the mailbox email in a seperate folder (Restore) on the user mailbox

New-MailboxRestoreRequest -SourceDatabase “RDB01” -SourceStoreMailbox 'Raji' -TargetMailbox 'Raji' -TargetRootFolder Restore -IncludeFolders '#Inbox#/#Test#/*' -AllowLegacyDNMismatch
Step 10: Check the status of mailbox restoration when completed check in the user mailbox on all restored emails.
Get-MailboxRestoreRequest
Step 11: Remove the completed mailbox restore using the following PowerShell command
Get-MailboxRestoreRequest -status Completed | Remove-MailboxRestoreRequest
Reference URL
http://technet.microsoft.com/en-us/library/dd876954%28v=exchg.150%29.aspx 
http://technet.microsoft.com/en-us/library/ee332321(v=exchg.150).aspx
http://technet.microsoft.com/en-us/library/ee332351%28v=exchg.150%29.aspx

The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.