Installing and configuring Veeam Backup for Office 365

After you have completed your migration to Office 365 your attention will turn to how to backup all of your Office 365 data.  I decided to use Veeam Backup for Office 365 for this task and in this post I’ll run through what you need to do to get it up and running step-by-step.

Preparing the Service Account

Ensure that you can connect to Office 365 using PowerShell on your Veeam server. These commands will download the modules you need:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Register-PSRepository -Default
Get-PSRepository
Install-Module MSOnline

 




Then just run the below to connect to Office 365:

$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $UserCredential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking

 

Download the Veeam Backup for Office 365 files from https://www.veeam.com/backup-microsoft-office-365-download.html

Create an account in Office 365 that you can use as a system account. This account should have a mailbox and will need permissions added as below:

New-ManagementRoleAssignment Role ApplicationImpersonation User "veeamO365@domain.com" 

New-ManagementRoleAssignment Role Organization Configuration User "veeamO365@domain.com" 

New-ManagementRoleAssignment Role View-Only Configuration User "veeamO365@domain.com" 

New-ManagementRoleAssignment Role View-Only Recipients  User "veeamO365@domain.com" 

New-ManagementRoleAssignment Role Mailbox Search User "veeamO365@domain.com" 

 

To see a list of all available roles run:

Get-MsolRole | Sort Name | Select Name,Description

 

Then to be able to backup SharePoint run:

Add-MsolRoleMember -RoleName SharePoint Service Administrator -RoleMemberEmailAddress veeamO365@domain.com 

 

You should now be able to run the below using your service account:

get-organizationconfig

 




Installing Veeam Backup for Office 365

Run the Veeam.Backup365_2.0.0.567.msi file

Installing and configuring Veeam Backup for Office 365

Accept the agreement

Installing and configuring Veeam Backup for Office 365-2




Click Next

Installing and configuring Veeam Backup for Office 365-3

Click Install

Installing and configuring Veeam Backup for Office 365-4

Click Finish

Installing and configuring Veeam Backup for Office 365-5

Installing the Veeam Explorer for Exchange

Run the VeeamExplorerForExchange_9.6.3.567.msi file and click Next

Installing and configuring Veeam Backup for Office 365-6

Accept the agreement and click Next

Installing and configuring Veeam Backup for Office 365-7




Click Next

Installing and configuring Veeam Backup for Office 365-8

Click Install

Installing and configuring Veeam Backup for Office 365-9

Click Finish

Installing and configuring Veeam Backup for Office 365-10




Installing the Veeam Explorer for SharePoint

Run the VeeamExplorerForSharePoint_9.6.3.568.msi file and click Next

Installing and configuring Veeam Backup for Office 365-11

Accept the agreement and click Next

Installing and configuring Veeam Backup for Office 365-12

Click Next

Installing and configuring Veeam Backup for Office 365-13

Click Install

Installing and configuring Veeam Backup for Office 365-14




Click Finish

Installing and configuring Veeam Backup for Office 365-15

You should now have an icon on your desktop for Veeam Backup for Office 365, run this.

Installing and configuring Veeam Backup for Office 365-16

Click Connect

Installing and configuring Veeam Backup for Office 365-17

Adding your Organization

Right click on Organizations and click Add Organization

Installing and configuring Veeam Backup for Office 365-18




Select Microsoft Office 365

Installing and configuring Veeam Backup for Office 365-19

Leave the Region as Default and enter the username and password of the service account that you prepared earlier

Installing and configuring Veeam Backup for Office 365-20

Veeam will then check that the account is configured correctly, if all is ok click Finish.

Your Organization should now be available to be backed up

Installing and configuring Veeam Backup for Office 365-22

Add a backup repository

Click Backup Infrastructure then right click on Backup Repositories. Click Add a backup repository.

Installing and configuring Veeam Backup for Office 365-23




Give the backup repository a name and click Next

Installing and configuring Veeam Backup for Office 365-24

Enter the path to your storage, I used a UNC path for a network location, then click Next.

Installing and configuring Veeam Backup for Office 365-25

Specify a retention policy and then click Finish

Installing and configuring Veeam Backup for Office 365-26

Creating Backup Jobs

Click Organizations then right click on your organization and click backup

Installing and configuring Veeam Backup for Office 365-27

 

Give the backup job a name and click Next

Installing and configuring Veeam Backup for Office 365-28

Click Add and select what you want to backup

Installing and configuring Veeam Backup for Office 365-29

I am backing up a single user so select this from the list the click Add

Installing and configuring Veeam Backup for Office 365-30




Click Next

Installing and configuring Veeam Backup for Office 365-31

Click Next again

Installing and configuring Veeam Backup for Office 365-32

Select your Backup Repository and click Next

Installing and configuring Veeam Backup for Office 365-33

Configure scheduling options and click Create

Installing and configuring Veeam Backup for Office 365-34

Right click on the backup job and click Start to start now

Installing and configuring Veeam Backup for Office 365-35




You should now see the job status below

Installing and configuring Veeam Backup for Office 365-36

Hopefully you should then see a success status after its finished

Installing and configuring Veeam Backup for Office 365-37

Restoring emails

Right click on the backup job and click Explore latest Exchange state of <latest date> this will open the Veeam Explorer for Microsoft Exchange

Installing and configuring Veeam Backup for Office 365-38

Find your user and expand their mailbox, find the email you want to restore and right click on it. Click Restore to <username of user>.  The mail appears back in the user’s mailbox

Installing and configuring Veeam Backup for Office 365-39

To list all users within your backup:

1. Open Veeam Console.

2. Navigate to Main Menu > PowerShell.

3. Run the command:

((Get-VBOOrganization | Get-VBOOrganizationUser | Where-Object -FilterScript {$_.IsBackedUp -eq $True -and $_.type -eq "User"}).DisplayName | Sort-Object) > C:\usersinbackup.txt




2 Replies to “Installing and configuring Veeam Backup for Office 365”

  1. What confused me with Veeam for Office 365 is the retention. I’ve used it thinking my 6 month retention will retain my deleted items for 6 months. It actually only backs up emails/OneDrive/SharePoint files up to 6 months old, which is a bit pointless for my use case as an MSP. Otherwise it’s a great product with a lot of potential to grow.

  2. Hello
    Thank you for this great tutorial
    Installed my first backup with ease
    Some of the screens have changed as Veeam 0365 is on version: 5.0.1.179
    And one of the roles
    Add-MsolRoleMember -RoleName “SharePoint Administrator”
    Looks like it is working?
    The retention setting was confusing for me
    I understood it as Veeam will backup all of your data that is up to a certain time old?
    5 year retention will backup all data up to the data being 5 years old, then prune it from your backups?
    Is this not correct?

Leave a Reply

Your email address will not be published. Required fields are marked *