Difference between revisions of "How to backup ESXi server configuration"

From Tech-Wiki
Jump to: navigation, search
Line 1: Line 1:
 
[[Category:VMware]]
 
[[Category:VMware]]
 
How to backup ESXi server configuration to remote location or local.
 
How to backup ESXi server configuration to remote location or local.
 +
 +
Using the vSphere CLI:
 +
vicfg-cfgbackup --server=ESXi_host --username=root -s output_file_name.tgz
 +
 +
 +
If you are using vSphere CLI for Windows:
 +
vicfg-cfgbackup.pl --server=ESXi_host_IP_address --username=root -s output_file_name.tgz
 +
 +
Using the vSphere PowerCLI
 +
Get-VMHostFirmware -VMHost ESXi_host -BackupConfiguration -DestinationPath output_directory
  
 
Local Backup
 
Local Backup
Line 6: Line 16:
 
  backup.sh 0
 
  backup.sh 0
  
Remote backup
+
Using the ESXi Command Line
From the vCli or vMA.
+
vim-cmd hostsvc/firmware/backup_config
esxcfg-cfgbackup --server xxx -s path
+
 
 +
Note: The command above 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'''
 +
Restoring the host configuration restores the state of the ESXi along with the vSphere standard switch networking configuration.
 +
 
 +
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 the -f option (force) to override the UUID mismatch.
 +
 
 +
Using the vSphere CLI
 +
vicfg-cfgbackup --server=ESXi_host --username=root -l backup_file
 +
 
 +
vSphere CLI for Windows:
 +
vicfg-cfgbackup.pl --server=ESXi_host --username=root -l backup_file

Revision as of 12:57, 15 September 2017

How to backup ESXi server configuration to remote location or local.

Using the vSphere CLI:

vicfg-cfgbackup --server=ESXi_host --username=root -s output_file_name.tgz


If you are using vSphere CLI for Windows:

vicfg-cfgbackup.pl --server=ESXi_host_IP_address --username=root -s output_file_name.tgz

Using the vSphere PowerCLI

Get-VMHostFirmware -VMHost ESXi_host -BackupConfiguration -DestinationPath output_directory

Local Backup Log in via tech support mode (local console or ssh).

backup.sh 0

Using the ESXi Command Line

vim-cmd hostsvc/firmware/backup_config 

Note: The command above 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 Restoring the host configuration restores the state of the ESXi along with the vSphere standard switch networking configuration.

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 the -f option (force) to override the UUID mismatch.

Using the vSphere CLI

vicfg-cfgbackup --server=ESXi_host --username=root -l backup_file

vSphere CLI for Windows:

vicfg-cfgbackup.pl --server=ESXi_host --username=root -l backup_file