VMware Cloud Community
jimb0bmij
Contributor
Contributor

Backing up the ESX 3.5 Service Console configs.

I wish vmware would just come out and say. "That backing up the Service Console is not really needed". It is best practice to just do a new install. As my "bosses" just want a backup client on the esx host service console. Which I do not think is needed and is extra work and if the backup client wants to go south it will bring the host down with it.

I have this script. It backs up the config files of ESX host as well as the guest configs. But not the vmdk files of the guest itself. (and I don't want them).

What does any body think about this script I created??

script

This should be a cron job. Run as root.

#!/bin/bash

nameh=$(hostname)

cd /root/

vm-support -q

mv esx-*.tgz /vmfs/volumes/SANVol1/bh/$nameh.tgz

rm vm-support* -fr

rm old_cores -fr

You can leave the file on the san or use the script below to copy to your vcenter server.

C:\Program Files\VMware\VMware VI Remote CLI\Perl\apps\general>fileaccess.pl --operation get --filetype datastore --remotepath "bh/server.example.com.tgz" --datastorename SANvol1 --datacentername TEST --localpath "c:/server.example.com.tgz" --username vmscript --password 0bmij

mccann.jim@gmail.com

PS. Backup of the guest is done either via VCB or backup client installed in the guest.

PSS. Also the one reason I made this script was for missing Disk Descriptor File and going to a backup system to just get 1 file is a pain. Just have the tar file on your vcenter server. Open up the tar find your guest DDF and cut and paste or copy over it and get that guest back online. Plus it has all kinds of other good stuff in it.

Tags (2)
0 Kudos
5 Replies
depping
Leadership
Leadership

I work for the VMware Professional Services Organisation as a Senior Consultant does that count? If it does: Backing up and restoring VMware ESX is not needed. Scripted installations are: faster and easier. If and when a host dies it might not be smart to restore it, the problems that caused the failure can be reintroduced again.

Your script makes sense though Smiley Happy

Duncan

VMware Communities User Moderator

-


Blogging:

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
JoJoGabor
Expert
Expert

THe only time I've had a requirement for a client to backup the Serice Console was for a hosting company where each client was separated via a VLAN so each host had many port-groups sertup, so backing up the config files was required rather than recreating scores of port-groups.

0 Kudos
BUGCHK
Commander
Commander

I agree that scripted installation is a great thing,but it requires learning and testing before putting a server in production. So it will not help for existing servers with a lot of customizations. Here is a VMware knowledgebase article with some more info:

VMKB1000761 - ESX Server Configuration Backup and Restore procedure

http://www.vmware.com/kb/1000761

0 Kudos
petedr
Virtuoso
Virtuoso

We have found as well that the scripted install is the easiest and best way for recovering a esx host. Usually saving a copy a of /etc is a good idea but only for a reference point if needed.

www.phdvirtual.com, makers of esXpress

www.thevirtualheadline.com www.liquidwarelabs.com
0 Kudos
damiankarlson
Enthusiast
Enthusiast

Why not just write a shell script that recreates the port groups from scratch?

Twitter: @sixfootdad Blog: damiankarlson.com Podcast: professionalvmware.com/brownbags
0 Kudos