Add-VBOJob
Short Description
Creates a backup job.
Syntax
This cmdlet provides the following parameter sets.
- Create a backup job that will back up only selected objects on the specified repository:
Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> -SelectedItems <VBOBackupItem[]> [-ExcludedItems <VBOBackupItem[]>] [-Description <string>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob] [-SelectedOneDriveFolders <string[]>] [-ExcludedOneDriveFolders <string[]>] [<CommonParameters>] |
- Create a backup job that will back up all items of the selected organization except for the specified exclusions:
Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> -EntireOrganization [<SwitchParameter>] [-ExcludedItems <VBOBackupItem[]>] [-Description <string>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob] [-SelectedOneDriveFolders <string[]>] [-ExcludedOneDriveFolders <string[]>] [<CommonParameters>] |
- [OBSOLETE] For creating a backup job that will back up all mailboxes of the selected organization on the chosen repository without the excluded mailboxes. Parameter "AllMailboxes" is obsolete. Use new parameter "EntireOrganization". Parameter "ExcludedMailboxes" is obsolete. Use new parameter "ExcludedItems".
Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> [-AllMailboxes] [-ExcludedMailboxes <VBOOrganizationMailbox[]>] [-Description <string>] [-SchedulePolicy <VBOJobSchedulePolicy>] [-RunJob] [<CommonParameters>] |
- [OBSOLETE] For creating a backup job that will backup only the selected mailboxes on the chosen repository. Parameter "SelectedMailboxes" is obsolete. Use new parameter "SelectedItems".
Add-VBOJob -Organization <VBOOrganization> -Name <string> -Repository <VBORepository> -SelectedMailboxes <VBOOrganizationMailbox[]> [-Description <string>] [-RunJob] [-SchedulePolicy <VBOJobSchedulePolicy>] [<CommonParameters>] |
Detailed Description
This cmdlet creates a backup job that will back up Veeam Backup for Microsoft Office 365 items.
Note: |
Before creating a backup job, make sure you are familiar with the following restrictions:
|
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Organization | Specifies an organization. The backup job will back up the items of this organization. | True | Named | True (ByValue) | False |
Name | Specifies the name you want to use for the backup job. | True | Named | False | False |
Repository | Specifies the backup repository. Veeam Backup for Microsoft Office 365 will store backups in this repository. | True | Named | False | False |
AllMailboxes | OBSOLETE: Parameter "AllMailboxes" is obsolete. Use new parameter "EntireOrganization". Indicates that the backup job will back up all mailboxes of Exchange organization. | True | Named | False | False |
Selected | OBSOLETE: Parameter "SelectedMailboxes" is obsolete. Use new parameter "SelectedItems". Specifies mailboxes that the backup job will back up. | True | Named | False | False |
SelectedItems | Specifies items that the backup job will backup. | True | Named | False | False |
EntireOrganization | Indicates that the job will backup all items of the organization. | True | Named | False | False |
Description | Specifies the description of the backup job. | False | Named | False | False |
Excluded | OBSOLETE: Parameter "ExcludedMailboxes" is obsolete. Use new parameter "ExcludedItems". Specifies mailboxes that the backup job will not back up. If you configured your backup job to back up all Exchange organization mailboxes, the cmdlet will exclude these mailboxes from processing. | False | Named | False | False |
RunJob | Indicates that the backup job will run right after its creation. Otherwise, the backup job will be created with a Stopped status. | False | Named | False | False |
SelectedOneDriveFolders | Specifies OneDrive folders that the backup job will back up. | False | Named | False | False |
ExcludedOneDriveFolders | Specifies OneDrive folders that the backup job will not back up. | False | Named | False | False |
SchedulePolicy | Specifies the backup job schedule settings. For more information on how to create the backup job schedule settings, see New-VBOJobSchedulePolicy. | False | Named | False | False |
ExcludedItems | Specifies items that the backup job will not back up. If you configured your backup job to back up all organization items, the cmdlet will exclude these items from processing. Adding items from SelectedItems as ExcludedItems will result in an error. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Example 1
This example shows how to create a job that will back up selected backup items of an organization except for the exclusions.
- Run Get-VBOOrganization to get an organization. Save the result to the $org variable.
- Run Get-VBORepository to specify the backup repository. Save the result to the $repository variable.
- Run Get-VBOOrganizationUser to get an organization user. In this case we will use it as an excluded item. Save the result to the $excludedUser variable.
- Run New-VBOBackupItem to select the items to exclude from the backup job. Save the result to the $excludedItem variable.
- Run New-VBOBackupItem to select the items for the backup job. Save each selected item to a separate variable: $item1, $item2.
- Run Add-VBOJob with the $org, $repository, $item1 and $excludedItem variables.
$org = Get-VBOOrganization -Name "ABC Company" $repository = Get-VBORepository -Name "ABC Backup Files" $excludedUser = Get-VBOOrganizationUser -Organization $org -Name "UserAlpha" $excludedItem = New-VBOBackupItem -Mailbox -User $excludedUser $item1 = New-VBOBackupItem -Organization $org -Mailbox Add-VBOJob -Organization $org -Repository $repository -Name "ABC Backup" -SelectedItems $item1 -ExcludedItems $excludedItem -RunJob |
Example 2
This example shows how to create a backup job that will back up entire organization. Items backed up by other jobs will not be included.
- Run Get-VBOOrganization to get an organization. Save the result to the $org variable.
- Run Get-VBORepository to specify the backup repository. Save the result to the $repository variable.
- Run Add-VBOJob with the $org and $repository variables. Use RunJob parameter to start the backup job after its creation.
$org = Get-VBOOrganization -Name "ABC Company" $repository = Get-VBORepository -Name "ABC Backup Files" Add-VBOJob -Name "ABC Backup" -Organization $org -Repository $repository -EntireOrganization -RunJob |
Related Commands