SQL Safe includes a command line interface (CLI). The following table describes the CLI usage:
Usage | Description |
---|---|
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 SQLsafe what to do. |
<filename> | Specifies the file that contains command line arguments. |
When you use the SQLsafeCmd command, the following actions can be performed:
Actions | Description |
---|---|
Help | Display more detailed help. |
Backup | Backup a database. |
Restore | Restore a database. |
RestoreLast | Restore the most recent full backup of a database from the specified directory. |
InstantRestore | Instant Restore a database. |
Verify | Verify a database backup. |
RestoreFileListOnly | List files for database in backup set. |
RestoreHeaderOnly | List backup sets in an archive. |
Browse TSM | Browse Tivoli Storage Management. |
Expire TSM | Expire Tivoli Storage Management backup archives. |
Extract TSM | Extract a file from Tivoli Storage Management. |
License | Register a Backup Agent license. |
EncryptBackupPassword | Encrypt plain-text password for encrypted backups. |
EncryptRestorePassword | Encrypt plain-text password for encrypted restores. |
EncryptSqlPassword | Encrypt plain-text password for SQL Server logins. |
EncryptWindowsPassword | Encrypt plain-text password for Windows logins. |
InstallXsp | Install SQL Server extended stored procedures for SQLsafe. |
Delete | Delete backup archives older than the specified date. |
LogShipBackup | Log Shipping primary backup. |
LogShipRestore | Log Shipping secondary restore. |
ObjectLevelRecovery | Restore database objects. |
Create-Policy | Create a new policy. |
Edit-Policy | Edit existing policy. |
AddDatabase | Deploy new database for existing policy (LogShipping or Backup policy). |
BckDstType | Backup Destination. |
BackupFileType | Backup File Type. |
- Help
For detailed descriptions and available options, you can use: SQLsafecmd help <action>.
- Backup
To backup databases, you can use:
SQLsafeCmd Backup <db_name> [<db_name>] <backup_archive> [options]
SQLsafeCmd Backup <db_name> [<db_name>] TSM [options]
SQLsafeCmd Backup <db_name> [<db_name>] TRUNCATEONLY [options]
where:
For detailed descriptions and available options, see the CLI Help (SQLsafecmd help <action>
).