Difference between revisions of "How to backup ESXi server configuration"
(Created page with "Category:VMware How to backup ESXi server configuration to remote location or local. Local Backup Log in via tech suppory mode (local console or ssh). backup.sh 0 Remote b...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
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 | ||
+ | |||
+ | Using the 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 | ||
+ | |||
+ | 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 | ||
Local Backup | Local Backup | ||
− | Log in via tech | + | Log in via tech support mode (local console or ssh). |
backup.sh 0 | backup.sh 0 | ||
− | + | '''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 | ||
+ | |||
+ | Using the vSphere CLI for Windows: | ||
+ | vicfg-cfgbackup.pl --server=ESXi_host --username=root -l backup_file | ||
+ | |||
+ | Using the vSphere Power CLI: | ||
+ | Set-VMHost -VMHost ESXi_host -State 'Maintenance' | ||
+ | Set-VMHostFirmware -VMHost ESXi_host -Restore -SourcePath backup_file -HostUser username -HostPassword password | ||
+ | |||
+ | Using the ESXi Command Line: | ||
+ | (Use numeric 1 as force option to override the UUID mismatch.) | ||
+ | vim-cmd hostsvc/maintenance_mode_enter | ||
+ | vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz |
Latest revision as of 13:03, 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
Using the 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
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
Local Backup Log in via tech support mode (local console or ssh).
backup.sh 0
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
Using the vSphere CLI for Windows:
vicfg-cfgbackup.pl --server=ESXi_host --username=root -l backup_file
Using the vSphere Power CLI:
Set-VMHost -VMHost ESXi_host -State 'Maintenance' Set-VMHostFirmware -VMHost ESXi_host -Restore -SourcePath backup_file -HostUser username -HostPassword password
Using the ESXi Command Line: (Use numeric 1 as force option to override the UUID mismatch.)
vim-cmd hostsvc/maintenance_mode_enter vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz