You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To backup databases type:

  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:

ActionDescription
<db_name>

One or more names of database(s) to backup. If a database name contains a space the database name should be surrounded with "double quotes". Special keywords may be used to backup multiple databases. These keywords are: {all}, {allsystem}, {alluser}.

<backup_archive>

Path to the backup archive.
Tsm

Use Tivoli Storage Manager (see below for special options)

TruncateOnly

Use this keyword to truncate the transaction log of the SQL Server database only.

Common Options:

  
BackupDescription <desc>The description of the backup.
BackupName <name>The name of the backup.
BackupType <type>

{Full | Differential | Log | File} The backup type required.

BckDstType <type>

{0 | 1 | 2 | 3 | 4} The backup destination type is used for the backup.

CompressionLevel <level>

{ispeed | isize | 0 | 1 | 2 | 3 | 4} The compression level used for the backup. If the compression level is not specified, ispeed is the default.

Exclude <db_name> [<db_name> ...]

One or more names of database(s) to not backup.

InstanceName <name>

SQL server instance name.  Not required if instance is the default instance on the target server.

NoTruncate

Don't truncate the transaction log (Log backup only)

Overwrite

Overwrite existing archive if one exists.  If this option is omitted, the default behavior is to append.

Server <hostname>

The host name of server hosting the SQL Server where the operation should be performed.  This option is required for accessing remote or clustered SQL Servers (where applicable).

Verify

Verify the backup set after backup is complete.

Encryption Options:

  

EncryptionType <type>

{AES128 | AES256} The type of encryption used to encrypt the backup.
Password <pwd>The non-encrypted password used to encrypt the backup.
EncryptedBackupPassword <pwd>The encrypted password used to encrypt the backup. (Used with EncryptionType)

Security Options:

  
NoPromptNever prompt for credentials even if necessary.
SecurityModel <model>{Integrated | SQL} The security model used to log into SQL Server. Integrated (Windows authentication) is the default.
SqlUsername <username>SQL Server username (SQL SecurityModel)
SqlPassword <pwd>SQL Server password (SQL SecurityModel)
EncryptedSqlPassword <pwd>Encrypted SQL Server password generated by EncryptSqlPassword action. (SQL
SecurityModel)
WindowsUsername <domain\user>The Windows user that will be used to read/write the backup archive.
WindowsPassword <pwd>The password for the Windows user.
EncryptedWindowsPassword <pwd>Encrypted password for the Windows user generated by EncryptWindowsPassword action.

Advanced Options:

  
ArgsFile <filename>

Path to a file containing command-line arguments.

BackupFile <filename>

Specifies additional backup archive files to be used for striping backups. Use once for each additional stripe.

Checksum

(SQL 2005 and later only) Instructs SQL Server to generate backup checksums during a
backup, or verify backup checksums during a verify or restore.

 ContinueAfterError

(SQL 2005 and later only) Instructs SQL Server to continue the operation despite encountering errors such as invalid checksums.

 

CopyOnly

(SQL 2005 and later only) Specifies that the backup not affect the normal sequence of backups.

DatabaseFileGroup <filegroup>

(File BackupType only) The database logical filegroup.

 DatabaseFilename <filename>

(File BackupType only) The database logical filename.

 Delete <n><time_period>

{Minutes | Hours | Days | Weeks | Months}

After a backup successfully completes, delete archives that are older than the specified amount of time. There must be NO SPACE between <n> and time_period>. E.g., -delete 2hours. If used, the backup archive filename will be automatically generated with the following pattern: <instancename>_<databasename>_<backuptype>_ <timestamp>.safe. The <timestamp> is in UTC time and is of the form YYYYMMDDHHMM.

DeleteMirror <n><time_period>

 {Minutes | Hours | Days | Weeks | Months}

After a backup successfully completes, delete mirrors that are older than the specified amount of time. There must be NO SPACE between <n> and <time_period>. E.g., -deletemirror 2hours. If used, the mirror filename will be automatically generated with the following pattern:<instancename>_<databasename>_<backuptype>_<timestamp>.safe. The <timestamp> is in UTC time and is of the form YYYYMMDDHHMM.

FailOnMirrorError

 Abort backup if an error is encountered while writing to a mirror backup archive. (Default behavior is to abort only if an error is encountered while writing to primary backup archive.)
 IncludeLogins For backup, includes the database logins in the backup file. For restore, creates the logins from the backup file on the destination server.
MailTo <email_address>Send a notification via SMTP to the specified e-mail address(es). Multiple addresses may be seperated by spaces, semicolons, or commas.
 MirrorFile <filename>

Specifiy additional backup archive files to be used for mirroring backups. Use once for each additional mirror. Up to two mirrors may be specified.

 NoSkip

Disables automatic skipping of databases that cannot be backed up, such as offline databases.

 NoStatus

Prevents status messages from being cached or sent to the Repository.

ReadWriteFileGroups

(SQL 2005 and later only) Instructs SQL Server to perform a partial backup, which includes the primary filegroup and any read-write secondary filegroups.

 RecoveryMode <mode> [-UndoFile <filename>]

{NoRecovery | Standby} Specifies the mode in which to leave the database after the operation is completed. For Standby mode an undo file may be specified with the -UndoFile option.

 -UndoFile <filename>

Specifies the ABSOLUTE path to the undo filename (Standby recovery mode only).

-RetryWrites <interval> <retry_time> <total_time>

On a network file error, retry every <interval> seconds for up to <retry_time> seconds. Total retry time
allowed is <total_time> minutes.

-Threads <number>

Specifies the number of threads that should used to distribute the backup process across
multiple processors.

VDB Off

Do not optimize for quick access by SQL virtual database.

Verbose

Display SQL Server result text for both successful and failed backups (default is to display only for failed backups).

Tivoli Storage Manager Options:

  
TsmClientOwnerName <name>The client owner name.
TsmClientOwnerPassword <pwd>The client owner password.
EncryptedTsmClientOwnerPassword <pwd>Encrypted TSM client owner password.
TsmConfigFile <filename>The configuration file location.
TsmHighLevel <name>The high level file specification (path).
TsmLowLevel <name>The low level file specification (file name).
TsmTcpServerAddress <address>The TCP/IP address for the TSM server.
TsmTcpPort <port>The TCP/IP port address for the TSM server
TsmManagementClass <name>The management class to which the backup file
will be bound.

For detailed descriptions and available options, see the CLI Help (SQLsafecmd help <action>).

SQL Safe is a high-performance backup and recovery solution for your SQL Servers. Learn more > >
  • No labels