Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To backup databases use the following commands:
  • SQLsafeCmdBackup SQLsafeCmd Backup <db_name> [<db_name>] <backup_archive> [options]
  • SQLsafeCmdBackup SQLsafeCmd Backup <db_name> [<db_name>] TSM [options]
  • SQLsafeCmdBackup SQLsafeCmd Backup <db_name> [<db_name>] TRUNCATEONLY [options]

...

The following advanced options help you perform backup operations:

OptionsDescription
-ArgsFile <filename>

The path to a file containing command-line arguments.

<filename> - specifies the file that contains the command line arguments.

-BackupFile <filename>

Specifies additional backup archive files to be used for striping backups.

<filename> - specifies the backup archive files.

 Note: use once for each additional stripe.

-Checksum

Instructs SQL Server to generate backup checksums during a backup, or verify backup checksums during a verify or restore.

Note: for SQL 2005 and later only.

-ContinueAfterError

Instructs SQL Server to continue the operation despite encountering errors such as invalid checksums.

Note: for SQL 2005 and later only.

-CopyOnly

Specifies that the backup does not affect the normal sequence of backups.

Note: for SQL 2005 and later only.

-DatabaseFilegroup <filegroup>

<filegroup> - the database logical filegroup.

Note: for file BackupType only.

-DatabaseFilename <filename>

<filename> - the database logical filename.

Note: for file BackupType only.

-Delete <n><time_period>

After a backup successfully completes, delete archives that are older than the specified amount of time.

<n> - amount of time.

 <time_period> - {minutes, hours, days, weeks, months}.

There must be NO SPACE between <n> and <time_period>.

E.g., -delete 2hours.

Note: if you use the space between <n> and <time_period>, the backup archive filename will be automatically generated with the following pattern:

<instancename>_<databasename>_<backuptype>_ <timestamp>.safe

where the <timestamp> is in UTC time and in the form of YYYYMMDDHHMM.

-DeleteMirror <n><time_period>

After a backup successfully completes, delete mirrors that are older than the specified amount of time.

<n> - amount of time.

<time_period> - {minutes, hours, days, weeks, months}.

There must be NO SPACE between <n> and <time_period>.

E.g., -deletemirror 2hours.

Note: if you use the space between <n> and <time_period>, the mirror filename will be automatically generated with the following pattern:

<instancename>_<databasename>_<backuptype>_<timestamp>.safe

where the <timestamp> is in UTC time and in the form of YYYYMMDDHHMM.

-FailOnMirrorError

To abort a backup if an error is encountered while writing to a mirror backup archive.

Note: the default behavior is to abort only if an error is encountered while writing to a 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>

<email_address> - an email address(es) to send the notification via SMTP.

Note: multiple addresses may be separated by spaces, semicolons, or commas.

-MaxTransferSizeSpecifies the largest unit of transfer in bytes to be used between SQL Safe and the backup media. The possible values are multiples of 65536 bytes (64 KB) ranging up to 4194304 bytes (4 MB). This parameter is used to enable compression on TDE enabled databases only when the MaxTransferSize value is set to 65537 or higher. If omitted, the MaxTransferSize will be taken from the 'Transfer Limit' value set in the SQL Safe agent properties.
-MirrorFile <filename>

Specifies additional backup archive files to be used for mirroring backups.

<filename> - specifies the backup archive files.

Note: 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

Instructs SQL Server to perform a partial backup, which includes the primary filegroup and any read/write secondary filegroups.

Note: SQL 2005 and later only.

-RecoveryMode <mode> [-UndoFile<filename>]

Specifies the mode in which to leave the database after the operation is completed.

<mode> - NoRecovery, Standby.

Note: for Standby mode an undo file may be specified with the -UndoFile option.

ReportTLog

For backup, 'Yes' reports Skipped T-Log backups against databases that are in simple mode with a SUCCESS status rather than SKIPPED.

-UndoFile <filename>

<filename> - specifies the ABSOLUTE path to the undo filename.

Note: for 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>

<number> - specifies the number of threads that should be used to distribute the backup process across multiple processors.

-VDB Off

Do not optimize for quick access by SQL virtual database.

-Verbose

Displays SQL Server result text for both successful and failed backups.

Note: by default, it displays for failed backups only.

Tivoli Storage Manager (TSM) Options

...