Linux operating systems Windows operating systems
IBM Tivoli Storage Manager, Version 7.1

Backup VM

Use the backup vm command to start a full backup of a virtual machine.

Windows operating systems
The Backup VM command can be used to back up both Microsoft Hyper-V virtual machines and VMware virtual machines. The information for each hypervisor is presented in its own heading. If you are backing up a virtual machine that is part of a Hyper-V set up, you can skip over the Backing up VMware virtual machines text. If you are backing up a VMware virtual machine, you do not need to read the Backing up Hyper-V virtual machines text.
Linux operating systems Windows operating systems

Backing up VMware virtual machines

Use the backup vm command to back up VMware virtual machines.

One or more virtual machines are processed using the Tivoli® Storage Manager data mover node. Data mover node is the name given to a configuration where the Backup-Archive Client runs on a vStorage backup server and is configured to protect the virtual machines in a Virtual Center or ESX/ESXi server. You must configure the VMware virtual machine before using this command. For information on configuring the VMware virtual machine, see Preparing the environment for full backups of VMware virtual machines.

A full VM backup stores a backup copy of all virtual disk images and configuration information for a virtual machine. Full VM backups enable a complete restore of a virtual machine, but they take more time and more server space than a file-level or incremental backup.

Windows operating systems File-level VM backups allow you to individually restore virtual machine files, but it does not have an easy full VM machine recovery procedure. You might want to use a combination of file level VM backups with periodic full VM backups for optimal results. You must be licensed to use Tivoli Storage Manager for Virtual Environments to use the periodic full backup strategy. The periodic full strategy is described in Periodic full backup strategy.

If you set the vmenabletemplatebackups option to yes, a Backup VM operation includes the template VMs, but only if the vStorage backup server is connected to a vCenter Server, and not to an ESX or ESXi host.

Virtual machines deployed in vApps are included in Backup VM operations. There are no client options needed to protect the vApp VMs.

A Full VM backup uses VMware Changed Block Tracking (CBT) to create content-aware (used-block only) backups. Tivoli Storage Manager enables changed block tracking (CBT) on an ESX or ESXi server when a backup begins. VMware CBT requires an ESX 4.1 (or later) host, with virtual hardware 7 (or later). You cannot perform incremental or full VM content-aware backups on virtual machines that do not support CBT.

When CBT is enabled, it tracks disk changes when I/O operations are processed by the ESX or ESXi server storage stack on the following disks:
  • A virtual disk stored on VMFS; the disk can be an iSCSI disk, a local disk, or a disk that is on a SAN.
  • A virtual disk stored on NFS.
  • An RDM that is in virtual compatibility mode.
When I/O operations are not processed by the ESX or ESXi storage stack, changed block tracking cannot be used to track disk changes. The following disks cannot use CBT:
  • An RDM that is in physical compatibility mode.
  • A disk that is accessed directly from inside a VM. For example, vSphere cannot track changes made to an iSCSI LUN that is accessed by an iSCSI initiator in the virtual machine.
Complete information about changed block tracking requirements is described in the VMware Virtual Disk API Programming Guide at http://www.vmware.com/support/developer/vddk/. Search for "Low Level Backup Procedures" and read the "Changed Block Tracking on Virtual Disks" section.
For VMware servers that do not support CBT, both the used and the unused areas of the disk are backed up and an informational message is logged in the dsmerror.log file. Use the the -preview option on the Backup VM command to view the current CBT status. CBT status has three values:
Off
Indicates the CBT configuration parameter (ctkEnabled) has not been enabled in the virtual machine's configuration parameters. Off is the default state.
Not Supported
Indicates that the virtual machine does not support CBT. Changed-block only backups are not possible.
On
Indicates the virtual machine supports CBT and that CBT is enabled in the virtual machine's configuration parameters (ctkEnabled=true).
The client turns on CBT (it sets ctkEnable=true) with each backup attempt. After the client turns CBT on, it remains on, even if the virtual machine is deleted from the Tivoli Storage Manager server. With CBT enabled, after the first full VM backup is performed, only the changed blocks on the disk are backed up or restored.
If you are no longer performing Tivoli Storage Manager backups of a virtual machine, you can turn off CBT. To turn off CBT, right-click the virtual machine that you want to turn off CBT for in the vSphere client. Click Edit Settings > Options > General > Configuration Parameters. Then set the ctkEnabled configuration parameter to false.
Tip: You can use the compression option with backups only if the backup is being saved to a storage pool that has been enabled for client-side deduplication.

