Chat now with support
Chat with Support

LiteSpeed for SQL Server 8.5 - 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

Back Up Multiple Databases

Test Optimal Backup Settings

Higher compression levels result in smaller backup files, but they also may consume additional CPU. If the server does not have sufficient CPU, then the backup may take longer to complete. The Backup Analyzer evaluates different settings, such as compression level, striping, and backup destinations, to help you determine optimal backup settings.

NOTE: When running the Backup Analyzer, follow these guidelines for the best results:
Minimum: 1 GB sample size.
Recommendation: 10 GB sample size. The combination of compression levels, encryption options, and backup locations should be considered. For example, if you sample 4 GB of data with 10 different tests, LiteSpeed will take the same amount of time as it takes to back up 40 GB. On very large databases, you can speed up the analysis by reducing the number of backup combinations or by reducing the amount of sample data.

Backup Analyzer Wizard

The Backup Analyzer wizard guides you through selecting the backup parameters to test. The wizard tests all of the different combinations of your selected parameters by backing up a portion of the database. It does not interfere with existing backup schedules or sets.

To run the Backup Analyzer wizard

  1. Select the Backup Manager pane (CTRL+1).

  2. Right-click the database and select Backup Analyzer Wizard.


    • To test striped backups, click Add to add several destinations and select the Test backup striping to selected backup locations checkbox on the Backup Location page.
    • If you add more than two destinations, select both checkboxes to test all destination combinations.
    • If you select a large number of backup parameters, you may want to schedule the tests to run at a specified time within the LiteSpeed Analyzer job.
  3. Click Next.
  4. On the Backup Location screen, select Backup to (Disk, Cloud, or TSM Backup) and Backup locations. Add or remove backups from the locations. Additionally select striping options.
  5. Click Next.
  6. On the Data Sample screen, enter the amount of data to sample in megabytes or the percentage of data to test.
  7. Click Next.
  8. On the Compression Level screen, select the compression levels to test. Any combination of compression levels from 0 to 8 are available. You can also specify additional backup advanced options.
  1. Click Next.
  2. On the Execute Script screen, the list of databases to test is displayed.
  3. Click Next. The Backup Analyzer Wizard test scrip runs and displays the test results summary.
  4. Complete the wizard.

NOTE: After the required number of bytes is received for analysis, the process is intentionally aborted. This generates the VDI error messages in the LiteSpeed log files and the SQL Server error log. Please ignore them.

Scheduling Backup Analyzer

You can schedule analyzing from within the Backup Analyzer Wizard. An SQL Server job with the name "LiteSpeed Analyzer SERVERNAME.DATABASENAME" is created. View the list of Backup Analyzer jobs directly from the Backup Analyzer tab by clicking "Show Analyzer Jobs." Right-click on the job. You can change schedule, start/stop, disable or even delete the job. To view the script, select the "View in Job Manager" option and open the job properties from the Job Manager module. You can then go to the job step details.

Backup Analyzer Tab

The Backup Analyzer tab consists of the toolbar, graph, and grid. The Backup Analyzer toolbar is used to select the following items:

  • Existing test - View the existing test or use the drop down to select other tests.
  • Purge All - Click to remove all Backup Analyzer tests for the database.
  • Show Analyzer Jobs - Click to view all Backup Analyzer jobs.
  • New Test - Click to run the Backup Analyzer Wizard and begin a new test.
  • - Click to export the grid to Microsoft Excel.
  • - Click to print the grid.

The Backup Analyzer tab presents the test results in a graph and grid format:

  • Graph—Displays the backup duration and compression amount for each test in a bar graph so you can easily compare the results between size and duration. If you hover the mouse over the bar graph, test number, size, and duration are displayed. If you select a test in the grid, LiteSpeed indicates the corresponding test in the bar graph with a yellow border around it. You can view previous tests by changing the Existing test field. 

  • Grid—Displays the details of each test in columnar format. LiteSpeed indicates its recommendation with the number indicated first in the Test Number column and a yellow box around the test bar graph. Review the following for additional information:

    Tip: .Use the Grid horizontal scroll bar to view other table columns.

    Column Description
    Test Number

    The number assigned by the Backup Analyzer.


    The compression level that is used for a particular database backup test.


    Indicates enabled encryption for the database backup.

    Estimated Duration

    The approximate time allotted to run the database backup.

    Estimated Backup Size (MB)

    The approximate size of the backed up database.

    Database Size (MB)

    The amount of disk space the database occupies.

    Compression (MB)

    The amount of disk space you can save with this compression ratio.

    Compression (%)

    Data compression ratio.

    Read Speed (MB/Sec) Maximum read speed.
    Throughput (MB/Sec) Actual speed of processing data (compression and encryption).
    Backup Speed (MB/Sec) Virtual write speed of the backup. Compare this value to Throughput and Read Speed to determine if you are experiencing a write-bound issue.
    Write Speed (MB/Sec) Actual write speed. It shows how quickly the compressed data stream is written to the destination disk.
    Stripes Number of stripes associated with the backup.
    Destination Backup destination directory location.
    Threads Number of threads associated with the backup.

    You can double-click a row for more information about the test.

    Tip: For panes that have grids, you can sort, group, move, and remove the columns:

    • To sort and group the records, right-click a column header and select the appropriate options.
    • To sort records against multiple columns, click column headers while holding the SHIFT key. For example, to sort by type and then by name, click the Type column header and then SHIFT+click the Name column header.
    • To add or remove columns, right-click a column header and select Column Chooser. Add a column by dragging it from the list into the column headers. Remove a column by dragging its column header into the list.
    • To move a column, drag the column header to the new location.

Logic for Backing Up Multiple Databases

LiteSpeed's Logic for Backing Up Multiple Databases

LiteSpeed provides you with many flexible options for selecting databases to include in a backup job or in a backup task of a maintenance plan. If there are conflicting conditions (for example, you selected to back up databases, matching the 'DirectD*' pattern and skip read-only databases, while the name of a read-only database matches the pattern), the Exclude condition wins over Include.

NOTE: LiteSpeed wizards may have different Exclude/Include options for selecting databases.

Include Databases

You can specify databases:

NOTE: New user databases will also be backed up as part of the "All databases" or "User databases" groups or if they match the specified pattern, unless they are excluded by an Exclude option. For more information, see Exclude Databases.

Depending on the LiteSpeed wizard, you cannot mix selection methods. Instead, you can schedule several subplans or jobs using different selection methods.

Exclude Databases

Using these options you can further define databases you want to back up.

You can exclude the following databases:

  • Offline
  • Selected—LiteSpeed will backup all included existing and new databases, except those you select manually and those excluded by a different Exclude option.
  • Deleted
  • Log Shipping
  • Read Only

NOTE: Mirror databases and database snapshots are automatically excluded.

Back Up SQL Server 2012 AlwaysOn Availability Groups

Versions 7.0 and later of LiteSpeed provide enhanced support for databases participating in AlwaysOn availability groups. You can include availability databases in a maintenance plan or a backup job, as well as perform backups on individual replicas.

In maintenance plans and backup templates, the following options define which replicas are eligible for backup:

  • Back up preferred—This is the default option. LiteSpeed will follow the logic defined for the availability group by the database administrator and back up databases accordingly, provided the jobs or maintenance plans are configured on every server instance that hosts an availability replica. The default AlwaysOn configuration is to back up a secondary replica only, unless the primary replica is the only replica online.
  • Only back up the primary—The primary is backed up each time, regardless of AlwaysOn configuration.
  • Back up all (primary and secondaries)— All primaries and secondaries are backed up each time, regardless of AlwaysOn configuration.
  • Back up none—AlwaysOn databases are ignored during backup.


  • Fast Compression is not supported on secondary replicas in AlwaysOn Availability Groups. Backups must be performed on the primary because differential backups are not supported on secondaries.
  • Performing full, file and filegroup backups on secondary replicas in an AlwaysOn Availability Group will always produce copy-only backups. Please refer to the SQL Server 2012 product documentation for information about supported backup types.
  • In Maintenance Plans if you select the Differential backup type, all secondary replicas in an AlwaysOn Availability Group are automatically excluded. In the Multi-Database Backup Wizard they are not excluded and differential backup for secondary replicas will fail.
  • In Maintenance Plans and in the Multi-Database Backup Wizard, if you select the Transaction log backup type and turn on the Copy Only option, backups for all secondary replicas will fail because transaction log backups with Copy Only are not supported on secondaries.

Use Wildcard and Regular Expressions in LiteSpeed

Use Wildcard and Regular Expressions in LiteSpeed

You can configure LiteSpeed to only back up databases that match the specified pattern. Using wildcard and regular expressions is particularly helpful when there are databases with similar names on the same instance or on multiple instances.


  • To back up databases with similar names on multiple instances, create and deploy a backup template, or create a maintenance plan on one instance and then simply copy it to other instances.
  • LiteSpeed lets you enter multiple patterns. When selecting databases for your maintenance plan, you can click Validate selected or Validate all to display a list of databases names that match any of the specified patterns.

Wildcard Expressions

You can use wildcard characters '?' and '*' to select databases you want to back up. For example, "litespeed*" will include all databases that start with "litespeed" or "LiteSpeed".

Regular Expressions

Using regular expressions can provide you with more flexibility when selecting databases. For example, the following expressions will include a database if its name:

  1. Begins with "LiteSpeed".


  2. Ends with "_PUBLISHER".


  3. Begins with "LiteSpeed" followed by digits.


  4. Contains any number within the range 828500 to 828549.


  5. Begins with "LiteSpeed" or "Quest", except "QuestSoftwareCMSS".



  • Regular expressions are only supported in Maintenance Plans.
  • LiteSpeed does not support regular expressions with the IgnoreCase option. To ignore case, use ([Aa][Bb][Cc]) instead of (?i:abc).

Review the following for additional information:

Construct Description

The character following this construct is at the beginning of the document or new line.

Text: no cat can catch a crow

Expression: ^\w+

Matches: no


The character followed by this construct is at the end of the string.

Text: no cat can catch a crow

Expression: \w+$

Matches: crow

(normal characters)

Characters match themselves, except for the following: ^ . * + ? { [ ( | ) \ $


The character immediately following it, when that character is not an escaped character.

Expression: \*

Matches: *


Any word character (A - Z and a - z), digits, and underscores.

Text: no cat can catch a crow

Expression: ca\w+

Matches: cat, can, catch


Any non-word character.

Text: 9pm @ RockCafe

Expression: \W

Matches: @


Any digit.

Text: APR-2012

Expression: \d\d\d\d

Matches: 2012


Any non-digit.

Text: APR-2012

Expression: \D\D\D

Matches: APR


Any whitespace character.

Text: no cat can catch a crow

Expression: c\w\w\s

Matches: "cat " and "can "(both matches include the space)


Any non-whitespace character.

Text: no cat can catch a crow

Expression: c\S+

Matches: cat, can, catch, crow

[ ]

Any character within the brackets.

Expression: p[ai]ck

Matches: pick, pack

[ - ]

Any character within the specified range. [0-9a-fA-F] matches a single hexadecimal digit, without case sensitivity.

Expression: b[a-z]ttle

Matches: battle, bottle

NOTE: The - character is considered a literal character if it used as the first or last character within the brackets, or if it is escaped with a backslash.

[^ ]

Any character that is not in the specified set of characters.

Expression: d[^u]g

Matches: dog and dig but not dug


Any single character. When preceded with the escape character (\), it is equivalent to a period character.

Expression: d.g

Matches: dog, dig, and dug


Zero or more matches of the preceding character.

Expression: a*ha

Matches: ha, aha, aaha, aaaha, etc.


Zero or one matches of the preceding character.

Expression: colou?r 

Matches: color and colour


One or more matches of the preceding character.

Expression: goo+gle

Matches: google, gooogle, etc.


The exact number of matches for the preceding character.

Text: he had to go too far

Expression: o{2}

Matches: oo in "too"


The preceding character must match at least "n" times but no more than "m" times.

Expression: mo{2,3}n

Matches: moon and mooon, but not mon or moooon

( )

Matches subexpression.


Matches any of the alternate expressions.

Expression: theat(er|re)

Matches: theater and theatre

(?# )

A comment within a regular expression. The comment ends after the first closing parenthesis.

Expression: theat(er|re)(?# using this example a second time)

Matches: theater and theatre

(?= )

A zero-width positive lookahead assertion.

Expression: ^(?=.{32}$)(\d+)

Matches: numbers at the beginning of any line which is exactly 32 characters long

(?! )

A zero-width negative lookahead assertion.

Expression: ^(?!test).+

Matches: any line that does not begin with "test"

For more information about regular expressions, see

Multi-Database Backup Wizard

Multi-Database Backup

Multi-Database Backup launches the Backup wizard which allows you to configure backup options for several databases at once.

For each database, LiteSpeed generates uniquely named backup files to avoid collision.

NOTE: Fast Compression is now available for multi-database backup in the UI.

To back up multiple databases

  1. Right-click the server instance and select Multi-Database Backup.... Alternately you can select the Multi-Database Backupbutton at the top.
  2. Select databases for backup. For more information, see LiteSpeed's Logic for Backing Up Multiple Databases.
  3. Complete the wizard. For more information, see To back up databases using the Backup wizard. on backup options.

In case you select to schedule the backups to run at the specified times, the wizard creates a job with 'Multiple Databases' appended to the job name.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating