6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
24 VMware, Inc.
Backing Up Configuration Data
Youcanbackupconfigurationdatabyrunningvicfg-cfgbackupwiththe-soption.
vicfg-cfgbackup <conn_options> -s /tmp/ESXi_181842_backup.txt
Forthebackupfilename,includethenumberofthebuildthatisrunningonthehostthatyouarebackingup.
IfyouarerunningvCLIonvMA,thebackupfileissavedlocallyonvMA.Backupfilescansafelybestored
locallybecausevirtualappliancesarestoredinthe/vmfs/volumes/<datastore>
directoryonthehost,
whichisseparatefromtheESXiimageandconfigurationfiles.
Restoring Configuration Data
Ifyouhavecreatedabackup,youcanlaterrestoreESXiconfigurationdata.Whenyourestoreconfiguration
data,thenumberofthebuildrunningonthehostmustbethesameasthenumberofthebuildthatwas
runningwhenyoucreatedthebackupfile.Tooverridethisrequirement,include
the-f (force)option.
To restore ESXi configuration data
1Poweroffallvirtualmachinesthatarerunningonthehostthatyouwanttorestore.
2LogintoahostonwhichvCLIisinstalled,orlogintovMA.
3Runvicfg-cfgbackupwiththe-lflagtoloadthehostconfigurationfromthespecifiedbackupfile.
Specify
oneoftheoptionslistedin“ConnectionOptionsforvCLIHostManagementCommands”on
page 18inplaceof<conn_options>.
Ifyourunthefollowingcommand,youarepromptedforconfirmation.
vicfg-cfgbackup <conn_options> -l /tmp/ESXi_181842_backup.tgz
Ifyourunthefollowingcommand,youarenotpromptedforconfirmation.
vicfg-cfgbackup <conn_options> -l /tmp/ESXi_181842_backup.tgz -q
Torestorethehosttofactorysettings,runvicfg-cfgbackupwiththe-roption:
vicfg-cfgbackup <conn_options> -r
Using vicfg-cfgbackup from vMA
Tobackupahostconfiguration,youcanrunvicfg-cfgbackupfromavMAinstance.ThevMAinstancecan
runonthetargethost(thehostthatyouarebackinguporrestoring),oronaremotehost.
Torestoreahostconfiguration,youmustrunvicfg-cfgbackup fromavMAinstancerunning
onaremote
host.Thehostmustbeinmaintenancemode,whichmeansallvirtualmachines(includingvMA)mustbe
suspendedonthetargethost.
Forexample,abackupoperationfortwoESXihosts(host1andhost2)withvMAdeployedonbothhostsworks
asfollows:
Tobackuponeofthehost’sconfiguration(host1orhost2),runvicfg-cfgbackupfromthevMA
appliancerunningoneitherhost1orhost2.Usethe--serveroptiontospecifythehostforwhichyou
wantbackupinformation.TheinformationisstoredonvMA.
Torestorethehost1configuration,runvicfg-cfgbackupfromthevMAappliancerunningonhost2.Use
the--serveroptiontopointtohost1torestoretheconfigurationtothathost.
Torestorethehost2configuration,runvicfg-cfgbackupfromthevMAappliancerunningonhost1.Use
the--serveroptiontopointtohost2torestoretheconfigurationtothathost.
Managing VMkernel Modules
Theesxcli system moduleandvicfg-modulecommandssupportsettingandretrievingVMkernelmodule
options.