21 febrero 2012

Como hacer backup de VMware ESXi con vicfg-cfgbackup

Para hacer backup de un host ESXi por consola, utilizaremos vicfg-cfgbackup y tambien nos servira para restaurarlo posteriormente.


Opciones del comando:




conn_options
Specifies the target server and authentication information if required. Run vicfg-cfgbackup --help for a list of all connection options.

--force | -f
Forces the restore of the configuration.

--help
Prints a help message for each command-specific and each connection option. Calling the script with no arguments or with --help has the same effect.

--load | -l
Restores configuration from onto the host.

--save | -s
Backs up the host configuration.
Include the number of the build that is running on the host that you are backing up in the backup filename. If you are running the vSphere CLI from vMA, the backup file is saved locally on vMA. Local storage for backup files is safe because vMA is stored in the /vmfs/volumes/ directory, which is separate from the ESXi image and configuration files.

--reset | -r
Resets the host to factory settings.

--quiet | -q
Performs all operations without prompting for confirmation.






Ejemplos:

Backup del host a un fichero en C:\backup.txt:
 vicfg-cfgbackup  -s C:\backup.txt

Reset del host, restaurar opciones por defecto (restore factory settings):
 vicfg-cfgbackup  -r

Restaurar una configuracion anteriormente salvada en C:\backup.txt
 vicfg-cfgbackup  -l C:\backup.txt

Restaurar la configuracion desde C:\backup.txt sin preguntar confirmacion al usuario:
 vicfg-cfgbackup  -l C:\backup.txt -q