Skip to content

vSphere backup

May 4, 2017
tags:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042141

Backup:

powerCLI

Connect-VIServer -Server 192.168.2.19 -User root -Password whatever
Get-VMHostFirmware -VMHost 192.168.2.19 -BackupConfiguration -DestinationPath f:\zip

 


Backing up ESXi host configuration data

Using the ESXi Command Line

To synchronize the configuration changed with persistent storage, run this command:

vim-cmd hostsvc/firmware/sync_config

To backup the configuration data for an ESXi host, run this command:
vim-cmd hostsvc/firmware/backup_config
Note: The command should output a URL in which a web browser may be used to download the file. The backup file is located in the /scratch/downloads directory as configBundle-HostFQDN.tgz

Restoring ESXi host configuration data

Using the ESXi Command Line:

Note: When restoring configuration data, the build number of the host must match the build number of the host on backup file and UUID (can be obtained using the command  “esxcfg-info -u”) of the host should match the UUID of the host on backup file.
Use numeric 1 as force option to override the UUID mismatch.
Example: vim-cmd hostsvc/firmware/restore_config 1 /tmp/configBundle.tgz

  1. Put the host into maintenance mode by running the command:

    vim-cmd hostsvc/maintenance_mode_enter

  2. Copy the backup configuration file to a location accessible by the host and run the command:

    In this case, the configuration file was copied to the host’s /tmp directory. For more information, see Using SCP to copy files to or from an ESX host (1918).

vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
 
Note: Executing this command will initiate an automatic reboot of the host after command completion.
Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: