LiteSpeed for SQL Server 8.6 - User Guide

About Backing Up/Restoring with LiteSpeed LiteSpeed User Interface Configure LiteSpeed for First Use Cloud Back Up Databases Automate Maintenance Tasks Restore Databases Restore Objects View Activity and History Use Command-Line Interface Use Extended Stored Procedures Troubleshoot LiteSpeed Review Additional Resources

Fast Compression

Fast Compression

Fast Compression technology also known as SmartDiff in previous LiteSpeed versions allows you to maximize space savings and reduce backup time considerably over nightly full backup routines by intelligently backing up only database changes rather than the entire database. Fast Compression automatically chooses to create a full or differential backup based on user-defined full backup intervals and the percentage of the database that has changed. By only backing up database changes, users will see a significant reduction in backup storage and backup time.


  • Fast Compression is not available for Tape and TSM Archive.
  • Fast Compression is only available with LiteSpeed 5.1 or later; Enterprise license.

By default, Fast Compression selects the differential backup after first full, if the amount of changes is less than 35%.

The following table shows how much disk space can be saved for nightly Fast Compression backups for a 100 GB database that changes 5% daily and uses a 35% data change threshold.


Native backup

LiteSpeed full backup

Fast Compression backup


100 GB

20 GB

20 GB (Full)


100 GB

20 GB

1 GB (Diff)


100 GB

20 GB

2 GB (Diff)


100 GB

20 GB

3 GB (Diff)


100 GB

20 GB

4 GB (Diff)


100 GB

20 GB

5 GB (Diff)


100 GB

20 GB

6 GB (Diff)


700 GB

140 GB

41 GB

Quick Start

To start do one of the following:

Tip: To create Fast Compression jobs or tasks on several instances, create and deploy a LiteSpeed backup template. For more information, see Create Backup Templates.

Backup Files and Folders

Fast Compression handles the naming of files automatically. Fast Compression backups have the following format:

  • Disk backup: database_name.litespeed.f#[.d#][.s#][.m#].bkp
  • TSM backup: file_space_name\database_name\litespeed.f#[.d#][.s#]


  • f# is full backup index
  • d# is diff backup index (if used)
  • s# is stripe index (if used)
  • m# is mirror index (if used)

NOTE: All indexes start at zero.

Disk Backup Folders

Since the database name is incorporated into the backup name, you can safely select the same directory for all databases on an instance. If striping, you can select several directories. Also, you can add directories to mirror the entire backup file to multiple locations.

It is recommended that you create a new folder to use for Fast Compression backups. If you decide to back up to a folder that already has database backups, Closedclick here. Fast Compression performs some validations to see if a full backup already exists:

  • If the last full backup was not performed by Fast Compression, but a valid, full backup exists in the designated Fast Compression folder, then Fast Compression uses it and begins the process with a differential backup, preventing the need to run an initial full backup on the database.
  • If the last full backup was not performed by Fast Compression and that full backup is either missing or has an LSN verification issue, Fast Compression starts off by executing a full backup.
  • If the last Full backup was performed by Fast Compression and is either missing or has an LSN verification issue, Fast Compression escalates to a full backup (if the escalate option is selected) or continues with a differential backup.

Disk Backup Files

Select whether you prefer to create a unique file for each backup or you prefer to manage a single file for each backup set (a backup set is composed of one full database backup plus all associated differential backups):

  • Separate backup files—(Default) Creates a unique file for each backup in the backup set. This option provides the convenience of having to move less data to tape or across the network when copying individual backup files. Using this option means that up to two physical files may be needed to restore the database (full backup plus the associated differential for the day in question).
  • Self-contained backup sets—Provides the convenience of only having to manage a single file per backup set. Only one file needs to be saved to or pulled from tape or copied from the backup location to a secondary location. If backing up more than one database, a file for each database will be created.

The Self-Contained Backup Sets option automatically verifies the Full backup exists. The Separate Backup Files option performs the same validation by default.

Note: For cloud backups only "Separate backup files" type is supported.

Full Backup Conditions

You can set the following thresholds to define when to issue a full backup:

  • Force a full backup every - The amount of time elapsed since the last full backup. The default is 14 days.
  • Data change threshold - The amount of database changes since the last full backup. The default is 35%.

Fast Compression measures the amount of data change by either querying SQL Server or by comparing the size of the last differential to the last full backup. The default option is to query actual data pages. It provides the most accurate way to determine the amount of data change. If the query fails for any reason, Fast Compression will automatically run a size comparison to the last Differential backup.

For example, set this parameter to 20%, and should the database change by 20% or more, Fast Compression will automatically run a Full backup. The larger the threshold, the larger the differential backups can grow before Fast Compression triggers the next Full backup.

Regardless of how much underlying database data has changed, when exceeding the maximum interval (in days) between full backups, Fast Compression will force a full backup.


  • Before a differential Fast Compression backup is available, the last full backup must have been created in the Fast Compression backup folder.
  • When backing up the master database as part of a Fast Compression maintenance plan or job, Fast Compression always executes a full backup.
  • The copy-only full backups cannot serve as a base for differential backups.

Select the Extension for backup files checkbox to enter or change the backup file name extension. The default is set to bkp.

NOTE: You can select the backup file extension for Fast Compression and make the new default, bak, for new items. For an existing item that does not have an extension defined, bkp is displayed when the item is edited (maintenance plans and templates).

Additionally, you can prevent full backups from occurring on specified days of the week. If you select to exclude specific days of the week from Full backups and Fast Compression is set to execute the first time on an excluded day, assuming no full backup exists that can be used as described above, Fast Compression will not execute a full backup. This will continue until Fast Compression runs on a day that is not excluded.

Backup Escalation

This option causes LiteSpeed to issue a full backup, if one of the following problems is discovered in the current backup set:

  • The full backup is missing.
  • A differential backup is missing from the backup set (excludes backups automatically removed after the specified retention period).
  • LSN verification fails in the backup set.
  • Verify operation fails on full or differential backup.

NOTE: If a problem is detected and a full backup is created through escalation, an error will be returned.

Full backup escalation is selected by default to maintain high recoverability level in the situations where recoverability may be limited (missing differential in set) or not available at all (missing full backup). This setting provides insurance against unanticipated errors. For example, if a backup file is missing from the backup set (someone accidentally deleted it), or there is some other type of issue like a Log Sequence Number (LSN) validation error or file corruption, you would not normally be able to restore the database. To correct for this potential issue with backups, Fast Compression automatically runs a full backup to put the database in a restorable state. Errors are still noted in the LiteSpeed UI Console and alerts will still be sent via the job.

If you uncheck this option and Fast Compression discovers an issue, you will have to correct the problem manually. If the physical file for the last full backup cannot be found, a differential backup may be executed successfully, but you will not be able to recover the database using these backups unless the correct full backup is located. Correction may require forcing a full backup using the @ForceFull parameter. xp_slsFastCompression Under normal operating conditions, you should not experience these types of issues as they are normally caused by accidental deletion of files or disk corruption, both of which occur very infrequently.

Backup Verification

TIP: "Cleanup" means SmartCleanup. For more information, refer to SmartCleanup.

Make sure the backup files in the backup set have integrity. This provides an added level of insurance the backup files can be restored. Verification failures appear in the LiteSpeed UI Console and, optionally, as job failure notifications. A verification failure after a differential backup will trigger the backup escalation process, if selected.

The Verification options include:

  • Do not verify backup (default).
  • Verify last backup.
  • Verify both the last full and latest differential backup.
  • Verify the last full and all associated differential backups.

The Cleanup options include:

  • Clean up full/differential backups older than 28 (default) days.
  • Clean up transaction logs older than 7 (default) days.

    Note: Clean up transaction log options are available if you set up a transaction log within the wizard (or template).

  • Do not delete if archive bit is set.


Cleanup provides a convenient way to remove old backups from disk without disrupting Fast Compression. Select this option to remove full and differential backup files and transaction log backups that are older than the specified time period.

The cleanup routine is backup set aware. This is important because the cleanup will never remove a full backup that is needed by a differential backup that is not being deleted. If you use the Separate Backup Files option in Fast Compression, you have the added flexibility of being able to remove differential backups from the active backup set that are no longer needed.

NOTE: Fast Compression does not raise errors if it detects a missing backup from a backup set that was removed via the cleanup process.

The backup retention will never delete:

  • The backup files, if there are mixed backups in the same backup file. For example, if a user performs a backup of AdventureWorks and Pubs into the same mybackups.bak backup file.
  • The full backup, if there are associated differential or t-log backups in the backup set that are not eligible for cleanup.

For more information, see SmartCleanup.

Backup Jobs

Completing the wizard will create the Fast Compression backup job. Using the Backup wizard, you can optionally schedule transaction log backups for the database. Transaction log backups are scheduled as a separate job from Fast Compression.


Related Topics

Was this topic helpful?

[Select Rating]

Compression Levels

Compression Methods

You can specify a compression level manually, or you can use Adaptive Compression to let LiteSpeed automatically select the optimal compression level. For more information, see Adaptive Compression.

Compression Levels

LiteSpeed offers the following compression levels that allow you to specify compression from least compression to most compression, with a corresponding CPU trade-off.

Compression Level Description
1 Medium Compression—for servers where minimal CPU utilization is preferred at the expense of some compression.
2 Medium-High Compression—a new highly optimized low CPU algorithm for environments where low CPU utilization is preferred but with improved compression over level 1.
3, 4, 5, 6 High Compression—for databases where balanced compressed backup size and CPU utilization is important.
7, 8

Extreme Compression—a new highly optimized extreme compression algorithm for databases where compressed size is very important with only a slight increase in CPU utilization over previous levels.

NOTE:Levels 9, 10 and 11 were deprecated in version 6.0 and are now automatically mapped to the new compression level 8.

Depending on your environment, the various algorithms will yield different results. When choosing a compression level, test various options to determine the best option for your environment. For more information, see Test Optimal Backup Settings.

Generally, the higher the compression ratio the higher the CPU utilization and potentially more compression. That is, the higher compression levels will look for longer patterns to compress, as well as perform more passes on the data.

The higher levels do not guarantee better compression ratios as the nature of the data dictates the final result. Therefore, some databases will get varying results as the level increases.

Additionally, if a higher level gets significantly better compression, it may actually perform faster than a lower level. Typically, the higher levels require more time for the backup.

NOTE: LiteSpeed supports backing up, restoring and shipping transaction logs of the databases encrypted with transparent data encryption (TDE). Since the database is encrypted with TDE, the LiteSpeed backup will not compress very well. If you want to compress the backup, you should choose compression level 1 to minimize CPU, since using a higher level of compression will only cause CPU to increase without any real benefit on the backup file size. If you choose compression level 0, LiteSpeed will not attempt to compress the backup. Review the following for additional information:

  • Its important to back up the database encryption key, because there is no way to recover the data without the key. LiteSpeed does not automatically export the encryption key. If needed, you can include the encrypted key file in the backup. For more information, see Back Up Databases.
  • To further protect the backup, you can use LiteSpeed Encryption with TDE databases to add a secondary layer or protection to the backup. For more information, see Encryption Methods.

Adaptive Compression

With Adaptive Compression you do not have to run the Backup Analyzer wizard to determine the best compression level for a database. LiteSpeed will dynamically change the compression level during a backup in order to optimize for speed or size, while maximizing use of available CPU. If the server workload changes during the backup (change in CPU or Disk IO), Adaptive Compression automatically switches compression to maintain optimal performance.

You can select to optimize backups either for size or for speed:

  • Optimize for speed—Backups complete in the least amount of time possible. Available CPU is leveraged to reduce backup size, but not at the expense of increased backup time. This is the default setting.
  • Optimize for size—Backups are completed with higher compression while managing overall backup time to ensure backups do not take a long time to complete (when compared to optimizing for speed). In this mode, LiteSpeed allows the backup to complete more slowly if the reduction in speed results in a smaller backup file. This mode is designed for databases where a smaller backup is desired but managing how long the backup takes to complete is important as well.

NOTE: Adaptive Compression is only available with LiteSpeed 6.5 or later; Enterprise license.


Was this topic helpful?

[Select Rating]


Encryption Methods

Encryption is a mechanism for protecting data, which applies to it a specially designed algorithm, effectively obfuscating its content by making it different from the original.

NOTE: If running Windows 2000 to utilize the higher levels of encryption, the Windows 2000 High Encryption Pack must be installed.

LiteSpeed offers the option of encrypting in the following formats:

  • 40-bit RC2

  • 56-bit RC2

  • 112-bit RC2

  • 128-bit RC2

  • 168-bit 3DES

  • 128-bit RC4

  • 128-bit AES

  • 192-bit AES

  • 256-bit AES

Higher levels of encryption require slightly more CPU, but generally the impact of 256-bit AES encryption on a backup running on a modern server is very low at less than 0.5% CPU utilization. We recommend for best security of a backup that 256-bit AES be used when encryption is needed.

Caution: When encrypting data, take care not to lose the encryption key; a backup cannot be restored or recovered without the original encryption key.


Related Topics

Was this topic helpful?

[Select Rating]

Double-Click Restore Executables

Double Click Restore Executables

LiteSpeed executables can be created for Native SQL Server and LiteSpeed disk backups. In many cases, LiteSpeed disk backups can be directly converted to Double Click Restore executables.

A Double Click Restore is an executable that has an .exe extension and performs a database restore when double-clicked. An executable file allows you to restore a backup on a server instance that does not have LiteSpeed installed.

A Double Click Restore executable is created by either writing a loader program designed to restore backup files, or by inserting the loader directly into the header of a suitable LiteSpeed backup file. If you convert a striped backup file, the first file will be the executable (.exe), and the others will remain unchanged.

Double Click Restore Naming Conventions

Double Click Restore conversion may modify the extension of the backup file.

For LiteSpeed backups, file name conversion depends on the backup file size. If the backup file size is less than 4 GB, then the backup file name will have the .exe extension. If the backup file is larger than 4 GB, then the backup file name will not have the .exe extension and LiteSpeed will create X.exe, the empty Double Click Restore loader that restores the backup when double-clicked.

For native SQL Server backups, LiteSpeed will create the empty Double Click Restore loader that has the .exe extension and restores the backup when double-clicked.

Backup Type Name Before Conversion Name After Conversion
LiteSpeed (<4GB) X.exe

X.exe (No name changes)

X X.exe
LiteSpeed (>4GB) X.exe



X* (No name changes)

Native SQL Server X.exe



X* (No name changes)

*—X.exe is created as empty Double Click Restore loader. You can locate it in the same directory as the converted X.

Create Double Click Restore Executables

To create a new Double Click Restore executable, do one of the following:


You need to restore particular compressed and encrypted LiteSpeed backups on a server that does not have LiteSpeed

ClosedClick here to see the procedure for this scenario.

  1. Define which backup files are needed for the restore and convert them to the Double Click Restore executables. Do one of the following:
    • Right-click a backup in the Backup Browser tab or in the Backup History tab and select Convert to Double Click Restore backup.
    • Run exec xp_slsCreateDCR @FileName='<path>'
      where <path> is the path to the backup.

  2. Copy the Double Click Restore executable(s) you created to the server that does not have LiteSpeed.

    NOTE: If a backup file is more than 4 GB, you need to copy both the converted backup file and the empty Double Click Restore loader.

  3. Log on to the server, double-click the first Double Click Restore Executable file to restore and complete the LiteSpeed Double Click Restore dialog. Repeat for all other files.

    NOTE: If you deselected and selected appended backups to restore, you may need to re-enter the encryption password.


Related Topic

Was this topic helpful?

[Select Rating]

Related Documents