Monday, October 14, 2013

Back Up & restore the vSphere 5.5 Inventory Service Database

Backup an Inventory Service Database Backup on Windows
You should back up the Inventory Service database as part of your regular vCenter Server database
administration.
To move the Inventory Service database to a different host machine, back up the database on the source
machine and restore the database on the destination machine. Your vCenter Server database administration
should also include regular backups of your vCenter Server database. See the vendor documentation for
your vCenter server database type.

Prerequisites
n Consult your database administrator about backing up and restoring databases.
n Verify that you have system administrator privileges to perform backup or restore operations.


Procedure
1 On the source machine, stop the Inventory Service.
a From the Windows Administrative Tools control panel, select Services.
b Right-click VMware vCenter Inventory Service and select Stop.
The Status changes from Started to blank.
2 On the source machine, open the command prompt in the vCenter Server and change the directory to
vCenter_Server_installation_directory\Infrastructure\Inventory Service\scripts.
3 Run the following command at the prompt to back up the Inventory Service database.
backup.bat -file backup_file_name

When the backup operation finishes, the message Backup completed successfully appears.


Restore an Inventory Service Database Backup on Windows
You can restore a backup of your Inventory Service database for disaster recovery, after a vCenter Server
upgrade, or to move the database to a new machine.
The machine that you back up the database from is the source machine. The machine that you restore the
database to is the destination machine.

Prerequisites
n Consult your database administrator about backing up and restoring databases.
n Verify that you have system administrator privileges to perform backup or restore operations.

Procedure
1 On the destination machine, stop the Inventory Service.
a From the Windows Administrative Tools control panel, select Services.
b Right-click VMware vCenter Inventory Service and select Stop.
The Status changes from Started to blank.
2 On the destination machine, open the command prompt in the vCenter Server and change the directory
to vCenter Server install location\Infrastructure\Inventory Service\scripts.
3 Run the following command at the command prompt to restore the Inventory Service database.
restore -backup backup_file_name
When the restore operation finishes, the message The Restore completed successfully message
appears.

Back Up the Inventory Service Database on Linux

You should back up the Inventory Service database as part of your regular vCenter Server database
administration.
To move the Inventory Service database to a different host machine, back up the database on the source

machine and restore the database on the destination machine.

Prerequisites
n Consult your database administrator about backing up and restoring databases.
n Verify that you have system administrator privileges to perform backup or restore operations.

Procedure
1 On the source machine, open a console and run the service vmware-inventory service stop command
to stop the Inventory Service before you restore the Inventory Service database.
2 On the source machine, open a command prompt in the vCenter Server and change the directory
to /usr/lib/vmware-vpx/inventoryservice/scripts/.
3 Run the following command to back up the Inventory Service database.
./backup.sh -file backup_file_name
When the backup operation finishes, the message Backup completed successfully appears.

Restore an Inventory Service Database Backup on Linux
You can restore a backup of your Inventory Service database for disaster recovery, after a vCenter Server
upgrade, or to move the database to a new machine.
The machine that you back up the database from is the source machine. The machine that you restore the

database to is the destination machine.

Prerequisites
n Consult your database administrator about backing up and restoring databases.
n Verify that you have system administrator privileges to perform backup or restore operations.

Procedure
1 On the destination machine, open a console and run the service vmware-inventory service stop
command to stop the Inventory Service before you restore the Inventory Service database.
2 On the destination machine, open a command prompt in the vCenter Server and change the directory
to /usr/lib/vmware-vpx/inventoryservice/scripts/.
3 Run the following command at the prompt to restore the Inventory Service database.
./restore.sh -backup backup_file_name
When the restore operation finishes, the message The Restore completed successfully message
appears at the command prompt.

Reset the vCenter Inventory Service Database
If the vCenter Inventory Service Database is corrupted or otherwise inoperable, you can reset it. You should

also reset the vCenter Inventory Service Database if you reset the vCenter Server database.

CAUTION Resetting the vCenter Inventory Service Database can cause data loss. Perform this procedure only with VMware Technical Support.

Procedure
1 Stop the vCenter Inventory Service.
a From the Windows Administrative Tools control panel, select Services.
b Right-click VMware vCenter Inventory Service and select Stop.
2 Open a command prompt.
3 Delete the entire contents of the C:\Program Files\VMware\Infrastructure\Inventory_Service\data
directory.
If you installed vCenter Server in a different location from the default C:\Program Files\, adjust the
path accordingly.
4 Change directory to C:\Program Files\VMware\Infrastructure\Inventory_Service\scripts
If you installed vCenter Server in a different location from the default C:\Program Files\, adjust the
path accordingly.
5 Run the createDB.bat command, with no arguments, to reset the vCenter Inventory Service database.
6 Start the vCenter Inventory Service.
a From the Windows Administrative Tools control panel, select Services.
b Right-click VMware vCenter Inventory Service and select Start.
7 Change directory to C:\Program Files\VMware\Infrastructure\VirtualCenter Server\isregtool.
If you installed vCenter Server in a different location from the default C:\Program Files\, adjust the

path accordingly.
8 Run the register-is.bat command to update the stored configuration information of the Inventory
Service.
register-is.bat vCenter_Server_URL Inventory_Service_URL Lookup_Service_URL
Use the following example as a model.
register-is.bat https://machinename.corp.com:443/sdk https://machinename.corp.com:10443
https://machinename.corp.com:7444/lookupservice/sdk
In this example, 443, 10443, and 7444 are the default HTTPS port numbers for vCenter Server, Inventory
Service, and vCenter Single Sign On respectively. If you use custom ports, replace the port numbers in
the example with the port numbers you use.
9 Restart vCenter Server.
The vCenter Inventory Service database is reset.

No comments:

Post a Comment