Page tree

SQL Safe Backup provides you with a Command Line Interface (CLI) to automate its functions. The CLI commands allow you to make changes to your SQL Safe Backup configurations across multiple SQL Server instances in a few lines of text, saving you time.

About Command Line Interface (CLI)

A Command Line Interface (CLI) is a user interface that allows you to interact with the operating system. The interaction is performed through commands where you type an specific command and the operating system performs an action.

Make sure you are aware of proper command format for each action you want to perform.

SQL Safe Backup CLI Usage

The following commands help you automate your SQL Safe Backup functions:

SQLsafeCmd <action> [options]Perform an action.
SQLsafeCmd help <action>

Display detailed help for an action.

SQLsafeCmd -ArgsFile <filename>Perform the action defined within an argument file.


<action>A keyword that tells SQL Safe what to do.
<filename>Specifies the file that contains command line arguments.

When you use the SQLsafeCmd command, the following actions can be performed:

HelpDisplay detailed descriptions and available options.SQLsafeCmd help <action>


Backup a database.SQLsafeCmd help backup
RestoreRestore a database.SQLsafeCmd help restore
RestoreLastRestore the most recent full backup of a database from the specified directory.SQLsafeCmd help restorelast
InstantRestoreInstant Restore a database.SQLsafeCmd help instantrestore
VerifyVerify a database backup.SQLsafeCmd help verify
RestoreFileListOnlyList files for database in backup set.SQLsafeCmd help restorefilelistonly
RestoreHeaderOnlyList backup sets in an archive.SQLsafeCmd help restoreheaderonly

Browse TSM

Browse Tivoli Storage Management.SQLsafeCmd help browse TSM
Expire TSMExpire Tivoli Storage Management backup archives.SQLsafeCmd help expire TSM
Extract TSMExtract a file from Tivoli Storage Management.SQLsafeCmd help extract TSM
LicenseRegister a Backup Agent license.SQLsafeCmd help license
EncryptBackupPasswordEncrypt plain-text password for encrypted backups.SQLsafeCmd help encryptbackuppassword
EncryptRestorePasswordEncrypt plain-text password for encrypted restores.SQLsafeCmd help encryptrestorepassword
EncryptSqlPasswordEncrypt plain-text password for SQL Server logins.SQLsafeCmd help encryptsqlpassword
EncryptWindowsPasswordEncrypt plain-text password for Windows logins.SQLsafeCmd help encryptwindowspassword
InstallXspInstall SQL Server extended stored procedures for SQLsafe.SQLsafeCmd help installxsp
DeleteDelete backup archives older than the specified date.SQLsafeCmd help delete
LogShipBackupLog Shipping primary backup.SQLsafeCmd help logshipbackup
LogShipRestore         Log Shipping secondary restore.SQLsafeCmd help logshiprestore
ObjectLevelRecoveryRestore database objects.SQLsafeCmd help objectlevelrecovery
Create-PolicyCreate a new policy.SQLsafeCmd help create-policy
Edit-PolicyEdit existing policy.SQLsafeCmd help edit-policy
AddDatabaseDeploy new database for existing policy (LogShipping or Backup policy).SQLsafeCmd help adddatabase
Virtual DatabaseDisplay detailed descriptions and available options.SQLvdbCmd help

The examples in the above table provides you with commands to use in Command Prompt. Those commands will display detailed descriptions and available options for each action.

IDERA |  Products | Purchase | Support |  Community | Resources |  About Us | Legal