Skip to main content
Question

performing automatic SQL restores

  • December 9, 2025
  • 3 replies
  • 32 views

Forum|alt.badge.img+16

Hello,

 

 

What is the preferred method for performing automatic SQL restores?

 

  1. PowerShell (The latest PowerShell release is 0.3.4 on 2024-12-6) 2)
  2. CLI with an XLM file
  3. 3) Rest API

3 replies

Forum|alt.badge.img+5
  • Vaulter
  • December 10, 2025

Hi ​@Egor Skepko 
Good day!

The preferred method for performing automatic SQL restores in Commvault is to use the REST API.!--startfragment>

 

REST API is the preferred method for automatic SQL restores due to its flexibility, reliability, and integration capabilities.

CLI with XML is also reliable and suitable for environments where direct CommServe access is available.

PowerShell is less preferred due to known issues and limited support for advanced restore scenarios.

 

PowerShell

PowerShell can be used for automation, but there are known issues with point-in-time restores (PIT) via PowerShell, such as incorrect timestamps being set, which can cause restore failures.

 

CLI with XML File

The CLI method using qoperation execute with an XML file is reliable and widely supported, but it requires access to the CommServe and is less flexible for remote or cloud-based automation.

 

 

REST API

The REST API is the recommended and most flexible method for automation. It allows you to browse, initiate, and monitor SQL restore jobs programmatically from any environment that can make HTTP requests.

REST APIs are supported for SQL restores, including in-place, out-of-place, and point-in-time restores.

 

Refer

https://api.commvault.com/docs/SP40/api/cv/MSSQL_API/mssql-restores

!--endfragment>


Scott Moseman
Vaulter
Forum|alt.badge.img+22

I would always lead with REST API solutions first.

Thanks,
Scott
 


Forum|alt.badge.img+16
  • Author
  • Novice
  • December 12, 2025

@Scott Moseman and ​@Syed_S 

Thanks for the information, maybe one of you has an example of the script that I can run.