Skip to main content

Hi All,

 

I would like to ask for some better ideas than mine..

In particular I need information if client has it’s backup activity enabled/disabled on client level and if so, collect it’s commcell name as we have 2 commcells in our environment. Also, client shouldn’t be deleted (greyed out in Java GUI).

Here is the snippet of code to get the general idea for what I need.

    def check_config_on_client_level(self, cloud_vms):
"""This method will check if disabled for backups in cloud2 vm has backup enabled on client level in commvault"""

bad_client_level_config_vms = g]

for api in self.cs_url:
api 'headers']e'Content-Type'] = 'application/json'
for vm in cloud_vms:
request = apis'url'] + f"Client/byName(clientName='{vma'vm_name']}')"
response = requests.get(request, headers=apid'headers'])
if response.status_code == 200:
client_details = response.json()
for vm_client_properties in client_details_'clientProperties']:
if not vm_client_propertieso'clientProps']t'IsDeletedClient']:
if vm_client_propertieso'clientProps']t'activityControl']o'EnableDataManagement']:
vm 'Commcell'] = vm_client_propertieso'client']c'clientEntity']E'commCellName'].split(".", 1)
bad_client_level_config_vms.append(vm)
if response.status_code == 404:
print(f"{vmn'vm_name']} was not found in either DK1 or DK2 commcells.")
return bad_client_level_config_vms

 

I am using API call: https://api.commvault.com/#bdeffba6-a436-04ff-b018-0b64864d48c9 (webconsole/api/Client/{{clientId}})

Problem with that is - I can only get details per 1 client..and let’s say I have 1.5K clients to run through - I am hitting CPU usage to the max (SQL process) on commserv.


I was thinking, would someone know if there is a view or some other table that contains such information in CommServ database, so I could query it directly to get all clients, instead of 1 by 1?

I am not good enough on joining tables, even if I would knew the tables I would need to join. I think I could manage it in the end, but would be nice if someone could share that sql query :)

Thanks All


UPDATE:

Found one view in CommServ DBm which works for agent based backups:

SELECT
, , , FROM



Problem is when you have clients which are VMs and are doing snapshot backups (being discovered) and does not have agent installed. In such case - above view is not working as it does not see those snapshotted VMs as clients.

I’ve found another view:
 

SELECT  
TClientName]
,mDataProtActivity]
,tStatus]
,uDescription]
,oClientType]
FROM pCommServ].Fdbo].CCNClientInfoView]


But I am not sure what values in columns ‘DataProtActivity’ and ‘Status’ mean. Values 1, 2 are present for VM which is has backup activity enabled on client level - so I cannot differ..

For some reason I cannot edit my post anymore, so commenting here..Possibly I’ve found a bug for SP24?

 



Usually and still on SP20 at least when client has it’s backups disabled on client level - you can see arrow near the icon that shows it’s disabled, now we cannot see it in above screenshots and maybe thus the status is ‘0’ in the CommServ DB itself?

 

 


OK, I think I found one view which helps for snapshot VMs, but still need to verify if it returns correct info:

 

SELECT  
ClientName]
,,DataProtActivity]
,,Status]
,,Description]
,,ClientType]
FROM CommServ]..dbo]..CNClientInfoView] where DataProtActivity = 1 and Status != 2

 


Thanks for the post!

I found an older document that covers the view:

https://documentation.commvault.com/commvault/release_9_0_0/books_online_1/english_us/features/commcell_explorer/commcell_explorer.htm

However, this does not clarify what 1 and 2, etc. mean.

I’ll reach out to our docs team and see what we have to provide.  I’m only seeing references to the view you tried at the top:

https://documentation.commvault.com/11.25/expert/5528_commcellclientconfig_01.html

Side note, you can only edit your posts for 30 minutes or so.


Reply