Saving state of ESXi manually, without reboot

You can trigger a save using:

/sbin/backup.sh 0

Normally this is called in /sbin/shutdown.sh., but you can call it manually:

~ # /sbin/backup.sh 0
boot type: visor-thin
Saving current state in /bootbank
Clock updated.
Time: 13:49:53   Date: 10/08/2010   UTC

You can list the contents of the file thus:

~ # tar tvzf /bootbank/state.tgz
-rwx—— 0/0     18192 2010-10-08 13:01:00 local.tgz
~ # mkdir /tmp/a
~ # cd /tmp/a
/tmp/a # tar xvzf /bootbank/state.tgz
local.tgz
/tmp/a # tar tvzf local.tgz
-rw——- 0/0       459 2010-09-30 02:52:25 etc/dropbear/dropbear_dss_host_key
-rw——- 0/0       427 2010-09-30 02:52:24 etc/dropbear/dropbear_rsa_host_key
-rw-r–r-T 0/0      1969 2010-10-08 12:07:04 etc/opt/vmware/vpxa/vpxa.cfg
-rw——T 0/0       170 2010-10-08 11:33:39 etc/opt/vmware/fdm/compatlist
-rw——T 0/0       210 2010-10-08 11:33:39 etc/opt/vmware/fdm/clusterconfig
-rw——T 0/0       225 2010-10-08 11:33:39 etc/opt/vmware/fdm/hostlist
-rw-r–r– 0/0        61 2010-10-08 12:06:57 etc/security/access.conf
-rw-r–r-T 0/0       885 2010-10-07 17:50:51 etc/vmware/hostd/authorization.xml
-rw-r–r-T 0/0       239 2010-10-08 12:06:53 etc/vmware/hostd/hostsvc.xml
-rw-r–r-T 0/0       157 2010-10-08 12:07:35 etc/vmware/hostd/pools.xml
-rw-r–r-T 0/0       428 2010-10-08 12:07:35 etc/vmware/hostd/vmAutoStart.xml
-rw-r–r-T 0/0        13 2010-10-08 12:07:35 etc/vmware/hostd/vmInventory.xml
-r–r–r-T 0/0      2576 2010-10-07 17:51:54 etc/vmware/hostd/proxy.xml
-rw-r–r-T 0/0      1432 2010-09-30 02:52:27 etc/vmware/ssl/rui.crt
-r——– 0/0      1675 2010-09-30 02:52:27 etc/vmware/ssl/rui.key
-rw-r–r– 0/0       453 2010-10-07 17:51:05 etc/vmware/config
-rw-r–r-T 0/0     23040 2010-10-08 12:56:53 etc/vmware/dvsdata.db
-rw——- 0/0     34933 2010-10-08 12:07:36 etc/vmware/esx.conf
-rw-r–r-T 0/0       310 2010-10-08 13:00:53 etc/vmware/license.cfg
-rw-r–r-T 0/0        60 2010-09-30 02:52:34 etc/vmware/locker.conf
-rw-r–r-T 0/0       114 2010-09-30 02:52:56 etc/vmware/snmp.xml
-rw——- 0/0        29 2010-10-07 17:51:33 etc/vmware/vmware.lic
———- 0/0       101 2010-09-30 03:12:20 etc/group
-rw-r–r– 0/0       183 2010-09-30 03:07:16 etc/hosts
-rw-r–r-T 0/0       442 2010-10-08 12:06:43 etc/inetd.conf
-rw-r–r– 0/0       329 2010-10-08 11:33:41 etc/chkconfig.db
-rw-r–r-T 0/0       123 2010-09-30 18:00:15 etc/ntp.conf
-rw-r–r– 0/0       344 2010-10-07 17:50:48 etc/passwd
-rw——T 0/0       512 2010-10-08 12:06:42 etc/random-seed
-rw-r–r-T 0/0        45 2010-10-07 17:50:14 etc/resolv.conf
-rw-r–r-T 0/0        30 2010-09-30 02:52:36 etc/syslog.conf
-rw-r–r-T 0/0       856 2010-09-30 03:11:06 etc/dhclient-vmk0.leases
-rw——T 0/0       222 2010-10-07 17:50:48 etc/shadow
-rw-r–r-T 0/0         0 2010-05-19 00:15:07 etc/sfcb/repository/root/interop/cim_indicationhandlercimxml.idx
-rw-r–r-T 0/0         0 2010-05-19 00:15:07 etc/sfcb/repository/root/interop/cim_indicationfilter.idx
-rw-r–r-T 0/0         0 2010-05-19 00:15:07 etc/sfcb/repository/root/interop/cim_indicationsubscription.idx
-rw-r–r-T 0/0         0 2010-05-19 00:15:07 etc/sfcb/repository/root/interop/cim_listenerdestinationcimxml.idx

Advertisements

3 Responses to Saving state of ESXi manually, without reboot

  1. Hi,

    What would one benefit get from saving ESXi state?

  2. Awesome, thanks for explaining that 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: