Skip to main content
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, publish, distribute, sublicense, and / or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, EITHER IN FACT OR BY OPERATION OF LAW, STATUTORY OR OTHERWISE,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, LACK OF VIRUSES OR THAT THE
SOFTWARE WILL OPERATE UNINTERRUPTED OR ERROR FREE.

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR COSTS
OF PROCUREMENT OF SUBSTITUTE PRODUCTS, LOST PROFITS, LOSS OF INFORMATION
OR DATA OR ANY OTHER SPECIAL, INCIDENTAL, PUNITIVE, INDIRECT OR CONSEQUENTIAL
DAMAGES WHATSOEVER OR FOR DEATH, PERSONAL INJURY OR DAMAGE TO PHYSICAL PROPERTY
OR ENVIRONMENTAL DAMAGES, REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT,
TORT(INCLUDING NEGLIGENCE) OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

THE FOREGOING LIMITATIONS APPLY REGARDLESS OF WHETHER THE AUTHORS OR COPYRIGHT
HOLDERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

FOR GOOD AND VALUABLE CONSIDERATION, THE SUFFICIENCY OF WHICH IS
ACKNOWLEDGED, ANY PERSON OBTAINING THE SOFTWARE COVENANTS NOT TO
COMMENCE OR MAINTAIN ANY SUIT OR ACTION, IN LAW OR IN EQUITY,
AGAINST THE AUTHORS OR COPYRIGHT HOLDERS AT ANY TIME..

IN THE EVENT SUCH PERSON BREACHES THE AFOREMENTIONED COVENANT,
THE LICENSE GRANTED HEREUNDER TO SUCH PERSON, AS WELL AS ANY LICENSES
TO ANY PERSONS TO WHOM THE SOFTWARE IS FURNISHED, SHALL IMMEDIATELY
TERMINATE AND SUCH PERSON(S) SHALL IMMEDIATELY CEASE USE OF,
AND SHALL DELETE ALL COPIES OF, THE SOFTWARE.

IF ANY OF THESE PROVISIONS OR ANY APPLICATION THEREOF SHALL BE FINALLY
DECLARED BY A COURT OF COMPETENT JURISDICTION TO BE INVALID, ILLEGAL OR
UNENFORCEABLE IN ANY RESPECT, THE VALIDITY, LEGALITY AND ENFORCEABILITY
OF THE REMAINING PROVISIONS OR ANY APPLICATION THEREOF SHALL NOT IN ANY
WAY BE AFFECTED OR IMPAIRED, EXCEPT THAT, IN SUCH EVENT, THE PROVISIONS
SHALL BE DEEMED REVISED IN ORDER TO PROVIDE THE AUTHORS OR COPYRIGHT HOLDERS
WITH THE BENEFIT OF ITS EXPECTATION TO THE MAXIMUM EXTENT LEGALLY PERMITTED.

Description-Content-Type: UNKNOWN
Description: CVPySDK
=======

CVPySDK is a Python Package for Commvault Software.

CVPySDK uses Commvault REST API to perform operations on a Commcell via WebConsole.


Requirements
------------

- Python 2.7 or above
- `requests <https://pypi.python.org/pypi/requests/>`_ Python package
- `future <https://pypi.python.org/pypi/future>`_ Python package
- `xmltodict <https://pypi.python.org/pypi/xmltodict>`_ Python package
- Commvault Software v11 SP7 or later release with WebConsole installed


Installing CVPySDK
------------------

CVPySDK is available on GitHub `here <https://github.com/CommvaultEngg/cvpysdk>`_

It can be installed from source. After downloading, from within the ``cvpysdk`` directory, execute::

python setup.py install


Using CVPySDK
-------------

Login to Commcell:
>>> from cvpysdk.commcell import Commcell
>>> commcell = Commcell(webconsole_hostname, commcell_username, commcell_password)

Print all clients:
>>> print(commcell.clients)

Get a client:
>>> client = commcell.clients.get(client_name)

Get an agent:
>>> agent = client.agents.get(agent_name)

Get an instance:
>>> instance = agent.instances.get(instance_name)

Browsing content at instance level:
>>> paths, dictionary = instance.browse(path='c:\\', show_deleted=True)

Browsing content of a instance in a specific time range:
>>> paths, dictionary = instance.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in instance backup content:
>>> paths, dictionary = instance.find(file_name="*.csv")

Get a backupset:
>>> backupset = instance.backupsets.get(backupset_name)

Run backup for a backupset:
>>> job = backupset.backup()

Browsing content at backupset level:
>>> paths, dictionary = backupset.browse(path='c:\\', show_deleted=True)

Browsing content of a backupset in a specific time range:
>>> paths, dictionary = backupset.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in backupset backup content:
>>> paths, dictionary = backupset.find(file_name="*.csv")

Get a subclient:
>>> subclient = backupset.subclients.get(subclient_name)

Run backup for a subclient:
>>> job = subclient.backup(backup_level, incremental_backup, incremental_level)

