You can use this command to run or schedule a backup task of your virtual machines.
vmcli command >>-vmcli------ -f backup----------------------------------------> >--+---------------------------------------+--------------------> '- -t--backup_type--+-----------------+-' '- ,--backup_type-' >---- -I--backupObjectListFile----+------------------+----------> '- -D--deviceClass-' >--+--------------+---------------------------------------------> '- -H--esxHost-' >--+-------------------------------------------------------------------+--> '- --vmbackupmode--SNAPSHOT_INCL_MEM|SNAPSHOT_EXCL_MEM|SUSPEND|ASIS-' >--+---------------------------------+--------------------------> '- --start--scheduleStartDateTime-' >--+------------------------------+-----------------------------> '- --interval--intervalSeconds-' >--+-----------------------------+--+------------------+--------> '- --end--scheduleEndDateTime-' '- --priority--1-5-' >--+-------------------+----------------------------------------> '- --name -taskName-' >--+---------------------------------------+--+-----------+---->< '- --description -descriptionInFile.txt-' '- --runnow-'
When this option is selected, then by default TSM_INCR is also selected.
# Lines starting with # and blank lines will be ignored
#
# Wildcards ? and * are supported
# ? - any single character
# * - any character sequence (also empty)
# Wildcards are allowed for datastorename and
# vmname identifier
#
# Include statements are optional
# Includes may comprise datastoreurl and datastorename identifier
#
# Exclude statements are optional
# Exclude statements begin with a "!"
# Excludes may comprise datastorename, datastoreurl,
# vminstanceuuid and vmname identifier
#
#Include datastore with this URL in the backup
datastoreurl:dsUrl
#Include datastore with this name in the backup
datastorename:dsName
#Include datastores matching the wildcard string in the backup datastorename:
datastorename:ds?am*
#Include VM matching this instance uuid in the backup. Fails if it is not
#found within the included datastores which additionally need to be specified
#in the infile when this option is used
vminstanceuuid:vmInstanceUuid
Comments are allowed and must be marked with a '#' sign
at the beginning of the line.# Lines starting with # and blank lines will be ignored
#
# Wildcards ? and * are supported
# ? - any single character
# * - any character sequence (also empty)
# Wildcards are allowed for datastorename and
# vmname identifier
#
# Include statements are optional
# Includes may comprise datastoreurl and datastorename identifier
#
# Exclude statements are optional
# Exclude statements begin with a "!"
# Excludes may comprise datastorename, datastoreurl,
# vminstanceuuid and vmname identifier
#
#Exclude VM with this uuid from the backup
!vminstanceuuid:vmUuid
#Exclude VM with this name from the backup (needs to be unique)
!vmname:vmName
#Exclude all vms matching this wildcard string from the backup
!vmname:vmN*
#Exclude datastore with this URL from the backup
!datastoreurl:dsUrl
#Exclude all datastores matching this wildcard string from the backup
!datastorename:ds?am*
Comments are allowed
and must be marked with a '#' sign at the beginning of the line. #TASK taskID taskType dateCreated
#PARAM TASK_NAME=taskName
#PARAM BACKUP_TYPE=backupType[,backupType[,...]]
#PARAM AUXILIARY_ESX_HOST=esxHostname
#PARAM OBJECT=datastoreurl:datastoreurl
#PARAM OBJECT=vminstanceuuid:vminstanceuuid
#PARAM OBJECT=vminstanceuuid:vminstanceuuid
#RUN runID runDate
#LANG country-code (en-US,de-DE)
#PARAM BID=BID
#PARAM CHAIN_NUMBER=CHAIN_NUMBER
#PARAM BACKEND=backendType
#PARAM Version: 3.2.0.0 Build: 527
#PARAM AUXILIARY_ESX_HOST=esxHostname
#PARAM VM_BACKUP_MODE=SNAPSHOT_INCL_MEM|SNAPSHOT_EXCL_MEM|SUSPEND|ASIS
#PARAM DEVICE_CLASS=deviceClass
#PARAM BACKUP_TYPE=backupType
#PARAM BACKUP_ID=backupID
#PHASE_COUNT 4
#PARAM OBJECT=#datastoreurl:datastoreurl
#PARAM OBJECT=datastoreurl:datastoreurl
#PARAM OBJECT=# vmname
#PARAM OBJECT=#vmname:vmname
#PARAM OBJECT=vminstanceuuid:vminstanceuuid
#PARAM OBJECT=#vmname
#PARAM OBJECT=#vminstanceuuid:vminstanceuuid
#PARAM OBJECT=vmname
#PARAM OBJECT=vminstanceuuid:vminstanceuuid
#PARAM OBJECT=#distributedvm...
#PARAM OBJECT=#!vminstanceuuid:5vminstanceuuid
#PARAM OBJECT=#vmname:vmname
#CHILD datacentername:datacentername
#PARENT vmuuid:vmUuid
#CHILD vminstanceuuid:vmInstUuid
#PARENT vmuuid:vmUuid
#CHILD vmname:vmName
#PARENT vmuuid:vmUuid
#CHILD offloadstate:offloadstate
#PARENT vmuuid:vmUuid
#CHILD esxhostname:esxHostName
#PARENT vmuuid:vmUuid
#CHILD datacentername:datacentername
#PARENT vmuuid:vmUuid
#CHILD vminstanceuuid:vmInstUuid
#PARENT vmuuid:vmUuid
#CHILD vmname:vmName
#PARENT vmuuid:vmUuid
#CHILD offloadstate:TAPE_BACKUP_FAILED
#PARENT vmuuid:vmUuid
#CHILD esxhostname:esxHostName
#PARENT vmuuid:vmUuid
#PARAM COPYSERVICE_HARDWARE_TYPE=SVC|XIV|DS8000
#PARAM FLASHCOPYTYPE=COPY|NOCOPY|INCR //This parameter
is only set for storage types DS and XIV
#PHASE PARTITION
#CHILD lunid:lun_id
#PARENT datastoreurl:dsUrl
#CHILD datastorename:datastore_name
#PARENT datastoreurl:dsUrl
#CHILD datastoreurl:dsUrl
#PARENT vmuuid:vmUuid
#CHILD diskkey:key of virtual disk
#PARENT vmuuid:vmUuid
#CHILD disklabel:label of virtual disk
#PARENT diskkey:key of virtual disk
#CHILD disksize:disksize
#PARENT diskkey:key of virtual disk
#CHILD parentdiskfile:datastore path to vmdk file
#PARENT diskkey:key of virtual disk
#CHILD diskkey:key of virtual disk
#PARENT vmuuid:vmUuid
#CHILD disklabel:label of virtual disk
#PARENT diskkey:key of virtual disk
#CHILD disksize:disksize
#PARENT diskkey:key of virtual disk
#CHILD parentdiskfile:datastore path to vmdk file
#PARENT diskkey:key of virtual disk
#PHASE PREPARE
#PHASE FLASH
#PHASE VERIFY
#PARAM STATUS=runStatus
#END RUN runID endRunDate
#END TASK taskID
#END
#
This function is used to rerun a defined backup task against the corresponding backup server. It can be used to run a backup once and to schedule backup tasks.
vmcli -f backup -T taskID --runnow
This command changes a backup task. It can be used to edit or delete the details of a backup task. The taskID must be specified. The options for this command are the same as the backup function, except -I is an optional parameter. All parameters set for the task can now be overwritten with the new value. When a backup task is changed it is not run immediately. To start the backup task immediately, the --runnow parameter must be included in the command.
vmcli -f backup -T taskID[-t backupType][-I backupObjectListFile}
[-B backupID][-D deviceClass][-H esxHost]
[--vmbackupmode (SNAPSHOT_INCL_MEM|SNAPSHOT_EXCL_MEM|SUSPEND|ASIS)]
[--start scheduleStartDateTime[--interval intervalSeconds
[--end scheduleEndDateTime]][--priority 1-5]]
[--name taskName][--description descriptionInFile.txt][--runnow]
#TASK taskID taskType dateCreated
[ #PARAM TASK_NAME=taskName ]
[ #PARAM TASK_DESCRIPTION=text with \n chars
[ #PARAM TASK_SCHEDULE=startDateTime [intervalSeconds [endDateTime]] ]
[ #PARAM TASK_PRIORITY=1-5
[ #PARAM NEXT_DUE_DATE=date/time
[ #PARAM AUXILIARY_ESX_HOST=esxHostname
[ #PARAM VM_BACKUP_MODE=SNAPSHOT_INCL_MEM|SNAPSHOT_EXCL_MEM|SUSPEND|ASIS]
[ #PARAM DEVICE_CLASS=STANDARD|Name ]
[ #PARAM BACKUP_TYPE=[,backupType,[,..]] ]
[ #PARAM DELETE_DATE=date/time // only set if marked for deletion
#PARAM OBJECT=one line from backup object list file
[ #PARAM OBJECT=... ]
...
#END TASK taskID
#END