Python SDK
Cvpysdk is a Python library available on GitHub that allows developers to interact with Commvault software products. It provides a way to manage CommCell operations using Python code by utilizing the software's REST APIs. This simplifies automation and scripting tasks for administrators working with Commvault backup and data management solutions.
You can find cvpysdk on GitHub
Get Started on Commvault Python SDK
1
Install using pip
pip install cvpysdk
2
Login To CommCell
from cvpysdk.commcell import Commcell
commcell = Commcell(webconsole_hostname, commcell_username, commcell_password)
3
Print all clients
print(commcell.clients)
4
Get instance
client = commcell.clients.get(client_name)
agent = client.agents.get(agent_name)
instance = agent.instances.get(instance_name)
5
Run backup for a backupset
backupset = instance.backupsets.get(backupset_name)
job = backupset.backup()
6
Get all jobs
jobs = commcell.job_controller.get_all_jobs()