Chat now with support
Chat mit Support

LiteSpeed for SQL Server 8.9.8 - Integration with TSM Guide

Recast Litespeed Backups

The SLSRecast utility (slsrecast.exe) allows you to convert one LiteSpeed backup into another LiteSpeed backup through the command line, optionally changing encryption, compression, retention and other settings. Also, using this utility you can create disk stripe files, append several backups to one file, convert TSM objects to disk backups to restore on another machine. For more information, see Examples.

This topic covers:

Syntax

SLSRecast.exe ( -? | <source_options> <target_options> <other_options> )

Source Options:

-E|--SrcBackupFiles <path>
[-N|--SrcBackupIndex <file_number> ]
[-P|--SrcKey <password> ]

Target Options:

-F|--TgtBackupFiles <path>
[-K|--TgtKey <password> ]
[-I|--Overwrite 0 or 1 ]
[(-C|--CompressionLevel 0...8 )|--AdaptiveCompression (Speed|Size)]
[-e|--EncryptionLevel 0...8 ]
[-y|--Expiration <time> ]
[-r|--RetainDays <number> ]
[-J|--DoubleClick]
[(-M|--OLRMap)
[--TempDirectory <path>] ]

Other Options:

[ -A|--Affinity <affinity_mask> ]
[ -p|--Priority -1...2 ]
[ -h|--Throttle 1...100 ]

[ -b|--BlockSize ]

[ -X|--IOFlags ]

Tape Options:

[-m|--TapeFormat 0...3}
[-w|--TapeRewind ]
[-u|--TapeUnload ]

TSM Options:

[-c|--TSMClientNode <node_name> ]
[-k|--TSMClientOwnerPwd <password> ]
[-j|--TSMConfigFile <path> ]
[-z|--TSMMgmtClass <class> ]
[ --TSMPointInTime]
[ --TSMDeviceTimeoutMinutes <number> ]
[ --TSMarchive ]
[ --TSMdsmi_dir <path> ]
[ --TSMdsmi_log <path> ]
[ --TSMLogname <name> ]

Arguments

NOTES:

  • Single-letter arguments are case-sensitive, and they can be preceded by a figure dash '-' or '/'.
  • Verbose multi-letter arguments are not case-sensitive, they must be preceded by double dashes '--'.

-Argument

--Argument

Description

(none) --AdaptiveCompression

Automatically selects the optimal compression level based on CPU usage or Disk IO. For more information, see Compression Methods.

You can tell Adaptive Compression to optimize backups either for size or for speed. This argument accepts one of the following values:

  • Size
  • Speed

-A

--Affinity

Processor affinity designates specific processors to run LiteSpeed, while not allowing LiteSpeed to run on the remaining processors.

This argument accepts decimal values and hexadecimal values. If a value begins with "0x" it is interpreted as hexadecimal. A positive 64-bit integer value translates to a binary mask where a value of 1 designates the corresponding processor to be able to run the LiteSpeed process.

NOTE: 32-bit Windows is internally limited to a 32-bit mask.

For example, you need to select processors 2, 3, and 6 for use with LiteSpeed. Number the bits from the right to left. The rightmost bit represents the first processor. Set the second, third, and sixth bits to 1 and all other bits to 0. The result is binary 100110, which is decimal 38 or hexadecimal 0x26. Review the following for additional information:

Decimal Value

Binary Bit Mask

Allow LiteSpeed Threads on Processors

0 0 All (default)

1

1

1

3

11

1 and 2

7 111 1, 2 and 3

38

100110

2, 3, and 6

205 11001101 1, 3, 4, 7, and 8

Tip: Before you start tuning the CPU Throttle or Affinity parameters to adjust backup performance, try limiting the number of threads. If you decide to use an affinity value other than default, it is recommended that you limit the threading as well. You may also want to consider using Adaptive Compression to maintain backup performance. For more information, see Adaptive Compression.

-O

--BaseSize

The smallest chunk of memory LiteSpeed attempts to write to disk at any given time.

-b

--BlockSize

Specifies the physical block size, in bytes. Supported values are: 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (Default).

-C

--CompressionLevel

Specifies the compression level for the backup. Valid values are 0 through 8. 0 bypasses the compression routines. The remaining values of 1 through 8 specify compression with increasingly aggressive computation. 2 is the default value for disk backups and 7 is the default value for cloud backups.

When choosing a compression level, it is best to try various options using your equipment and data to determine the best option for your environment. Use the Backup Analyzer to test the performance of different compression levels. For more information, see Test Optimal Backup Settings.

NOTE: If both the compression level and Adaptive Compression option are passed in, LiteSpeed will not error out and will select and use Adaptive Compression.

-J

--DoubleClick

Creates a Double Click Restore executable. This argument accepts one of the following values:

  • 1—Creates one Double-Click Restore executable file. Note the following warning: The executable may be greater than 4GB for large databases. Windows Server is unable to run executable files larger than 4GB. However, the file will be convertible/restorable by LiteSpeed file.
  • 2—Creates a Double Click Restore loader in the same location. (Default)

For more information, see Double Click Restore Executables.

-e

--EncryptionLevel

Specifies encryption level. Works in conjunction with the Key (K) parameter. This argument accepts one of the following values:

  • 0—40-bit RC2

  • 1—56 bit RC2

  • 2—112 bit RC2

  • 3—128 bit RC2

  • 4—168 bit 3DES

  • 5—128 bit RC4

  • 6—128 bit AES

  • 7—192 bit AES

  • 8—256 bit AES

  • 9—MS_AES_128

  • 10—MS_AES_192

  • 11—MS_AES_256

-y

--Expiration

Specifies the date and time when the backup expires. LiteSpeed will not overwrite this file until expiration datetime is passed. This argument accepts one of the following formats:

  • yyyy-mm-dd
  • yyyy-mm-dd hh:mm:ss
-X --IOFlags

Specifies if LiteSpeed should wait and retry the read or write operation on failure. You can define retry options using the following parameters:

  • DISK_RETRY_COUNT—Specifies the number of times that a specific operation will be retried on failure. The default is 4 retries, the maximum allowed setting is 1000.
  • DISK_RETRY_WAIT—Specifies the number of seconds to wait immediately following a failure before retrying. The default is 15 seconds, the maximum allowed setting is 300.

NOTE: This functionality is only available for disk and cloud operations.

For more information, see Network Resilience.

-L

--LogLevel

Creates a log file. This argument accepts one of the following values:

  • 0—Logging off.

  • 1 or any odd value—Logging on. Log file is removed on success.

  • 2 or any even value—Logging on.

The default output directory is C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\Logs (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs) (or C:\ProgramData\Quest Software\LiteSpeed\SQL Server\Logs). To log to a different directory run this utility with the following argument: --trace logpath = "path".

For more information, see Configure Logging in LiteSpeed.

-M

--OLRMap

Generates a map file during a backup for Object Level Recovery. This argument accepts one of the following values:

  • 0—False (default)
  • 1—True

-I

--Overwrite

Re-initializes (overwrites and replaces) the target backup files. For TSM backups, this will create the TSM object and version the backup based on the retention policy. The argument accept the values:

  • 0 (appends the backup to an existing backup file)
  • 1 (overwrite the existing target backup file)

-p

--Priority

Specifies the priority of the LiteSpeed process compared to other processes running on the same server. This argument accepts one of the following values:

  • 0—Normal (Default)

  • 1—AboveNormal

  • 2—High

-r

--RetainDays

Specifies a number of days to retain the backup. LiteSpeed will not overwrite this file for this number of days. 

-?

--ShowHelp

Displays the syntax summary of the LiteSpeed command-line utility.

-E

--SrcBackupFiles

Location and name of the source backup/restore file device(s). You can also specify a UNC path.

For TSM backups and TSM archives, this argument accepts the following formats:

  • tsmbkp:<filespace>\<high>\<low>
  • tsmarc:<filespace>\<high>\<low>

For more information, see Examples.

Tip: Multiple -E parameters are used for stripe files (Example 2). Converting multiple files to a single file is accomplished by running the commands more than once (Example 3).

-N

--SrcBackupIndex

Specifies the particular backup to use when recasting, restoring, extracting or reading from files with multiple appended backups. You can run xp_restore_headeronly to query the files contained within the backup set given by backup_file_name.

-P

--SrcKey

Password/key used to decrypt backup. Passwords are case-sensitive.

-m

--TapeFormat

Initializes the media on the device. This argument only applies to tape backups. This argument accepts one of the following values:

  • 0—Do not format (default)

  • 1—Write new header

  • 2—Long erase / write new header

  • 3—Low level controller format / write new header

NOTE: Any successful format operation (values 1, 2, and 3; not all are available to all drive types) lays down a LiteSpeed tape header that will identify this tape as containing LiteSpeed backups. Using @init=1 (or -I in the command line) will not lay down a tape header.

-w

--TapeRewind

Applies only to backing up and restoring tape. This argument accepts one of the following values:

  • 0—Leave the tape unwound (default)

  • 1—Rewind the tape after writing/reading

-u

--TapeUnload

Applies to tape backups and restores. This argument accepts one of the following values:

  • 0—Keep tape loaded (default)

  • 1—Unload and eject tape from the drive after operation

(none) --TempDirectory

Specifies a temporary directory for use with Object Level Recovery. Use this argument when the default Windows temp directory does not have enough free disk space for the restore process.

