Company policy and Backup strategies change and evolve. Having to modify backup jobs for each database and/or manage maintenance plans for one server at a time sounds like a pain. Do you agree? It would be better to be able to manage multiple SQL Server instances and apply the changes needed easily and quickly. So... can LiteSpeed help us with this? Yes! With LiteSpeed backup templates.
A LiteSpeed backup template contains a set of backup parameters that describe the types of databases and the types of backups you want to perform. When you deploy a template to a server instance, this creates a backup job or a maintenance plan that uses the parameters you specified in the template.
So if your company's policy changes, you can quickly edit the template to comply with the new standards and re-deploy.
Let's create a backup template now.
To create one you can select "Backup Templates" on the main menu or go to the "Backup Templates" tab in the "Backup Manager" and select "New"
The Backup Template Wizard opens:
In the next step we need to select the databases we are going to include in the template.
In our example we will select manually a subset of databases that we know always follow the same backup strategy.
Select the Backup Destination(which include disk and cloud)
Let's fast forward the next sections
And here we have our first template!
Backup Templates are saved in the central repository (if one is used) and available for editing and deployment on the "Backup Templates" tab in the "Backup Manager" pane (CTRL+1).
In the Backup Templates tab, you can create, edit, clone, import, export and deploy templates, view the template contents, deployment details and modification history.
Jaime: Excuse-me! I do not have the Backup Templates tab in the Backup Manager pane. What am I doing wrong?
Me: Thanks for asking! This is because the Backup Templates tab is only available if the central repository is configured and selected for use. If you check at the bottom of the screen you can confirm this:
Let's continue now by deploying the template we just created: r-click on it and select Deploy:
The Wizard opens and all we need to do is follow it!
Here we can select to create a SQL Server Agent job or a Maintenance Plan. If you use the Regular Expression option, then you are limited to deploying as a Maintenance Plan.
In our example we will select SQL Server Agent job:
And here we have our first template:
Let's go to the Job Manager. For each of the selected instances, the Deployment wizard will create either a SQL Agent job or a maintenance plan. Maintenance Plans names and subplans jobs names are prefixed with the template name. SQL Agent job names have the following format: LiteSpeed Backup Template <template_name> (version n).
In this example the name of the job is LiteSpeed Backup Template FriendsTemplate (version 1) as expected:
Let's start the job manually so we can see the backups:
Let's assume now that someone phones us and says: We have changed our mind..now we want that the name of the backups starts with Friends instead of with the server name and we also want to use 128-bit AES encryption.
To do that we can just edit the Template and then re-deploy it. It's that easy:
Now we deploy the template:
Once deployed, let's check the job. Look how the name of the job has changed to version 2.
This is because LiteSpeed versions the templates and the deployments.This way it is easy to see if an instance needs to be updated (for example checking this in the LiteSpeed Activity tab):
Once the job runs, we will have our new backups which are fulfilling the new requisites!
This is only an easy example. Please refer to the help (press F1 in the Litespeed console) or to the online documentation for more details about this powerful feature.
Hope this helps!