1-800-691-1991 | 9am - 8pm ET
EN

How to migrate backup data to Object Repository

KB ID: 3067
Product: Veeam Backup for Microsoft Office 365 5.0, Veeam Backup for Microsoft Office 365 4.0
Published: 2019-12-16
Last Modified: 2021-05-28

Challenge

Starting with Veeam Backup for Microsoft Office v4, a new type of backup repository was added — the object storage repository. You may want to migrate your existing backups to this new repository and store your backups in the cloud.

Cause

Veeam Backup for Microsoft Office 365 does not have an option to migrate existing backup data from a local backup repository to an object storage repository using the product UI. Data can only be moved using Veeam Backup for Microsoft Office 365 PowerShell cmdlets.

The purpose of this article is to provide additional information on the workflow and to demonstrate how it can be automated.

Solution

Note: Before you proceed with the steps described below, make sure that the target object storage does not have any existing data associated with the entities that will be migrated.

To transfer existing backup data from a local backup repository to an object storage repository, you can use the Move-VBOEntityData PowerShell cmdlet.

Mind the following:

  • Veeam Backup for Microsoft Office 365 supports the following scenarios of data migration between repositories:
    • Migration from a local backup repository to an object storage repository
    • Migration between local backup repositories
  • Existing restore points will be available after migration but they no longer will be attached to the original job. To access the necessary restore point, right-click the corresponding organization name.
  • The migration procedure will not automatically reconfigure backup jobs. To proceed with backup to an object storage repository, you must reconfigure the jobs manually and point them to the new target.
  • It is recommended to run migration operations outside of backup windows to avoid overhead on a proxy and affecting backup jobs performance.

The following instructions provide an explanation of Veeam PowerShell cmdlets that allow you to migrate data.

Note: Before you use a script from this KB, make sure that you have installed Veeam Backup for Microsoft Office 365 version 5b and cumulative patch KB4135 or a later product version.

To download Microsoft Office 365 version 5b, refer to KB4092.

 

Understanding Variables and Parameters


This example shows how to perform basic operations with Veeam PowerShell cmdlets and move backup data from a local backup repository to an object storage repository.

$source = Get-VBORepository -Name "Source Repository Name"
$target = Get-VBORepository -Name "Object Storage Repository Name"
$data = Get-VBOEntityData -Type User -Repository $source -Name "John Doe"
Move-VBOEntityData -From $source -To $target -User $data

This description covers details on the cmdlets and parameters that are used to get the necessary objects and migrate backup data between backup repositories. This data includes a single user’s mailbox, archive mailbox, OneDrive and SharePoint site.

  1. Run the Get-VBORepository cmdlet to get the source local repository. Provide the Name parameter value to get the repository by its name. Save the result to the $source variable.
  2. Run the Get-VBORepository cmdlet to get the target object storage repository. Provide the Name parameter value to get the repository by its name. Save the result to the $target variable.
  3. Run the Get-VBOEntityData cmdlet to get the backup data that you want to move. Provide the value for the Type parameter to specify the type of data that you want to move.
    You can specify one of the following types of data: UserGroupSiteTeam (available only in Veeam Backup for Microsoft Office 365 5.0 and later). For more information on the types of backup data that you can get, see the Get-VBOEntityData section of the PowerShell Reference for Veeam Backup for Microsoft Office 365.
    Note: The Organization type of backup data is not supported for this scenario. In addition, the Move-VBOEntityData cmdlet works only with a single user object. Therefore, for the purposes of data migration, you must always use the Get-VBOEntityData cmdlet with the Name parameter. Without this parameter, the Get-VBOEntityData cmdlet will assign an array of users to the $data variable, which can not be used by the Move-VBOEntityData cmdlet.
  4. Run the Move-VBOEntityData cmdlet to migrate data from the local backup repository to the target object storage repository.

Additionally, you can specify one of the following objects that you want to move.

For User backup data:

  • Mailbox
  • ArchiveMailbox
  • OneDrive
  • Sites

For Group backup data:

  • GroupMailbox
  • GroupSite

For example, to migrate the user's OneDrive and Archive mailbox data, run the following command:

Move-VBOEntityData -From $source -To $target -User $data -OneDrive -ArchiveMailbox

Scalability

By default, a session iniciated by running the Move-VBOEntityData cmdlet is a single-thread operation, and you will not be able to start another migration job before the current one is finished. To migrate larger amounts of data, it is recommended to run migration jobs in parallel by using the RunAsync parameter. For example:

Move-VBOEntityData -From $source -To $target -User $data -RunAsync

Status of data management jobs is displayed in the Veeam Backup for Microsoft Office 365 UI under the Data Management node in the job sessions history.

 

kb3067_v5

Automation

The script below is designed to demonstrate how to automate backup data migration to an object storage repository.

Please note that the script is provided to demonstrate automation possibilities and is not supported by Veeam Technical Support. Use it at your own risk.

 

The script consists of steps that perform the following operations:
Step 1. Selecting Organization. This step defines the organization which data you want to migrate.
Step 2. Selecting Backup Proxy. This step defines the backup proxy server that hosts existing backup data.
Step 3. Selecting Target Repository. This step defines the target object storage repository.
Step 4. Limiting Migrations Sessions. This step configures the maximum number of simultaneous migration sessions to a half of all threads configured for the selected backup proxy server. For example, if there are 64 threads configured on the backup proxy server, it will limit the number of migration sessions to 32 migration sessions.
Step 5. Disabling All Jobs for Selected Organization. This step disables all backup jobs created for the specified organization.
Step 6. Creating List of Source Repositories. This step creates a list of backup repositories used by the backup jobs from the step 5 that will be used as source repositories. (If a repository is not in use by at least one backup job, the data residing there will not be migrated.)
Step 7. Getting and Migrating All Users. This step creates a list of all Users, Sites, Teams (available in Veeam Backup for Microsoft Office 365 5.0 and later) and Groups located in the repositories from the step 6 and then migrates their data.
Step 8. Reconfiguring Job to Use New Repository. This step reconfigures all the jobs from the step 5 to use the object storage repository that is defined as a target repository and enables all jobs disabled at the step 5.

To run the script download the file below, place it to any location on your Veeam Backup for Microsoft Office server.

Then run the "kb3067.ps1" file and follow the steps. For ease of use, comments are provided for each step in the script.

More information

DOWNLOAD SCRIPT



MD5: F286D3FB73FA0880EEB077B294122256
SHA-1: 85007CA887E9F2066E169307BCAFFAA42A2F5250

KB ID: 3067
Product: Veeam Backup for Microsoft Office 365 5.0, Veeam Backup for Microsoft Office 365 4.0
Published: 2019-12-16
Last Modified: 2021-05-28

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later
Knowledge base content request
By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Policy.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

ty icon

Thank you!

We have received your request and our team will reach out to you shortly.

OK

error icon

Oops! Something went wrong.

Please go back try again later.