JohnKrivich
Contributor
Contributor

Restore Custom Attributes?

Jump to solution

Author : Alyc Helms

URL : http:////docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.vcenterhost.doc/GUID-EC0F7308-96AE...

Topic Name : Edit a Custom Attribute in the vSphere Web Client

Publication Name : vCenter Server and Host Management

Product/Version : VMware vSphere/6.5

Question :

Is it possible to restore custom attributes that have been deleted?

0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal

Short answer is "no" since these are stored in vCenter's database. Same (unfortunate) situation with tags.

View solution in original post

0 Kudos
5 Replies
daphnissov
Immortal
Immortal

Short answer is "no" since these are stored in vCenter's database. Same (unfortunate) situation with tags.

0 Kudos
dsdavis08
Enthusiast
Enthusiast

I have not done much work with custom attributes; but from the the little I do know, I can tell you I've never encountered a method for restoring deleted custom attributes. There's always the option of restoring a backup of course. But I'm sure you've already thought of that.

0 Kudos
daphnissov
Immortal
Immortal

Unfortunately, that's an all-or-none proposition at this point in time. I'd love for a selective, granular restore capability of CAs or vSphere tags, so if anyone reading this has developed something like that it would be great to have. This is one of my big gripes with vSphere tags which also plagues CAs.

0 Kudos
IRIX201110141
Champion
Champion

IIRC the "tags" are more tight to the PSC (but not 100% sure) which makes it more worth compared to the vCenter DB.

We set/overide the custom attributes with Powershell. So with some work you can read all infos and store them localy in *.csv or some kind of serialized array, minimalistic DB or similar.  But out of the box there is nothing and in all the years i have never see  backup product which save these informations.

Regards,

Joerg

0 Kudos
daphnissov
Immortal
Immortal

They are but they both suffer the same fate if, for example, you remove a VM (or any other object) from inventory that had such metadata assigned and then re-add it. Once re-added, none of the CAs or Tags are present with no way to restore them. The one solution I've built is to do what you describe and have a PowerShell script or vRO workflow crawl across vCenter and store them into a file or resource element. It's ugly but it can possibly work with enough development time.

0 Kudos