Browsing content at subclient level:
>>> paths, dictionary = subclient.browse(path='c:\\', show_deleted=True)

Browsing content of a subclient in a specific time range:
>>> paths, dictionary = subclient.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in subclient backup content:
>>> paths, dictionary = subclient.find(file_name="*.txt")

Run restore in place job for a subclient:
>>> job = subclient.restore_in_place(paths, overwrite, restore_data_and_acl)

Run restore out of place job for a subclient:
>>> job = subclient.restore_out_of_place(client, destination_path, paths, overwrite, restore_data_and_acl)

Job Operations:
>>> job.pause() # Suspends the Job
>>> job.resume() # Resumes the Job
>>> job.kill() # Kills the Job
>>> job.status # Current Status the Job -- Completed / Pending / Failed / .... / etc.
>>> job.is_finished # Job finished or not -- True / False
>>> job.delay_reason # Job delay reason (if any)
>>> job.pending_reason # Job pending reason (if any)


Uninstalling
------------

On Windows, if CVPySDK was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "**Add/Remove Programs**" in the
Control Panel.

Alternatively, you can uninstall using the **pip** command::

pip uninstall cvpysdk


Subclient Support
-----------------

Subclient operations are currently supported for the following Agents:

#. File System

#. Virtual Server

#. Cloud Apps

#. SQL Server

#. NAS

#. SAP HANA

#. ORACLE

#. Sybase

#. SAP ORACLE


Documentation
-------------

To get started, please see the `full documentation for this library <https://commvaultengg.github.io/cvpysdk/>`_


Contribution Guidelines
-----------------------

#. We welcome all the enhancements from everyone although we request the developer to follow some guidelines while interacting with the ``CVPySDK`` codebase.

#. Before adding any enhancements/bug-fixes, we request you to open an Issue first.

#. The SDK team will go over the Issue and notify if it is required or already been worked on.

#. If the Issue is approved, the contributor can then make the changes to their fork and open a pull request.

Pull Requests
*************
- CVPySDK has 3 branches, namely:
- **master**
- **dev**
- **test**

- The contributor should *Fork* the **dev** branch, and make their changes on top of it, and open a *Pull Request*
- The **test** branch will Synced with the **dev** branch after every **n** commits, depending on the commit size
- The **master** branch will then be updated with the **test** branch, once everything is verified

**Note:** The SDK team will not accept any *Pull Requests* on the **master** branch

Coding Considerations
*********************

- All python code should be **PEP8** compliant.
- All changes should be consistent with the design of the SDK.
- The code should be formatted using **autopep8** with line-length set to **99** instead of default **79**.
- All changes and any new methods/classes should be properly documented.
- The doc strings should be of the same format as existing docs.

Code of Conduct
***************

Everyone interacting in the **CVPySDK** project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the
`PyPA Code of Conduct`_.

.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/


License
-------
**CVPySDK** and its contents are licensed under `Commvault License <https://raw.githubusercontent.com/CommvaultEngg/cvpysdk/master/LICENSE.txt>`_


About Commvault
---------------
.. image:: https://upload.wikimedia.org/wikipedia/en/thumb/1/12/Commvault_logo.png/150px-Commvault_logo.png
:align: center

|

`Commvault <https://www.commvault.com/>`_
(NASDAQ: CVLT) is a publicly traded data protection and information management software company headquartered in Tinton Falls, New Jersey.

It was formed in 1988 as a development group in Bell Labs, and later became a business unit of AT&T Network Systems. It was incorporated in 1996.

Commvault software assists organizations with data backup and recovery, cloud and infrastructure management, and retention and compliance.

Keywords: commvault,python,sdk,cv,simpana,commcell,cvlt,webconsole
Platform: UNKNOWN

Metadata

Release files for cvpysdk 11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvpysdk 11
File Size Uploaded Provenance Actions
cvpysdk-11.tar.gz 198.8 kB Without provenance Details for cvpysdk-11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cvpysdk 11
File Interpreter ABI Platform Actions
cvpysdk-11-py2.py3-none-any.whl Python 3, Python 2 none any Details for cvpysdk-11-py2.py3-none-any.whl

Total release size: 462.6 kB

Release files / cvpysdk-11.tar.gz

Download URL cvpysdk-11.tar.gz
Size 198.8 kB
Tags Source
SHA-256 checksum
How to use checksums
531a29ee0d5c52a6e30436a7e1b744427c65d244a4b93bb4355680a1c3533531
BLAKE2b-256 checksum
How to use checksums
79f64c7864b607e0e60cf1e3e19976a1aa64df4faf6f61d8d27a3c28bf652e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cvpysdk-11-py2.py3-none-any.whl

Download URL cvpysdk-11-py2.py3-none-any.whl
Size 263.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ea28bdf70e17c79885edb32b9631e9fb289d96f5bfcde9924ee9a4b5e03e33d0
BLAKE2b-256 checksum
How to use checksums
8a193a6c9eb36337f0dd0f2e50ac5c90f6f529d02ea7c58d4b0f88b484db4763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cvpysdk 11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

11 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page