NOTE: You can specify the default temp directory using the TempPath parameter in the [LiteSpeed] section of the LiteSpeedSettings.ini file. (Usually, C:\Documents and Settings\All Users\Application Data\Quest Software\LiteSpeed\SQL Server\LiteSpeedSettings.ini.)

-F

--TgtBackupFiles

Location and name of the target backup/restore file device(s). You can supply multiple instances of this argument.

Examples:

UNC Path: \\servername\share\path\filename

Local path: c:\filedirectory\filename 

NOTE: You cannot use the same location for the source and target files if you want to recast files with the same names.

-K --TgtKey Password/key used to encrypt new backup.

-h

--Throttle

Specifies the maximum CPU usage allowed. The argument accepts an integer value between 1 and 100. The default value is 100. This is the percentage of the total amount of CPU usage (across all enabled processors) available.

TIP: Before you start tuning the CPU Throttle or Affinity parameters to adjust backup performance, try limiting the number of threads. If you decide to use an affinity value other than default, it is recommended that you limit the threading as well. You may also want to consider using Adaptive Compression to maintain backup performance. For more information, see Adaptive Compression.

(none) --TSMAdminName Specifies the TSM administrative user name that has client authority for the TSM node. Some operations may require an administrative user with client owner authority to be specified in order to open a TSM session. The correct username and password may be obtained from the TSM administrator.
(none) --TSMOptions Specifies the options that are used during the TSM session.
(none) --TSMAdminPwd Specifies the plain text password of the administrative user which is used to log in to the TSM server and start the TSM session.
(none) --TSMarchive Specifies to store the backup as a TSM archive. This argument accepts one of the following values:
-c --TSMClientNode

Specifies the TSM server LiteSpeed connects to during backups and restores. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-k --TSMClientOwnerPwd

Specifies the TSM client owner user password. Not required, if specified in the options file or if backing up with the Passwordaccess Generate option.

-j --TSMConfigFile Specifies the TSM configuration file.
(none) --TSMDeviceTimeoutMinutes Maximum wait time to acquire TSM device.
(none)

--TSMdsmi_dir

DSMI_DIR path if needed.

(none)

--TSMdsmi_log

DSMI_LOG path.

-i

--TSMFile

Defines the TSM filespace, high level and low level. This argument accepts the following format:

tsm_filespace\tsm_high_level\tsm_low_level

where:

  • tsm_filespace - is the logical space on the TSM server that contains a group of files. It can be the drive label name or UNC name.

  • tsm_high_level - specifies the directory path in which the file belongs.

  • tsm_low_level - specifies the actual name of the file.

NOTE: You may only store one item at the location specified by this argument. It is not possible to append an object to this location. You can use the -I command-line argument or @init to back up to a non-unique location.

(none) --TSMLogname

Log name.

-z --TSMMgmtClass

Specifies the TSM management class. If not specified, LiteSpeed uses the default management class.

(none) --TSMPointInTime

Specifies the date for restore/to filter results. If it is not passed, LiteSpeed will choose the most recent archived backup. The format is yyyy-mm-dd hh:mm:ss.

NOTE: If the backup was a striped backup and the point-in-times of the various striped files are different (rare but can be different a second or so), then the most recent of the times must be chosen.

Examples

  1. Convert a backup to a Double Click Restore executable:

    Slsrecast.exe -E 1.bkp --DoubleClick 2 -F new

  2. Convert a 4-striped backup to a single file:

    Slsrecast.exe -E 1.bkp 2.bkp 3.bkp 4.bkp -F new.bkp

  3. Convert a full, diff, and 2 t-log backups to a single appended file:

    Slsrecast.exe -E full.bkp -F new.bkp
    Slsrecast.exe -E diff.bkp -F new.bkp
    Slsrecast.exe -E tlog.bkp -F new.bkp
    Slsrecast.exe -E tlog.bkp -F new.bkp

  4. Change compression, remove the encryption, add an OLRMap file:

    Slsrecast.exe -E full.bkp -P password -F new.bkp -C 5 -M

  5. Recompress a backup at the highest compression level for archival:

    Slsrecast.exe -E old.bkp -F new.bkp -C 8

  6. Encrypt a backup:

    Slsrecast.exe -E old.bkp -F new.bkp -e 6 -K password

  7. Convert a TSM backup to a disk backup and convert to a Double Click Restore executable:

    Slsrecast -j c:\dsm.opt -E tsmbkp:test\test\test -c nodename -k password -F"D:\test.exe" -J2

  8. Stripe a TSM backup to 3 disk files:

    Slsrecast.exe -j tsmconfig.opt -E tsmbkp:fs\highlevel\lowlevel -F new1.bkp new2.bkp new3.bkp

Returns

0 (success) or 1 (failure)

 

Related Topic

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen