This is an archive version of the document. To get the most up-to-date information, see the current version.

Add-VBRBackupToTapeJob

Short Description

Creates backup to tape job or a GFS job.

Applies to

Platform: VMware, Hyper-V

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides two parameter sets.

  • For creating a job targeted to a standard media pool:

Add-VBRBackupToTapeJob -Name <String> -FullBackupMediaPool <VBRTapeMediaPool> [-Force <SwitchParameter>] [-AlwaysCopyFromLatestFull <SwitchParameter>] [-CopyFromLatestFull <SwitchParameter>] [-JobScriptOptions <VBRJobScriptOptions>] [-NotificationOptions <VBRNotificationOptions>] [-WaitForBackupJob <SwitchParameter>] [-WaitPeriod <TimeSpan>] [-UseHardwareCompression <SwitchParameter>] [-ProcessIncrementalBackup <SwitchParameter>] [-Object <Object[]>] [-ScheduleOptions <VBRBackupToTapeScheduleOptions>] [-FullBackupPolicy <VBRFullBackupToTapePolicy>] [-ExportDays <DayOfWeek[]>] [-IncrementalBackupMediaPool <VBRTapeMediaPool>] [-ExportCurrentMediaSet <SwitchParameter>] [-EjectCurrentMedium <SwitchParameter>] [-Description <String>] [-EnableParallelDrivesUsage <SwitchParameter>] [-LimitTapeDrives <Int32>] [<CommonParameters>]

  • For creating a GFS job:

Add-VBRBackupToTapeJob -Name <String> -GFSMediaPool <VBRTapeGFSMediaPool> [-Force <SwitchParameter>] [-GFSScheduleOptions <VBRTapeGFSScheduleOptions>] [-AlwaysCopyFromLatestFull <SwitchParameter>] [-CopyFromLatestFull <SwitchParameter>] [-JobScriptOptions <VBRJobScriptOptions>] [-NotificationOptions <VBRNotificationOptions>] [-WaitForBackupJob <SwitchParameter>] [-WaitPeriod <TimeSpan>] [-UseHardwareCompression <SwitchParameter>] [-ProcessIncrementalBackup <SwitchParameter>] [-Object <Object[]>] [-ScheduleOptions <VBRBackupToTapeScheduleOptions>] [-FullBackupPolicy <VBRFullBackupToTapePolicy>] [-ExportDays <DayOfWeek[]>] [-ExportCurrentMediaSet <SwitchParameter>] [-EjectCurrentMedium <SwitchParameter>] [-Description <String>][-EnableParallelDrivesUsage <SwitchParameter>] [-LimitTapeDrives <Int32>] [<CommonParameters>]

Detailed Description

This cmdlet creates a new backup to tape job or a GFS job. Target the job to a simple or a GFS media pool.

Starting from Veeam Backup & Replication version 9.5 Update 3, the cmdlet checks if the data of the VMs added to the job changes its geographical location.

Add-VBRBackupToTapeJob Note:

Mind the following:

  • The cmdlet will not run if the geographical location of the repository where VM backups reside and the target media pool location do not match. If you still want to run the cmdlet, use the Force parameter.
  • If you choose to archive data from backup repositories, the backup to tape job will process only the backups that were created with backup jobs configured on this Veeam backup server. Imported backups and configuration backups will be skipped from processing.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Name

Specifies the name you want to assign to the backup to tape job.

True

Named

False

False

Description

Specifies the description of the backup to tape job.

False

Named

False

False

EjectCurrentMedium

Indicates that the tapes will be automatically ejected from drive after the job finishes.

The ejected tape is moved to a standard library slot.

False

Named

False

False

ExportCurrentMediaSet

Indicates that the tapes belonging to the media set will be automatically placed to Import/Export (Mail) slot for further export. Use the ExportDays parameter to set days on which you want to export tapes.

If you use this parameter, but do not set the ExportDays parameter, the tapes will be exported every day.

False

Named

False

False

FullBackupMediaPool

For non-GFS jobs.

Specifies the media pool where you want to store full backups produced by this tape job.

Accepts VBRTapeMediaPool object, GUID or string type.

True

Named

False

False

IncrementalBackupMediaPool

For non-GFS jobs.

Used to set media pool for the ProcessIncrementalBackup parameter.

Specifies the media pool where you want to store incremental backups produced by this tape job.

Accepts VBRTapeMediaPool, GUID or string type.

False

Named

False

False

GFSMediaPool

For GFS jobs.

Specifies the target GFS media pool.

Accepts VBRTapeGFSMediaPool, GUID or string type.

True

Named

False

False

ExportDays

Used to set days for exporting tapes for the ExportCurrentMediaSet parameter.

Specifies days on which the tapes written by this tape job will be automatically exported: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

False

Named

False

False

FullBackupPolicy

Specifies virtual full settings.

Accepts VBRFullBackupToTapePolicy type.

False

Named

False

False

ScheduleOptions

Specifies backup to tape job schedule.

Default:

  • Enabled: False.
  • Type: Daily.
  • DailyOptions: Type: SelectedDays, Period: 18:00, DayOfWeek: Saturday.
  • MonthlyOptions: Period: 22:00, DayNumberInMonth: Fourth, DayOfWeek: Saturday, Months: January, February, March, April, May, June, July, August, September, October, November, December.
  • ScheduleOptions: From Sunday to Saturday, from 00:00 to 23:00, Enabled: True.
  • JobId: Null.

False

Named

False

False

Object

Specifies the array of backup jobs or backup repositories that will be the source for this tape job.

Accepts either of the following types:

False

Named

False

False

ProcessIncrementalBackup

Indicates that this tape job will archive incremental backups.

Use the IncrementalBackupMediaPool parameter to specify a separate media pool for storing incremental backups. If you do not set the IncrementalBackupMediaPool parameter, incremental backups will be stored to the media pool the you set for full backups.

False

Named

False

False

UseHardwareCompression

Indicates that tape library must perform hardware compression for archives. Do not use this option for archiving Veeam backups or other already compressed files.

False

Named

False

False

WaitPeriod

Used to set time period for the WaitForBackupJob parameter.

Specifies the time period for which the tape job must wait for the source backup jobs to finish.

Can be set to 1-777 minutes.

Accepts TimeSpan, integer or string types.

False

Named

False

False

WaitForBackupJob

Indicates that the tape job must wait for the source backup job to finish. Use the WaitPeriod parameter to set the time period.

False

Named

False

False

NotificationOptions

Specifies the email notification options.

Accepts VBRNotificationOptions type.

False

Named

False

False

JobScriptOptions

Specifies scripting options.

Accepts VBRJobScriptOptions type.

False

Named

False

False

CopyFromLatestFull

Indicates that on the first run the tape job must copy only the latest backup chain. Otherwise,on the first run the job will copy all restore points produced by the source backup jobs that are available on disk.

False

Named

False

False

AlwaysCopyFromLatestFull

Indicates that on each run the tape job must copy only the latest backup chain. Otherwise, on each run the tape job will copy all restore points produced by the source backup jobs that are available on disk.

False

Named

False

False

GFSScheduleOptions

Specifies the schedule settings for the GFS media pool.

Accepts VBRTapeGFSScheduleOptions type.

False

Named

False

False

EnableParallelDrivesUsage

Enables parallel processing of media pools.

Default: False.

False

Named

False

False

LimitTapeDrives

Defines that the cmdlet will limit the number of drives to use for processing this tape job.

Default: 2 drives.

False

Named

False

False

Force

Indicates that the cmdlet will create a job even if the geographical location of the repositories where VM backups reside and the target media pool location do not match.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Return Type

VBRBackupToTapeJob

Example

This example shows how to create a tape job that has a backup job as source. The tape job will use the same media pool to back up full and incremental backups.

  1. Run Get-VBRJob to get the backup job that will be the source. Save the job to the $job variable.
  2. Run Get-VBRTapeMediaPool to get the media pool. Use the same media pool to write full and incremental backups. Save the media pool to the $mediapool variable.
  3. Configure the job schedule. Run New-VBRDailyOptions to set the day and time. Save the result to the $dailyoptions variable. Run New-VBRBackupToTapeScheduleOptions with the $dailyoptions variable. Save the schedule to the $scheduleoptions variable.
  4. Run Add-VBRBackupToTapeJob to create the tape job. Use the saved variables.

$job = Get-VBRJob -Name "SQL 1 Backup"

$mediapool = Get-VBRTapeMediaPool -Name "SQL Backups Media Pool"

$dailyoptions = New-VBRDailyOptions -DayOfWeek Friday -Period 23:00

$scheduleoptions = New-VBRBackupToTapeScheduleOptions -DailyOptions $dailyoptions -Enabled

Add-VBRBackupToTapeJob -Name "SQL to Tape" -Description "SQL archive" -Object $job -FullBackupMediaPool $mediapool -ProcessIncrementalBackup -IncrementalBackupMediaPool $mediapool -ExportDays Monday -ScheduleOptions $scheduleoptions

Related Commands

Get-VBRTapeMediaPool

New-VBRFullBackupToTapePolicy

New-VBRBackupToTapeScheduleOptions

Get-VBRJob

Get-VBREPJob

New-VBRNotificationOptions

New-VBRJobScriptOptions

New-VBRBackupToTapeScheduleOptions

New-VBRTapeGFSScheduleOptions

Get-VBRBackupRepository

Get-VBRLocation