In certain cases, it may be beneficial to take a VAMI backup of the vCenter server from the command line, for example if access to the VAMI page is not functional.
vCenter Server Appliance 7x
vCenter Server Appliance 8x
The purpose of this KB is to assist with taking a vCenter VAMI backup from the command line.
dcli com vmware appliance recovery backup job create --location-type SFTP --location sftp://FQDN_OR_IP_OF_BACKUP_SERVER/BACKUP_LOCATION_DIRECTORY --location-user BACKUP_LOCATION_USER --location-password BACKUP_LOCATION_USER_PASSWORD +username administrator@EXAMPLE_DOMAIN +password VC_ADMIN_PASSWORDBACKUP_LOCATION_DIRECTORY will be the path to the directory on the backup server for the backup to be saved to.BACKUP_LOCATION_USER will be the username configured for access to the backup server.BACKUP_LOCATION_USER_PASSWORD will be the password for the user configured for access to the backup server.administrator@EXAMPLE_DOMAIN will be a vCenter server administrator account needed to run dcli commands. The default user of [email protected] can be used for this. VC_ADMIN_PASSWORD will be the password for the vCenter server administrator account needed to run dcli commands.start_time: YYYY-MM-DDThh:mm:ssZ
end_time:
messages:
- args:
default_message: Backup job started.
id: com.vmware.applmgmt.backup.started
progress: 0
id: 20240725-125749-#######
state: INPROGRESS
Take note of the backup job ID, in this case it is:
20240725-125749-#######
dcli com vmware appliance recovery backup job get --id 20240725-125749-####### +username administrator@EXAMPLE_DOMAIN +password VC_ADMIN_PASSWORDadministrator@EXAMPLE_DOMAIN will be a vCenter server administrator account needed to run dcli commands. The default user of [email protected] can be used for this. VC_ADMIN_PASSWORD will be the password for the vCenter server administrator account needed to run dcli commands.To get a report on all backup jobs the following command can be used:dcli com vmware appliance recovery backup job details list +username administrator@EXAMPLE_DOMAIN +password VC_ADMIN_PASSWORD
administrator@EXAMPLE_DOMAIN will be a vCenter server administrator account needed to run dcli commands. The default user of [email protected] can be used for this. VC_ADMIN_PASSWORD will be the password for the vCenter server administrator account needed to run dcli commands.