Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
SQL Safe provides you with CLI commands to help you manually perform a log shipping to your primary backup.

 

To perform a LogShipBackup use the following command:

  • SQLsafeCmd LogShipBackup [options]

 

Where the required [options] are:
Options
Descriptions
-BackupLocation <path>

<path> - the network path where backups will be stored.

-DatabaseName <name>

<name> - name of the primary database.

Common Options

The following options help you perform LogShipBackup operations:

Options
Descriptions
-BckDstType <type>

The backup destination type is used for the backup.

<type> - 0 {0, 1, 2, 3, or 4}.

-CompressionLevel <level>

The compression level used for the backup.

<level> - {ispeed, isize, 0, 1, 2, 3, or 4}.

Note: if the compression level is not specified, ispeed is the default.

-EncryptionType <type>

The type of encryption used to encrypt the backup.

<type> - AES128 or AES256 {AES128, AES256}.

-EncryptedBackupPassword <pwd><pwd> - the encrypted password used to encrypt the backup. (Used with EncryptionType).
-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, or 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> - it is in UTC time and in the form of YYYYMMDDHHMM.

-InstanceName <name>

<name> - SQL server instance name.

Note: it is not required if instance is the instance is set as a default instance on the target server.

Security Options

Secure your LogShipBackup operations with the following options:

Options
Description
-NoPromptNever prompt for credentials even if necessary.
-SecurityModel <model>

The security model used to log into SQL Server.

<model> - Integrated or SQL {Integrated, SQL}.

Note: Integrated (Windows authentication) is the default.

-SqlUsername <username><username> - the SQL Server username. (SQL SecurityModel).
-SqlPassword <pwd><pwd> - the SQL Server password. (SQL SecurityModel).
-EncryptedSqlPassword <pwd><pwd> - the encrypted SQL Server password generated by EncryptSqlPassword action. (SQL
SecurityModelSQLSecurityModel).
-WindowsUsername <domain\user><domain\user> - the Windows user that will be used to read/write the backup archive.
-WindowsPassword <pwd><pwd> - the password for the Windows user.
-EncryptedWindowsPassword <pwd><pwd> - the encrypted password for the Windows user generated by EncryptWindowsPassword action.

Advanced Options

The following advanced options help you perform LogShipBackup operations:

Options
Description
-MailTo <email_address>

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

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

-Threads<number>Threads <number>

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

-RetryWrites<interval> RetryWrites <interval> <retry_time> <total_time>

On a network file error, retry every certain amount of time. <interval> - retry from every certain amount of time in seconds.seconds for up to <retry_time> - retry up to certain amount of time in seconds. Total retry time allowed is <total_time> - total retry time allowed in minutes.

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

...

...