Windows operating systems See Compression, encryption, and adaptive subfile backup processing for more information.

Windows operating systems Linux operating systems You specify the -vmbackuptype and -mode options to indicate how the backups are to be performed. For full VM backups, use -vmbackuptype=fullvm, and specify any of the following mode options:
Full
Full mode specifies you want to perform an image backup of all objects on a VMware virtual machine’s disks. Contrast mode=full with mode=incremental, which creates a snapshot containing only the data that have changed since the last backup.
Incremental
Incremental mode specifies that you want to create an image backup of only the objects that have changed since the last backup. You must be licensed to use Tivoli Storage Manager for Virtual Environments to use this mode.
IFFull
IFFull stands for incremental forever full VM backup. In this mode, a snapshot of all used blocks on a VMware virtual machine’s disks are backed up to the server. You must be licensed to use Tivoli Storage Manager for Virtual Environments to use this mode.
IFIncremental
IFIncremental stands for incremental forever, incremental. In this mode, a snapshot is created of the blocks that have changed since the last backup. You must be licensed to use Tivoli Storage Manager for Virtual Environments to use this mode.

The incremental forever backup strategy is described in Incremental forever strategy.

Supported Clients

Windows operating systems This command is valid on supported Windows clients that are installed on a vStorage backup server that protects VMware virtual machines.

Linux operating systems This command is valid only on supported Linux clients that are installed on a vStorage backup server that protects VMware virtual machines.

Syntax

Read syntax diagramSkip visual syntax diagram
                .-,------.     
                V        |     
>>-Backup VM------vmname-+-------------------------------------->

>--+-------------------------------------------------+---------><
   '-:vmdk=-- --disk_label-- -- -PREView-- --options-'   

Parameters

vmname
Specify the name of one or more virtual machines that you want to back up. The name can be the DNS host name or the virtual machine display name. Separate multiple virtual machine names with commas. If you have set the vmenabletemplatebackups option to yes, vmname can specify the name of a template VM to back up.
If you do not specify vmname, you can identify the virtual machine with one of the following options:
  • domain.vmfull
  • Windows operating systems domain.vmfile
:vmdk=disk_label
This keyword is an extension to the vmname . It specifies the label of the virtual machine disk to include in the backup operation. You can exclude a disk by preceding the keyword with the exclusion operator (-). You can also specify multiple keywords as part of the vmname. For example:
EXCLUDE.VMDISK
For additional ways to include or exclude disks from processing, see Domain.vmfull, EXCLUDE.VMDISK, INCLUDE.VMDISK.
-PREView
This option displays information about a virtual machine, including the labels of the hard disks in the virtual machine. The disk labels can be used on the backup vm command with :vmdk= or :-vmdk= keywords to include or exclude disks from a backup operation. The following is sample output from the -preview parameter:
backup vm vm1 -preview
Full BACKUP VM of virtual machines 'VM1'.

  1. vmName:vm1
VMDK[1]Label: Hard disk 1
VMDK[1]Name: [ds5k_svt_1] tsmcetlnx14/tsmcetlnx14.vmdk
VMDK[1]Status: Included
VMDK[2]Label: Hard disk 2
VMDK[2]Name: [ds5k_svt_1] tsmcetlnx14/tsmcetlnx14_1.vmdk
VMDK[2]Status: Excluded - user,Independent,pRDM
In this example output from -preview, VMDK 2 was omitted from the backup. Disks that are included in a backup have a status of "Included". Skipped disks have a status of "Excluded", followed by a reason code. The reason codes can be any of the following:
user
Indicates that the disk was skipped because it was excluded on a domain.vmfull statement, on the command line, or in the client options file.
Independent
Indicates that the disk is an independent disk. Independent disks cannot be part of a snapshot, so they are exclude from backup vm operations. Ensure that the vmprocessvmwithindependent option is set to yes or the entire virtual machine will be bypassed by a backup operation if it contains one or more independent disks.
pRDM
Indicates that the disk is a physical Raw Device Mapped (pRDM) disk. pRDM disks cannot be part of a snapshot, so they are exclude from backup vm operations. Ensure that the vmprocessvmwithprdm option is set to yes or the entire virtual machine will be bypassed by a backup operation if it contains one or more raw device mapping (RDM) volumes provisioned in physical-compatibility mode (pRDM).

Return codes for VMware virtual machine backup operations

Backup operations for VMware virtual machines can complete with the return codes shown in Table 1.
Table 1. Backup vm return codes
Return code Description
0 A command to back up one or more virtual machines completed successfully.
8 A command to back up multiple virtual machines succeeded for only some of the virtual machines that were targeted by the command. Examine the log file to determine the processing status for each of the targeted virtual machines.
12 A command was issued to back up one or more virtual machines. The command did not complete for any of the virtual machines that were targeted by the command. Examine the log file to determine the possible reasons for the failure.

vStorage API for data protection example commands

Windows operating systems Perform a file-level backup of a VM named vm1:
dsmc backup vm vm1 -vmbackuptype=file
Perform a file-level virtual machine backup of vm1.example.com using the VMware VirtualCenter machine named virtctr.example.com:
dsmc backup vm vm1 -vmbackuptype=file -vmchost=virtctr
Perform an IFIncremental backup of two VMs named vm3 and vm4:
dsmc backup vm vm3,vm4 -vmbackuptype=fullvm -mode=ifincremmental
Perform an IFFull backup of a VM named vm1:
dsmc backup vm vm1 -vmbackuptype=fullvm -mode=iffull
Perform an IFFull VM backup of a VM named vm1, but only include Hard Disk 1 in the back up operation:
dsmc backup vm "vm1:vmdk=Hard Disk 1" -vmbackuptype=fullvm -mode=iffull
Perform an incremental-forever backup of a virtual machine named vm1, but exclude Hard Disk 1 and Hard Disk 4 from the backup operation.
dcmc backup vm "vm1:-vmdk=Hard Disk 1:-vmdk=Hard Disk 4" 
  -vmbackuptype=fullvm -mode=iffull 
Perform an incremental-forever-full backup of two virtual machines named vm1 and vm2. On vm1, back up only Hard Disk 2 and Hard Disk 3. On vm2, back up all virtual disks:
dsmc backup vm "vm1:vmdk=Hard Disk 2:vmdk=Hard Disk 3",
  vm2 -vmbackuptype=fullvm -mode=iffull 
Perform parallel backups of the VMware virtual machines that are selected for backup by using the selection criteria (domain parameters) on the domain.vmfull statement. Limit the number of parallel backups to 5 virtual machines, and prevent more than 2 of them, on any ESX or ESXi server, from being included in the parallel backup operation:
dsmc backup vm –vmmaxparallel=5 –vmlimitperhost=2 –vmlimitperdatastore=0
Linux operating systems Windows operating systems
Related links for backing up VMware virtual machines
Windows operating systems

Backing up Microsoft Hyper-V virtual machines

Use the Backup VM command to create a full VM backup of Hyper-V virtual machines. You can back up Hyper-V guests that exist on a local disk, a SAN-attached disk, or cluster shared volume.

For Hyper-V backup operations, you must specify vmbackuptype=hypervfull. The only supported mode option for Hyper-V backups is mode=full (the mode option is not even examined when you specify vmbackuptype=hypervfull).

For Hyper-V backups, you can specify one or more virtual machine names that you want to back up. Separate the names with commas. If you want to obtain a list of Hyper-V virtual machines that are defined on the Hyper-V server, type a question mark (backup vm ?).

Supported Clients

This command is valid on supported Windows clients that are installed on a Hyper-V host server.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-Backup VM--vmname--+---------------------+--+---------+-----><
                      | .-,---------------. |  '-options-'   
                      | V                 | |                
                      +---vmlist=--vmname-+-+                
                      '-vmlist=?------------'                

Parameters

vmname
Specify the name of the virtual machine that you want to back up.
vmlist=vmname_1,vmname_2,vmname_n
Specifies a list of virtual machine names to back up; separate the virtual machine names with commas. The vmname and vmlist= syntaxes are mutually exclusive; you an specify a virtual machine name or a list of virtual machine names, but not both.
vmlist=?
Displays a list of virtual machines defined to the Hyper-V server.

Hyper-V example commands

Create a full VM backup of a Hyper-V virtual machine, by specifying the virtual machine name "VM1".
dsmc backup vm VM1 -vmbackuptype=hypervfull
Use the vmlist= keyword to back up two Hyper-V virtual machines, named vm1 and vm5:
dsmc backup vm -vmbackuptype=hypervfull -vmlist=vm1,vm5
List all virtual machines defined on the Hyper-V host machine:
dsmc backup vm vmlist=?

Hyper-V options file examples

Specify individual virtual machines in the client options file:
backuptype hypervfull
vmlist vm1,vm2,vm5
Related links for backing up Hyper-V virtual machines


Feedback