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.
You can specify databases:
Using one of the following built-in groups:
Using wildcard or regular expressions. For more information, see Use Wildcard and Regular Expressions in LiteSpeed.
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.
Using these options you can further define databases you want to back up.
You can exclude the following databases:
NOTE: Mirror databases and database snapshots are automatically excluded.
Versions 7.0 and later of LiteSpeed provide enhanced support for databases participating in AlwaysOn availability groups (SQL Server 2012 and above). 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:
NOTES:
About Creating Maintenance Plans
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.
Tips:
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".
Using regular expressions can provide you with more flexibility when selecting databases. For example, the following expressions will include a database if its name:
Begins with "LiteSpeed".
^LiteSpeed
Ends with "_PUBLISHER".
_PUBLISHER$
Begins with "LiteSpeed" followed by digits.
^LiteSpeed\d+
Contains any number within the range 828500 to 828549.
8285[0-4][0-9]
Begins with "LiteSpeed" or "Quest", except "QuestSoftwareCMSS".
^(?!QuestSoftwareCMSS)(Quest|LiteSpeed)
NOTES:
Click here for information about the regular expression constructs.
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: * |
\w |
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 |
\W |
Any non-word character. Text: 9pm @ RockCafe Expression: \W Matches: @ |
\d |
Any digit. Text: APR-2012 Expression: \d\d\d\d Matches: 2012 |
\D |
Any non-digit. Text: APR-2012 Expression: \D\D\D Matches: APR |
\s |
Any whitespace character. Text: no cat can catch a crow Expression: c\w\w\s Matches: "cat " and "can "(both matches include the space) |
\S |
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. |
{n} |
The exact number of matches for the preceding character. Text: he had to go too far Expression: o{2} Matches: oo in "too" |
{n,m} |
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 |
Back Up Databases Using Maintenance Plans
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
In case you select to schedule the backups to run at the specified times, the wizard creates a job with 'Selected databases' appended to the job name.
Fast Compression
NOTES:
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.
Days |
Native backup |
LiteSpeed full backup |
Fast Compression backup |
---|---|---|---|
1 |
100 GB |
20 GB |
20 GB (Full) |
2 |
100 GB |
20 GB |
1 GB (Diff) |
3 |
100 GB |
20 GB |
2 GB (Diff) |
4 |
100 GB |
20 GB |
3 GB (Diff) |
5 |
100 GB |
20 GB |
4 GB (Diff) |
6 |
100 GB |
20 GB |
5 GB (Diff) |
7 |
100 GB |
20 GB |
6 GB (Diff) |
Total: |
700 GB |
140 GB |
41 GB |
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.
Fast Compression handles the naming of files automatically. Fast Compression backups have the following format:
where:
NOTE: All indexes start at zero.
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,
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):
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. |
You can set the following thresholds to define when to issue a full backup:
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.
NOTES:
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.
This option causes LiteSpeed to issue a full backup, if one of the following problems is discovered in the current backup set:
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.
TIP: "Cleanup" means Smart Cleanup Policies or Smart Cleanup. For more information, refer to Smart Cleanup Policies.
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:
The Cleanup options include:
TIP: Use the Ctrl button in Locations browse window to select several locations.
Note: Clean up transaction log options are available if you set up a transaction log within the wizard (or template). |
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:
For more information, see Smart Cleanup Policies.
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.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center