Converse agora com nosso suporte
Chat com o suporte

LiteSpeed for SQL Server 8.9.8 - Security and Compliance 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.

create disk stripe files from LiteSpeedconvert a TSM backup/archive objects

TSM has the capability to migrate backup objects, such as for tape consolidation, into a tape library. Consider the case where you write to 2 stripes, and TSM at some later point consolidates both backups onto the single tape. LiteSpeed will never be able to restore (or extract) the backup. Since each stripe will open a session to access the objects, the second session will fail waiting on the tape which it can not get since the first stripe session has it.

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, an incoming 64-bit mask will be truncated to 32-bit.

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.

If you need to use the advanced tracing options, use the trace parameter instead.

(none) --LSECompatible

Produces a backup that is compatible for use with LiteSpeed Engine for SQL Server. The parameter can be used whenever a new backup file is created and should only be set when backups are needed for cross-compatibility between the products. This switch will force modifications to internal settings such as the thread count, striping model, and encryption levels. In some cases, performance may be degraded. The parameter is ignored when appending to a backup file created without the switch.

This argument accepts one of the following values:

  • 0—False (default)
  • 1—True

-x

--MaxTransferSize

Specifies the largest unit of transfer in bytes to be used between SQL Server and LiteSpeed. The possible values are multiples of 65536 bytes (64 KB) ranging up to 4,194,304 bytes (4 MB). The default is 1048576 (1 MB).

(none) --NoWrite

The argument is similar to the SQL Native Backup commands: backup database xxx to disk = 'NUL' or backup log xxx to disk = 'NUL'. When the backup is completed, it is not written to disk.

NOTES:

  • You need to supply a filename (-F). The MSDB history tables are updated with the filename specified, but the file will not get created and no IO is performed.
  • If compression or encryption parameters are specified, then the data will get compressed or encrypted before being thrown away.

-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. Equivalent to WITH INIT in native SQL Server backups. 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

Type: Integer

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. 

-S

--Server

Specifies the instance of Microsoft SQL Server to connect to. This argument accepts one of the following values:

  • server_name
  • server_name\instance_name

If no server is specified, the LiteSpeed command-line utility will connect to the default instance of SQL Server on the local computer.

-?

--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. A backup file can contain multiple backups. Each time you append a new backup, a sequential number is assigned to this backup within the backup file. 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

Type: Integer

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

Type: Integer

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

Type: Integer

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(to restore on another machine without TSM):

    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

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação