Wait! What! 3!?!?! Yes, you read correctly! While in the days of vCenter 5.0 and below we only had to worry about 1 database, the release of 5.1 has tripled that! This is something I hadn’t even thought about until recently attending a vBrownbag put on by Justin King (@vcenterGuy).
So there’s the SQL database from vCenter right – ok – no big, I know about that one and am backing it up – KB article on how to do that.
Then there is the SSO database – no problem, I knew about that one as well since I had to create it when I first upgraded to 5.1. Again it’s a MS SQL DB, doesn’t change that much – which is easy enough to backup…
But then Justin started talking about the Inventory service – remember, that’s the third requirement you had to install when upgrading. Well guess what? It has a database too! It’s not SQL at all – it’s sitting on your vCenter Server in xDB format. My first thought was what is even in this database – I can’t browse it like I can the SQL databases (or I just don’t know how to). What I can gather from the What’s New docs and VMworld presentations the Inventory database holds things such as a read cache of all the objects that are accessed within the vSphere Web Client and all of your tags and categories that are setup from vCenter. I’m sure there’s more but this is all I can find.
However back to my main objective, how do I back this thing up? A little digging around and I found this KB article on how to backup/restore your vCenter Inventory database. Basically it’s as follows.
Backing up the inventory database (WINDOWS)
- Navigate to the Inventory scripts folder (c:\Program Files\VMware\Infrastructure\Inventory Service\scripts)
- Run the following
- backup.bat -file backup_filename
Restoring the inventory database (WINDOWS)
- Navigate to the Inventory scripts folder (c:\Program Files\VMware\Infrastructure\Inventory Service\scripts)
- Run the following
- restore -backup backup_filename
So utterly simple yet so not talked about 🙂 Wait – but what if I’m using the vCSA? Am I out of luck? Absolutely not! Use the following…
Backing up the inventory database (Linux)
- Navigate to the Inventory scripts folder (/usr/lib/vmware-vpx/inventoryservice/scripts/)
- Run the following
- ./backup.sh -file backup_filename
Restoring the inventory database (Linux)
- Navigate to the Inventory scripts folder (/usr/lib/vmware-vpx/inventoryservice/scripts/)
- Run the following
- ./restore.sh -backup backup_filename
So there you go! You can now sleep at night knowing you aren’t going to lose all of your hard work setting up those tags! Moral of the story – Pay attention and participate in the vBrownBags – there is always some great information and learning to be had.
1 thought on “Backing up your vCenter DB – all three of’em”