Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Creating Hyper-V Backup Job

This example shows how to create a Hyper-V backup job for a CRM database server, then add another CRM database server to this job and set the additional options.

You will need to perform the following steps:

  1. Create the backup job by running Add-VBRHvBackupJob. You will need to get the VM that you will add to the job and the backup repository to store its backups. Use Find-VBRHvEntity and Get-VBRBackupRepository respectively.
  2. If you want to add another VM to the created job, get the job with Get-VBRJob and run Add-VBRHvJobObject.
  3. Configure a schedule with Set-VBRJobSchedule and apply it to the job. Remember to enable the schedule with Enable-VBRJobSchedule.
  4. Add advanced job options: schedule a synthetic and an active full backup with Set-VBRJobAdvancedBackupOptions.

// Create a backup job:

PS C:\PS> $crm = Find-VBRHvEntity -Name "CRMdb_01"

PS C:\PS> $repository = Get-VBRBackupRepository -Name 172.16.03.119

PS C:\PS> Add-VBRHvBackupJob -Name "CRM Backup" -Entity $crm -BackupRepository $repository

 

// Add another VM to the job:

PS C:\PS> $crmjob = Get-VBRJob -Name "CRM Backup"

PS C:\PS> Find-VBRHvEntity -Name "CRMdb_02" | Add-VBRHvJobObject -Job $crmjob

 

// Configure job schedule and enable it:

PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-VBRJobSchedule -Daily -At "21:00" -DailyKind Weekdays | Enable-VBRJobSchedule

 

// Set synthetic full and active full schedule:

PS C:\PS> Get-VBRJob -Name "CRM Backup" | Set-VBRJobAdvancedBackupOptions -TransformFullToSyntethic -TransformIncrementsToSyntethic -TransformToSyntethicDays Sunday -EnableFullBackup-FullBackupScheduleKind Monthly -DayNumberInMonth Last -FullBackupDays Sunday

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation