How to Backup & Restore
Microsoft SQL Server
Databases with Veeam
Version 8.0
Best Practices
April, 2015
© 2015 Veeam Software.
All rights reserved. All trademarks are the property of their respective owners.
No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system,
or translated into any language in any form by any means, without written permission from Veeam
Software (Veeam). The information contained in this document represents the current view of Veeam
on the issue discussed as of the date of publication and is subject to change without notice. Veeam
shall not be liable for technical or editorial errors or omissions contained herein. Veeam makes no
warranties, express or implied, in this document. Veeam may have patents, patent applications,
trademark, copyright, or other intellectual property rights covering the subject matter of this
document. All other trademarks mentioned herein are the property of their respective owners. Except
as expressly provided in any written license agreement from Veeam, the furnishing of this document
does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
Important!
Please read the End User Software License Agreement before using the accompanying software
program(s). Using any part of the software indicates that you accept the terms of the End User
Software License Agreement.
2 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
CONTENTS
CONTACTING VEEAM SOFTWARE....................................................................................................... 4
ABOUT THIS GUIDE.............................................................................................................................. 5
OVERVIEW ............................................................................................................................................ 7
PREPARING FOR SQL SERVER BACKUP AND RECOVERY ................................................................... 8
KNOW YOUR INFRASTRUCTURE RESOURCES ......................................................................................................................... 8
DETECT DATABASE RECOVERY MODEL ................................................................................................................................. 8
DECIDE ON BACKUP AND RECOVERY TOOL .........................................................................................................................10
Veeam Backup & Replication .....................................................................................................................10
Other Tool .........................................................................................................................................................10
UNDERSTAND THE PROCESSES .............................................................................................................................................12
How It Works: SQL Server and Transaction Log Backup .................................................................12
Backup Files and Retention ........................................................................................................................15
How It Works: SQL Server Database Restore .......................................................................................15
ADDRESS RECOVERY REQUIREMENTS ..................................................................................................................................17
PLAN FOR RECOVERY VERIFICATION.....................................................................................................................................17
SETTING UP YOUR SQL BACKUP JOBS.............................................................................................. 18
OBJECTS TO PROCESS............................................................................................................................................................18
APPLICATION-AWARE PROCESSING .....................................................................................................................................18
TRANSACTION LOG HANDLING ............................................................................................................................................20
LOG SHIPPING SERVER ..........................................................................................................................................................21
SCHEDULING ..........................................................................................................................................................................22
SUPPORT FOR ALWAYSON AVAILABILITY GROUPS.............................................................................................................23
MANAGING YOUR SQL BACKUP JOBS .............................................................................................. 25
STARTING, STOPPING, ENABLING AND DISABLING THE JOB...............................................................................................25
VIEWING JOB INFORMATION .................................................................................................................................................26
LOG BACKUP IMPORT ............................................................................................................................................................27
RESTORING SQL SERVER DATABASES .............................................................................................. 28
PREPARING FOR DATABASE RESTORE ..................................................................................................................................29
FOLLOWING YOUR RESTORE SCENARIO...............................................................................................................................31
APPENDIX. STATISTICS ON TRANSACTION LOG PROCESSING ....................................................... 35
3 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
CONTACTING VEEAM SOFTWARE
At Veeam Software we value the feedback from our customers. It is important not only to help you
quickly with your technical issues, but it is our mission to listen to your input, and build products that
incorporate your suggestions.
Customer Support
Should you have a technical concern, suggestion or question, please visit our Customer Center Portal
at cp.veeam.com to open a case, search our knowledge base, reference documentation, manage your
license or obtain the latest product release.
Online Support
If you have any questions about Veeam solutions, you can use the following resources:

Full documentation set at www.veeam.com/documentation-guides-datasheets.html

Community forum at forums.veeam.com
Company Contacts
For the most up-to-date information about company contacts and office locations, please visit
www.veeam.com/contacts.html.
4 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
ABOUT THIS GUIDE
This document explains how to backup and restore Microsoft SQL Server databases with Veeam
Backup & Replication 8.0.
Intended Audience
The document is intended for backup administrators and other IT professionals involved in setting up
SQL Server database backup and restore with Veeam solution.
Document Revision History
Revision #
Revision 1
Date
21/04/2015
Description of Changes
Initial version of the document.
5 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
6 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
OVERVIEW
With database servers and other Tier 1 applications being virtualized, organizations need to ensure
data recoverability to any point in time, minimizing impact on end users and supporting continuous
business operation. Thus, backup and recovery strategies for highly transactional applications are of
greater importance.
Veeam Backup & Replication 8.0 offers you flexible options for backup and several approaches for
restore of your virtualized SQL Servers and databases, including popular full restore of SQL Server
virtual machine, file-level restore, and database restore using Veeam Explorer for Microsoft SQL Server.
This document will describe the latter approach; to read about two others, refer to the Veeam Backup
& Replication documentation at http://www.veeam.com/documentation-guides-datasheets.html.
Note:
For Veeam Backup & Replication v7 and earlier, SQL application items restore is carried out using UAIR Microsoft SQL Recovery Wizard, described in the corresponding User Guide
(http://helpcenter.veeam.com/backup/70/uair/).
To properly configure a backup job that will create a transactionally-consistent backup and allow for
future restore of your SQL Server databases, you should understand how the backup processes
implemented by Veeam work.
Veeam Backup & Replication creates a backup of the whole SQL Server, including all SQL Server
instances and DBs, which can be full, incremental or reverse incremental backup (depending on the
selected backup method).
As for native SQL means, they perform backup per database, creating full and differential backups.
Remember that these native SQL backup types do not correspond to Veeam backup methods in any
way.
In this context, consider that Veeam Backup & Replication will do the following during applicationaware image-level backup creation:
1.
Create an image-level backup of your SQL Server VM, including all hosted instances and
databases and their related settings, and store it to backup repository in Veeam’s proprietary
format: .VBK (full VM backup), .VIB (incremental), or .VRB (reversed incremental).
2.
If transaction log handling option was selected, then Veeam Backup & Replication will obtain
transaction log backup files (.BAK) created by native means and use Veeam log shipping
server to store them to the location where VM backup is kept. These log backups will be
stored in in Veeam’s proprietary format (.VLB).
These procedures, as well as Veeam log shipping server will be discussed later in this document.
Note:
To perform transaction log backup, the VM backup job must be enabled and have its schedule
configured.
To read more about backup methods and Veeam backup files, refer to the Veeam Backup &
Replication User Guide at http://www.veeam.com/documentation-guides-datasheets.html.
7 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
PREPARING FOR SQL SERVER BACKUP AND
RECOVERY
Know Your Infrastructure Resources
When planning for your SQL Server backup and restore, examine your infrastructure and virtualized
servers and answer the following questions:
1.
What database servers are virtualized in your environment?
Veeam Backup & Replication 8.0 supports database restore for the following systems:
•
Microsoft SQL Server 2014
•
Microsoft SQL Server 2012
•
Microsoft SQL Server 2008 R2
•
Microsoft SQL Server 2008
•
Microsoft SQL Server 2005 SP4
All editions of Microsoft SQL Server are supported.
AlwaysOn Availability Groups are supported for Microsoft SQL Server 2012 and later.
2.
What are your RTO & RPO for SQL Server databases?
Frequency of the SQL Server backup depends on how much time you can afford to restore it.
In general, the more often you back up, the shorter the restore time is.
3.
How intensively your applications modify data in the database?
This factor, together with required RTO may influence the backup window and job schedule,
as well as space needed for storing transaction log backups.
4.
What is your backup repository capacity?
Repository should provide enough space to store the amount of data produced by database
and transaction log backups. It is recommended that you estimate how much disk space a VM
backup and transaction log backup will occupy, and then plan for your repository
accordingly.
For more recommendations on repository planning, you can use the online estimation tool, and if you
have Veeam ONE deployed in your environment, you can run the VM Change Rate Estimation report
from the Infrastructure Assessment pack (refer to
http://helpcenter.veeam.com/one/80/reports/index.html?vm_change_rate_estimation.html).
Detect Database Recovery Model
SQL Server backup and restore processes go within the context of a database recovery model which
defines the following:
•
•
What types of backups and what restore scenarios will be supported for the database
How the transaction log should be handled for that purpose
Microsoft SQL Server supports several logging and recovery models for its databases: simple, full, and
bulk-logged.
•
With simple recovery model specified for your database, you will be able to restore it only to
the selected restore point; SQL Server will automatically truncate logs, and Veeam backup
configuration will not affect any of them.
•
With other models, database transaction logs will not be truncated, and Veeam offers
different processing options for them.
8 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Note:
To read more about different logging and recovery models, refer to the Recovery Models (SQL Server)
MSDN article.
To learn how transaction log truncation works, refer to the Transaction Log Truncation article.
To discover logging and recovery model for the database which you plan to backup and restore, use
SQL Server Management Studio or contact your database administrator.
9 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Decide on Backup and Recovery Tool
You should also find out what tools are used to backup SQL Server VM hosting your database(s) and
their transaction logs in your organization infrastructure.
Veeam Backup & Replication
If you plan to use Veeam Backup & Replication for both image-level backup of SQL Server VM and
database transaction log backup, then you will need to select the corresponding option (Process
transaction logs with this job) when configuring VM processing settings in backup job. (Job
configuration will be discussed later in more details.)
This option allows you to ‘set and forget’ an automated workflow for creating all the backups required
for SQL Server database recovery using Veeam Backup & Replication. Thus, data can be quickly and
easily recovered, following the scenario of your choice with Veeam tools.
With this option selected, you can configure SQL database log backup settings on the SQL tab, which
becomes available to you.
Note:
For other applications, this option triggers transaction log truncation.
Other Tool
For large SQL Server deployments, frequent full database backups are not always acceptable since
these operations would be very much time- and resource-taking. For this reason, organizations prefer
to create full and differential database backups periodically, backing up transaction logs quite
frequently. Therefore, to provide for proper restore, database administrators need to ensure they have
the most recent full/differential backup and the associated sequence of transaction log backups at
hand. When Veeam creates an image-level backup of SQL Server VM, using application-aware
processing without special settings (that is, without COPY_ONLY flag), this is always treated by SQL as
a full database backup. As a result, this full backup becomes a new base for the differential backups
that follow, jeopardizing the sequence (see this illustrated article).
10 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Thus, if you plan to preserve the chain of full and differential database backups (created by native
means or by 3rd party backup tool) but you also want Veeam to back up your SQL Server VM, you
should trigger the COPY_ONLY flag for Veeam. For that, you should select the Perform copy only
option.
This option indicates that a chain of database backups and transaction logs is created by native means
or by 3rd party tool, and instructs Veeam to keep this sequence untouched. For that, Veeam will back
up the specified SQL Server VM using the VSS_BS_COPY method for snapshot creation. Transaction
logs will not be affected in any way, so your database administrator can handle them with native or
3rd party tools.
Important!
With the Perform copy only option selected, the SQL tab (log handling settings) will become inactive
and not visible in this dialog.
The COPY_ONLY method also allows Veeam to support Always-On availability groups, creating
backups of passive replicas.
Note:
For more information, refer to the “Copy-Only Backup” section in Veeam Backup & Replication User
Guide.
For detailed description of SQL Server backup chain, you can also read the article by Michael K.
Campbell at http://sqlmag.com/blog/breaking-backup-chain-redux-or-eating-crow and the
recommendations by Paul Randal at http://www.sqlskills.com/blogs/paul/backup-with-copy_onlyhow-to-avoid-breaking-the-backup-chain/.
11 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Understand the Processes
To create an application-aware backup of the SQL Server VM that enables you to restore the databases
to the certain point in time or to specific transaction, you should set up a backup job with special
application processing options, and enable SQL database transaction log handling.
This section explains how such a job works, and provides recommendations on its configuration.
Note:
The explanations below refer only to the case when transaction log backup is turned ON for SQL
Server VM backup job; otherwise, application-specific options will be unavailable.
How It Works: SQL Server and Transaction Log Backup
If you plan to set up the SQL Server backup job to back up transaction logs, consider that it will
comprise 2 jobs:
1.
SQL Server image-level VM backup job (‘parent’) named <job_name>, for example, Test Job.
This is the job you configure explicitly in the management console; its session starts on
schedule or is started manually by user.
2.
Transaction log backup job (‘child’) named with suffix: <job_name> SQL Backup, for
example, Test Job SQL Backup. This job is created by Job Manager if it detects that ‘parent’ (VM
backup) job is scheduled to back up at least one SQL Server with application-aware image
processing switched on and transaction log backup enabled.
Transaction log backup job (‘child’) is triggered by VM backup (‘parent’) — this sequence ensures that
VM (and database) restore point will be present when it comes to log replay. ‘Child’ job runs
permanently in background, with the specified frequency of log shipping to repository. Its session
data is kept in the Veeam Backup & Replication database and is displayed in the Veeam backup
management console.
The whole process goes as follows:
Stages 1 and 2
When scheduled, Job Manager (Veeam component working on Veeam backup server) launches
‘parent’ job that creates an image-level backup of SQL Server VM and stores it to backup repository.
Stage 3
A new ‘child’ job session starts, and Veeam Backup & Replication installs a runtime component Veeam
Log Shipper Service to the VM guest OS in order to support guest processing and log handing. This
service runs during the ‘child’ job session and collects information about databases whose logs should
be processed. The service also detects whether it is possible to store logs into the repository through
12 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
direct access, or using a log shipping server. When ‘child’ job session ends, the service is stopped and
removed from guest. Then a new session starts, and the service is installed again.
Transaction log backup is performed by SQL Server; this operation also includes log truncation so that
the space can be reused. These log backups are stored as .BAK files in a temporary folder in the SQL
Server VM guest file system.
Note:
Default location of the temporary folder is %allusersprofile%\Veeam\Backup. If it is necessary
to use another location, you can specify it in the SqlTempLogPath (STRING) registry value that you
can create under HKLM\SOFTWARE\Veeam\Veeam Backup and Replication registry key on your
SQL Server VM (you may need to restart the Log shipper service on that VM for the change to take
effect).
Stage 4
Every 15 minutes (default frequency) Job Manager component detects what databases currently exist
on SQL Server, and maps this data with VM backup information kept in Veeam Backup & Replication
database. This periodic mapping reveals the databases for which Veeam Backup & Replication must
ship transaction logs to repository during this 15-min interval.
If there are any logs that for some reasons were not shipped to backup repository by Veeam during
the previous interval(s), they will be also included in the processing list. To detect those remaining
logs, Veeam enumerates .BAK files in the temporary folder.
Stage 5
Transaction log backup files (.BAK) are transferred from temporary location on SQL Server to the target
location in backup repository, either directly or via a log shipping server. Source-side Veeam transport
service compresses log data to be transferred according to its built-in settings. On the repository side,
data is compressed according to ‘parent’ job settings (see the "Data Compression and Deduplication"
section of the User Guide for details).
As soon as data is copied to the target, transaction log backup files are deleted from the temporary
folder on SQL Server.
Note:
Transaction logs that for some reason were not processed during log backup interval remain in that
temporary folder and are processed during the next log backup interval (see Stage 4).
The figure below depicts in detail what goes on within a log backup interval for each SQL Server VM in
the job (that has log backup option enabled).
Log Backup Sessions
A sequence of the 15-min (or custom) intervals between the runs of ‘parent’ job comprises a log
backup (‘child’ job) session.
•
Initial session starts at the moment when ‘parent’ job (image-level backup) schedule was
enabled, then session starts with each start of the ‘parent’ job.
13 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
•
Log backup (‘child’ job) continues working until the next start of the VM image-level backup
(‘parent’). At this point, ‘child’ job stops and then starts a new session, performing steps 1-5.
•
Session ends just before the next run of the ‘parent’ job, and/or when this ‘parent’ job is
disabled (using the menu command or by modifying job schedule).
Example
Assume that VM image-level backup job was configured to run daily at 11:00 PM, starting on May, 5.
The figure above illustrates the following course of action:
1.
Initial ‘child’ job session starts as soon as ‘parent’ job schedule is enabled (no backups yet) –
this happens at 7:00 PM on May, 5. The ‘child’ job remains in the Idle state, waiting for an
image-level backup to arrive.
2.
At 11:00 PM on May, 5 ‘parent’ job runs on schedule, creating an image-level backup of SQL
Server VM.
3.
‘Child’ job state is now Working, and a sequence of log backup intervals follows. If all log
backups are successfully transferred to backup repository before the moment when a new
session must start, the job will go into the Idle state and wait for remaining log backup
interval(s) to expire.
4.
At 11:00 PM on May, 6 next run of the ‘parent’ job takes place, and new ‘child’ job session
starts.
Transaction log backup requires that at least one image-level backup of SQL Server VM is performed,
so remember that:
•
Transaction logs for newly appearing databases will be backed up only after the image-level
backup of the corresponding SQL Server is performed.
•
If a new log backup (‘child’) job session starts when no restore point has been yet created by
image-level backup (‘parent’) job, and there are no previous logs to process, ‘child’ job will
remain in the idle state, waiting for a new restore point to arrive.
•
Transaction log backup will not take place after full SQL Server VM restore.
14 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Backup Files and Retention
In the backup repository, logs are stored as .VLB files (Veeam proprietary format) co-located with
corresponding SQL Server VM backups (.VBK/.VIB/.VRB files) in the repository folder (default is
C:\backup\<SQL_server_VM_backup_job_name>). The backup chain metadata file is also
stored in that folder as the .VBM file.
By default, log backups retention policy is set to keep the number of restore points in accordance with
the corresponding image-level backup of SQL Server VM. This allows you to have both image-level
backup and all the necessary log backups at hand when you need to restore your database from VM
backup to a desired state – database will be restored to the closest point before selected moment, and
transaction log replay will then bring it to the desired state.
When a database restore point is removed due to VM backup retention settings, the corresponding
chain of log backups is removed, too.
Another option allows you to keep only last <N> days. This retention setting can be used, for example,
if you plan to save on storage space, saving log backups for the last few days – to be able to restore to
some recent database state.
Important!
If using this option, make sure that your SQL Server backup retention and log retention policies are
consistent, so that corresponding restore point is always preserved - otherwise the log replay will not
be possible due to the database files missing.
How It Works: SQL Server Database Restore
Veeam Backup & Replication supports several methods of SQL Server restore from the backup. They
are based on Veeam’s patented vPower technology that allows you to run a VM directly from a
compressed and deduplicated backup file, eliminating the need to extract the backup and copy it to
production storage. Instead, Veeam exposes the VM files in a backup repository through a disk mount.
Local disk space is used as a temporary write area while the VM is running from the backup. This
approach is used to carry out the whole VM restore with Instant VM Recovery, Full VM Restore, as well
as to perform VM disk recovery or file-level restore of the guest OS (see
http://helpcenter.veeam.com/backup/80/vsphere/index.html?data_recovery.html for more
information on restore options).
Starting with v8, Veeam Backup & Replication offers a new tool to extend the set of restore options–
Veeam Explorer for Microsoft SQL Server that is installed together with Veeam backup server as a part
of Veeam setup. This tool helps you to restore databases from the SQL Server image-level backup to
the original or different location, without a need to recover the whole server VM. The basic restore
procedure includes the following steps:
15 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
1.
The backup administrator uses Veeam Backup & Replication restore options to extract
database files from the SQL Server's backup through mounting it to Veeam backup server.
2.
Veeam Explorer for Microsoft SQL Server obtains SQL Server hierarchy information (instances
and databases) and presents it to user, facilitating browsing of the hierarchy. A user selects
and follows the necessary database restore scenario. Veeam Explorer for Microsoft SQL Server
supports several scenarios that are similar for database restore and export:
•
Restore/export to current restore point (the one currently mounted to Veeam backup
server)
•
Restore/export to selected point in time
•
Restore/export to the state before selected transaction.
The first scenario involves target SQL Server only; others involve target and staging SQL Servers, as
follows:
Restore scenario
To point in time
To point in time
To selected
transaction
Staging SQL Server
Not involved
Yes (presents
log to user)
Yes
Yes (presents log
to user & for log
replay)
Target SQL Server
Yes (for log
replay)
Yes (for log
replay)
Not involved
Not involved
3.
Note:
To selected
transaction
Export scenario
Finally, the database is ‘re-created’ on the target Microsoft SQL Server and becomes ready for
use. If the export scenario was used, the exported database can be then attached to the SQL
Server you need.
For more information, refer to
http://helpcenter.veeam.com/backup/80/explorers/index.html?vesql_hiw.html.
16 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Address Recovery Requirements
Veeam supports several recovery scenarios and offers flexible options for them. To choose a scenario,
consider your organization’s policies and requirements and decide on the following:
1.
Will you need to recover your database to the moment when the certain Microsoft SQL Server
VM restore point (backup or replica) was created, or to any point in time, maybe within the
interval between two restore points?
In the latter case, database will be restored to the closest VM restore point before the
moment you specify, and then transaction log replay will bring the database to the necessary
state. So, you will need to enable backup of Microsoft SQL Server transaction logs in the
backup job settings.
2.
Should you support more granular recovery and be able to roll back your databases to a state
before undesired transaction?
For the most granular restore, you will need to enable backup of the transaction logs and
ensure the staging SQL Server availability and proper configuration.
3.
Do you plan to restore your database to the original Microsoft SQL Server, or to a different
server?
Make sure that Veeam can communicate with target server over the network, and check that
account you plan to use for restore has sufficient permissions. Also, check for proper target
SQL Server version (later version database cannot be restored to earlier version server).
4.
Should you maintain database restores by yourself, or will you delegate restore rights to
another user (group of users)? In the latter case, it is reasonable to use Enterprise Manager
functionality for delegated restores of application items.
To implement the necessary scenario, you should, in particular, do the following:
1.
2.
3.
Decide on the required level of restore granularity and configure the necessary SQL Server
VM backup job settings
Use the appropriate SQL Server VM file-level recovery option when choosing VM’s restore
point
Provide user account (under which Veeam Explorer for Microsoft SQL Server will be launched)
with sufficient rights on target SQL Server
Plan for Recovery Verification
Veeam Backup & Replication automates and simplifies backup verification process, which is one of the
most crucial parts of data management and protection. Using Veeam technologies, you can start the
VMs directly from the backups in a fenced-off environment and perform reliability and availability
testing as a routine part of the backup process.
Generally, to perform recovery verification testing of your SQL Server backup, you will need to create:
1.
An application group required to verify full functionality of backed up VM
2.
An isolated virtual lab where VM should be tested
3.
A recovery verification job (SureBackup job)
For detailed information on SureBackup recovery verification, refer to the corresponding Veeam
Backup & Replication User Guide:
•
for VMware platform:
http://helpcenter.veeam.com/backup/80/vsphere/index.html?surebackup_verification.html
•
for Hyper-V platform:
http://helpcenter.veeam.com/backup/80/hyperv/index.html?surebackup_verification.html
This process involves several types of resources, so to plan for them properly, in particular, in VMware
environment, consider these recommendations.
17 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
SETTING UP YOUR SQL BACKUP JOBS
This section describes how to set up your SQL Server backup job in Veeam Backup & Replication
console; to modify job settings, you can also use Veeam Backup Enterprise Manager (if deployed in
your organization), as explained in its User Guide.
Objects to Process
When deciding on the virtualized SQL Server(s) to be included in the image-level backup (‘parent’) job,
consider the following:
•
•
All databases of a single SQL Server instance will be processed sequentially, one by one - to
minimize load on the SQL Server guest OS.
If you want the log backup (‘child’) job to skip certain database (that is, exclude it from log
processing workflow), you can set this database recovery model to simple.
For SQL Server 2012 and later, Veeam Backup & Replication supports backup and recovery for
AlwaysOn Availability Groups (as described later in this document).
Note:
AlwaysOn Availability Group requires that the SQL Server instances reside on Windows Server Failover
Clustering (WSFC) nodes.
Application-Aware Processing
To configure transaction log handling settings, do the following on the Guest Processing step of the
backup job wizard.
1.
2.
Select the Enable application-aware processing check box.
In the Guest OS credentials section, specify the account that will be used to perform the log
handling operations on guest operating system of the SQL Server VM, including truncation
and backup (i.e. shipment to repository).
Make sure the account has sufficient permissions:
•
•
Note:
For log backup, this account should have the sysadmin server role assigned on
that SQL Server VM.
For truncation of SQL Server 2012 or SQL Server 2014 database transaction logs,
this account should have the db_backupoperator database role (minimal
required) or the sysadmin server role.
If log truncation with the specified account is not a success, Veeam will try to perform it using NT
AUTHORITY\SYSTEM account, so for SQL Server 2012 or SQL Server 2014 make sure that it has
sufficient rights (see this Veeam Knowledge Base article for more information).
As for SQL Server 2005, 2008 and 2008 R2 database transaction logs truncation– in these versions,
default settings allow for log truncation by local SYSTEM account; however, if they were modified,
make sure this account is permitted to truncate logs.
18 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
3.
4.
Note:
Then click the Application button, select the SQL Server VM in the list of processed
machines, and click Edit to open its processing settings.
On the General tab, in the Application section, select Require successful processing
(recommended) option – this will instruct Veeam to stop the backup process if any VSS
errors occur during application quiescence.
If you want to continue the backup process even if VSS errors occur, you can select Try application
processing but ignore failures – this option is recommended to guarantee completion of the job;
however, the created backup image will be only crash-consistent.
19 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Transaction Log Handling
To configure transaction log handling settings, in the Transaction log section on the General tab
make sure you have selected the Process transaction logs with this job options.
Note:
If you want Veeam Backup & Replication to create COPY-ONLY backups, select Perform copy only
(lets another application use logs).
Then the SQL tab will become available to you. Veeam supports the following options:
•
Important!
Truncate logs (prevent logs from growing forever) – with this option selected, Veeam
Backup & Replication runtime process responsible for coordination of application-aware
activities will wait for the backup to complete, and then it will trigger truncation of
transaction logs (using VSS). If truncation of transaction logs is not possible for some reason,
the logs will remain untouched in the VM guest OS until the next start of the Veeam runtime
process.
If selected, this option will allow you to restore your database to the specified restore point only;
restore to the certain point in time or to the state prior to specific transaction will not be possible.
Also, remember that Truncate logs option requires that user account under which Veeam will access
guest OS (and, correspondingly, transaction logs) should have sufficient permissions — see the
Application-Aware Processing section above for details.
•
Do not truncate logs (requires simple recovery model) – with this option selected, Veeam
will preserve logs (if any) on the original SQL Server. Nor they will be truncated, neither
backed up by Veeam Backup & Replication. Thus, if you use this option, your database
administrator will have to take care of database logs. Applicable restore scenario – database
restore to the state as of currently selected VM restore point.
•
Backup logs periodically– with this option selected, Veeam Backup & Replication will
periodically ship transaction logs to the backup repository and store then with SQL Server VM
backup.
This backup option will allow you to use any restore scenario: to the state as of VM restore
point, to the certain point in time, or to the state prior to specific transaction. The process of
transaction log shipment is described in detail in the next section. You can also specify how
20 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
often Veeam will process these transaction logs, uploading them to repository, set the
retention and specify preferred log shipping server for data transfer.
Please be aware that in some situations transaction log handling options – Truncate logs or Backup
logs will not be applied to SQL Server VM, and corresponding operations will not be performed. This
can happen in the following cases:
•
Transaction logs created for this SQL Server databases for the last 7 days were backed up by
another job that exists on Veeam backup server
-OR-
•
Note:
At the moment, this SQL Server VM is being processed by another job that is performing log
backup but has not placed these logs into backup repository yet
Under such circumstances, transaction logs will not be truncated for this SQL Server DBs (in both
cases).
Log Shipping Server
For each SQL Server VM guest OS, Veeam Backup & Replication defines the way it will transport log
backup files to the backup repository. Two transport types are supported:
•
•
Direct data transfer between the VM guest OS and repository. This is a recommended
method as it does not involve additional resources and puts less load on the VM guest OS.
Alternatively, if it is not possible to establish direct connection, you can configure Veeam
Backup & Replication to use a Microsoft Windows host added to the backup Infrastructure as
a log shipping server. You can select server(s) from the list, or instruct Veeam Backup &
Replication to automatically choose an optimal log shipping server from the Managed
Servers (that is, added to backup infrastructure in Veeam backup console). The choice will be
based on two criteria: possible data transfer method(s) and network availability.
21 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Possible data transfer methods for log shipping server are:
•
•
Network – this is a default method which can be used for both platforms. It uses the VM guest
OS to obtain files and then transfer them over the network. To offload the VM guest OS, logs
are created one by one (not simultaneously); 1 log creation request is created for every DB.
VIX - this method can be used for VMware VMs only. It allows you to obtain guest files
bypassing the network. In this case, for each SQL instance, 1 log creation request is created
for all DBs (grouped by instance).
Network availability criteria are based on the location of the Microsoft Windows host and VM guest
OS. Otherwise, Veeam Backup & Replication detects if any of the following is applicable to the
Microsoft Windows host:
A. Microsoft Windows host is located on the same ESX(i) host as the VM guest OS.
B.
Microsoft Windows host and the VM guest OS are in the same sub-network
C.
Microsoft Windows host and the VM guest OS are in different sub-networks (the production
infrastructure is isolated from the backup infrastructure).
So, when choosing as log shipping server for log transfer, top priority goes to the Windows host “A”
that supports the Network data transfer mode.
Important!
You may not want some of your busy managed hosts to participate in the process – if so, use manual
server selection when assigning the role of log shipping servers. It is also recommended that you have
not only one dedicated Windows host for log shipment, but also a redundant host for availability
purposes.
Veeam Backup & Replication automatically re-detect available hosts, so if a log shipping server fails for
some reason, processing will be performed by another server.
Scheduling
To prevent a backup job from overlapping with production hours and ensure it does not provide
unwanted overhead on your virtual environment, you can schedule SQL Server VM backup to run
during off-peak hours, or configure a specific backup window -a period of time on week days when
backup jobs are permitted to run. If the job exceeds the allowed window, it will be automatically
terminated.
22 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
With a scheduled SQL Server VM backup job, transaction log backup job runs permanently in
background. By default, logs are backed up to repository every 15 minutes. You can modify this
setting on the SQL tab:
Consider the following when you set up log backup interval:
•
•
•
Log processing for a database will not start until the last log for the previously processed
database has been moved away from the VM guest OS.
It is recommended to set up log backup frequency with respect to actual time required to
transfer log data to repository. Otherwise, you will be getting an error message in the job
session data, and SLA misses will be also reported in job statistics. For example, if you set up
the job to backup logs every 5 minutes, but actually the process takes 15 minutes, the SLA
will be missed 2 times.
You can also use network and repository traffic throttling capabilities.
Support for AlwaysOn Availability Groups
AlwaysOn Availability Groups allow you to increase fault tolerance between active and hot-standby
databases without involving shared physical disks, which is quite important for virtualization of SQL
Servers. Starting with version 8.0, Veeam Backup & Replication supports AlwaysOn Availability Groups
for virtualized SQL Server 2012 and later.
Image-level Backup of SQL Server VM
During image-level backup of an SQL Server VM, Veeam requests and analyzes information about
databases that are included in the AlwaysOn Availability Groups. Depending on the retrieved
information, a VSS snapshot will be created with or without COPY_ONLY flag: the VSS_BS_COPY flag
for VSS snapshot is triggered if the VM represents a secondary node for at least one AlwaysOn
Availability Group (and this group is not in the Resolving state).
Veeam Backup & Replication also detects what cluster the database belongs to. If the backup job does
not include all VMs from the cluster, a warning message will be issued.
Retrieved information is saved for further log identification.
23 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Transaction Log Backup
Transaction log backup can be performed only for those databases that were successfully backed up
with the corresponding settings, either on the primary or on the secondary node of AlwaysOn
Availability Group.
Transaction logs processing interval may be the same, or may differ through the VMs included in
AlwaysOn Availability Group –in the latter case, Veeam Backup & Replication will use minimal value
(default is 15 min).
At each log processing interval, Veeam Backup & Replication chooses the AlwaysOn Availability Group
node for which transaction logs will be backed up.
Note:
Logs are backed up for the only one AlwaysOn Availability Group node selected.
To become a subject for log backup, the node must meet the following criteria:
•
Required Veeam components can be installed on that node (in particular, the VM must be
running)
•
If there are any logs remaining in the temporary folder on that node of AlwaysOn Availability
Group, this means they were not backed up to the destination repository during the previous
log backup session, so this node must be processed first.
•
Databases in the AlwaysOn Availability Group(s) for that node were successfully backed up
(for the last two processing intervals).
•
Node should be available over the network (preferred data transfer method) or via VIX (for
vSphere platform).
•
The VM should be included in the list of preferred nodes (for backup) retrieved from SQL
Server. If there are no preferred nodes, then any node can be chosen.
24 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
MANAGING YOUR SQL BACKUP JOBS
Starting, Stopping, Enabling and Disabling the Job
As explained above, with log backup switched on, SQL Server backup job comprises 2 jobs:
1.
‘Parent’ job, which performs image-level VM backup and is explicitly created and named by
user as <job_name>, for example, MyTestJob
2.
‘Child’ job, which performs transaction log processing and is named automatically using SQL
Backup suffix: <job_name> SQL Backup. So, for our example it will be MyTestJob SQL Backup
Child job is created by Job Manager if it detects that there is a parent job, scheduled to
backup at least one SQL Server VM, with application-aware image processing enabled.
Parent job session starts on schedule or is started manually by user; child job (transaction log
processing) follows it - to ensure that full backup is periodically created, and log backups then will be
of use to restore the VM to the required state. Child job (transaction log processing) runs permanently
in background with the specified interval. It can be stopped or disabled under certain conditions.
Starting
Important!
•
Image-level backup job (‘parent’) can be started automatically upon schedule or manually
when you click Start on the toolbar.
•
Log backup job (‘child’) is initially started when you enable schedule for ‘parent’ image-level
backup job, and then it works continuously in the background, with new session beginning
each time the ‘parent’ job is started.
For ’child’ job to run, the ‘parent’ job must be enabled and have its schedule configured for automatic
job runs. If schedule is disabled, and you force image-level SQL Server backup job start manually by
clicking Start, no log processing will be performed for SQL Server.
Stopping
Note:
•
If you need to stop transaction log processing for all VMs included in the parent job (SQL
Server VM image-level backup), select this parent job and use the Disable command from the
ribbon or shortcut menu. You can also clear Run the job automatically check box in the job
properties.
The Job Manager instructs the child job to complete the remaining steps of log processing for
all VMs included in the parent job, and changes the status of both jobs to Disabled (no restart will be performed after that).
•
To re-activate transaction log processing for all VMs in the parent job, clear the Disable
property for that parent job in its shortcut menu, or release the Disable tool button on the
toolbar.
•
If you need to disable log processing for specific VM, go to the job settings and switch log
backup off for that VM on the SQL tab of the VM Processing Settings dialog.
•
If you need to manually stop both image-level and log backup jobs, then use Stop command
from the toolbar or the parent job’s shortcut menu, and then Disable parent job.
•
Instant Stop is also performed for both jobs when the Veeam Backup service is stopped, for
example, during the upgrade.
Transaction log processing job state is also changed to Disabled when all VMs’ processing intervals
are over, or when the backup of SQL Server VM is started.
To delete both jobs from configuration, select SQL Server VM backup (parent job) and use the Delete
command from the ribbon or shortcut menu. Child job(s) will be deleted automatically.
25 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Viewing Job Information
You can view summary information on the latest SQL Server VM and transaction log backup sessions
under the Last 24 hours node in the Backup & Replication view.
Information on all sessions of both jobs is available in the History view, with the Jobs > Backup node
selected in the tree on the left:
Information is presented in the following way:
•
SQL Server VM image-level backup (parent job) sessions are displayed with the <job_name>
as Job Name and Backup as Session Type.
•
Database transaction log backup (child job) sessions are displayed with the <job_name> SQL
Backup as Job Name and SQL Log Backup as Session Type.
In the Backup & Replication view, you can view summary information on the image-level and log
backups created by these jobs: for that, select the Backups node in the navigation tree, and expand
the parent job in the working area on the right:
Under the job node, you can find information on the Transaction log backup, including:
•
The last backup creation time
•
The number of restore points for transaction log of all SQL Servers for which the logs were
backed up by this job
•
Destination repository where log backups were stored
•
SQL Server (as the Platform of the job)
26 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
You can also view statistics and reports separately for image-level and log backup jobs. To see the
latest session data, use the Backup & Replication view, and under the Jobs node select the SQL
Server backup job you need.
•
To view SQL Server VM backup session data, select Backup Statistics from the job’s shortcut
menu or Statistics from the ribbon menu.
•
To view SQL transaction log backup session data, select SQL Statistics from the job’s shortcut
menu, or from the ribbon menu.
To examine previous sessions, use the History view, select the necessary job and click Statistics on
the ribbon. Detailed description of statistics information is provided in the Appendix.
Tip
If you have Veeam ONE deployed in your environment, you can also generate the “SQL Backup Job
Historical Information” report described at
http://helpcenter.veeam.com/one/80/reports/index.html?sql_backup_job_information.html.
Log Backup Import
Import of log backups without VM backups is not supported (as there will be no restore point). You
can either import .VBM file (database and log backup), or import .VBK file (VM backup) – Veeam will
browse for corresponding log backups and import them, too.
Also, consider that .VLB files cannot be copied to DR site by your backup copy job.
27 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
RESTORING SQL SERVER DATABASES
To recover an SQL Server database with Veeam, you do not need to fully restore and start the virtual
machine hosting the SQL Server. Instead, Veeam Backup & Replication data recovery functionality is
used to mount the selected restore point (image-level backup or replica) of Microsoft SQL Server VM
to Veeam backup server, and then you select how you want your database to be restored.
1.
You can use Veeam Explorer for Microsoft SQL Server that supports three scenarios:
•
•
•
Note:
This tool is described in detail in the sections below and in the Veeam Explorers Series document.
2.
Note:
Authorized restore operators can recover the necessary databases using Veeam Backup
Enterprise Manager. Two scenarios are supported:
•
Restore database to the original or different location, to the state as in the selected
restore point of SQL Server VM.
•
Restore databases to selected point in time.
For details on configuring and using Enterprise Manager, refer to its documentation at
http://helpcenter.veeam.com/backup/80/em/.
3.
Note:
Restore database to the original or different location, to the state as in the selected
restore point of SQL Server VM.
Restore database to the selected point in time.
Restore database to the state prior to undesired transaction.
Finally, users can utilize Veeam Application-Item Restore wizard (U-AIR) to configure a
request for database recovery to selected restore point (backup or replica), as well as for
recovery of a table or a query result. Three scenarios are supported:
•
Restore database schema objects from backup into production database by running
automatically created scripts.
•
Restore database tables to the production database, or save them to the specified
location.
•
Execute a custom query against the database from the backup to restore specific
data back to the production Microsoft SQL Server database or save it as data files to a
specific folder.
For details on using AIR wizard, refer to U-AIR documentation at
http://helpcenter.veeam.com/backup/70/uair/index.html?uair_sql.htm.
The next sections will give you several recommendations on how to carry out the restore procedure
using Veeam Explorer for Microsoft SQL Server; Enterprise Manager capabilities will be also covered in
brief.
28 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Preparing for Database Restore
Before starting SQL Server database restore process, you should take preparatory steps and check the
corresponding prerequisites.
Step 1: Check Required Ports
The following network ports must be opened to ensure proper communication of the Veeam backup
server with the VM guest OS system during application-item restore.
From
Veeam
backup
server
To
Microsoft
SQL VM
guest OS
Protocol
TCP
Port
1433,
1434
and other
Notes
Port used for communication with the
Microsoft SQL Server installed inside the VM.
Exact port numbers depends on configuration
of your Microsoft SQL Server. To learn more,
see http://msdn.microsoft.com/enus/library/cc646023.aspx#BKMK_ssde.
Now we will discuss what you will need to perform SQL Server database restore by means of Veeam
Explorer for Microsoft SQL Server.
Step 2: Prepare Staging SQL Server
To restore or export database to the state as of the current restore point (that is, as of in the VM
backup which is currently mounted to Veeam backup server), no extra configuration is needed.
However, as described in the How It Works section, to support other scenarios, Veeam Explorer for
Microsoft SQL Server needs a staging Microsoft SQL Server. In particular, it is required for the following
operations:
•
Restore to the state before selected transaction
•
Export to selected point in time
•
Export to the state before selected transaction
By default, local Microsoft SQL Server deployed with Veeam backup server is used for that purpose.
To specify another staging server:
Important!
1.
Launch Veeam Explorer for Microsoft SQL Server, open main menu and click Options.
2.
Select a local SQL Server instance from the list.
Remember that your staging system must be a local instance of the SQL Server (the one where Veeam
backup server and Veeam Explorer for Microsoft SQL Server are installed) and must have the same or
later version as the original SQL Server.
Step 3: Check User Account Permissions
Check the following permissions and contact your database administrator if necessary:
1.
User account that you specify for guest processing of the Microsoft SQL Server VM in the
backup job should have the sysadmin fixed role assigned on that SQL Server (otherwise, no
database content will be visible in Veeam Explorer). See also this Veeam KB article.
2.
The account used to run Veeam Explorer for Microsoft SQL Server should have sufficient
permissions for the folder where you plan to export the database files: Read and Write are
minimal recommended.
3.
The account you will use to access the target Microsoft SQL Server where database will be
restored needs sysadmin fixed role on that server.
4.
The account you plan to use for connection to the Windows machine (where database log
backup files will be copied for further log replay) will need sufficient permissions to access the
29 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
administrative share on that machine: Read and Write are minimal required. For restore
scenarios, that machine is your target SQL Server.
If you plan to delegate rights to perform database restore operations to personnel in charge, you need
to assign an Enterprise Manager role to them and configure its settings accordingly:
1.
Log in to Enterprise Manager with administrative rights, go to Configuration tab.
2.
To create a role for restore operator, follow the steps described in the Configuring Security
Settings section of the Veeam Backup Enterprise Manager User Guide.
3.
To allow for database restore, make sure the Microsoft SQL Server databases checkbox is
selected for restore operator’s account in the Account dialog:
Authorized users will be able to log in to Enterprise Manager and to access the Items tab with
database restore commands and options.
Step 4: Examine Considerations and Limitations
1.
Currently, remote SQL Server instance cannot be used as a staging system; only local
instances are supported.
2.
If you are using SQL Server Express edition (for example, SQL Server 2012 Express included in
Veeam setup) as a staging system, consider that databases that exceed 10 GB cannot be
attached to this SQL Server due to Express edition limitations (http://msdn.microsoft.com/enus/library/cc645993(v=SQL.110).aspx). If you plan to recover large databases following a
scenario that requires a staging server, then it is necessary to configure a fully functional
commercial version of Microsoft SQL Server as a local staging system.
3.
By default, system databases (Master and others) are excluded from Veeam Explorer restore
workflow. These databases can be restored using file-level restore, as described in the Veeam
Backup & Replication User Guide
(http://helpcenter.veeam.com/backup/80/vsphere/index.html?performing_guest_restore.ht
ml).
4.
Currently, point-in-time restore from replica VM is not supported.
5.
If you plan to restore an encrypted database using Veeam Explorer for Microsoft SQL Server,
consider information provided in this Knowledge Base article.
Step 5: Recover Database Files from SQL Server Backup
You can use any Veeam Backup & Replication restore option to recover database files from the SQL
Server's backup. This can be done automatically through a wizard, or manually – in the latter case, you
30 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
should then add the database to Veeam Explorer scope. Refer to the Recovering Database Files from
VM Backup and Adding Database to Veeam Explorer Scope section of Veeam Explorers guide for
details.
Following Your Restore Scenario
Restoring To Current State (as of Selected VM Restore Point)
If you plan to restore a database using this scenario, consider that you will need an applicationconsistent image-level backup (or replica) of your SQL Server VM, successfully created by Veeam
backup (or replication) job. Remember that:
•
Any logging and recovery model can be set for this database
•
In the Veeam job settings, the Enable application-aware image processing check box
should be selected in Guest Processing options:
•
On the General tab of the advanced guest processing settings dialog, the following options
should be selected:
o Require successful processing (recommended) – in Applications section
o Process transaction logs with this job (recommended) – in Transaction logs
section
31 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
•
Any transaction log handling option can be selected on the SQL tab.
Refer to the
http://helpcenter.veeam.com/backup/80/explorers/index.html?vesql_bu_job_settings.html to learn
more.
Also, consider that such a scenario has 2 options:
1.
Restore to the original location
2.
Restore to custom location
Restore to Original Location
Use 1-Click Restore if you need to quickly restore a database to the original location (that is, the SQL
Server instance that was originally hosting the database).
Restore process will be performed with the following settings:
Important!
•
Database will be restored to the current restore point (that is, to the moment when currently
mounted backup or replica of SQL Server VM was created).
•
Database will be restored to the original VM (files will be copied to the original location and
then attached to the original SQL Server instance).
•
By default, Veeam will first use current user credentials and Windows authentication method
to connect to target SQL Server. If these credentials are insufficient, then Veeam will try using
the account specified for guest OS access in the SQL Server backup job settings. If it does not
suit either, you will be prompted to enter the credentials manually.
The account used for connection to SQL Server should have administrative rights on that server.
To launch 1-Click Restore from Veeam Explorer, select the required database in the navigation tree on
the left, then select Restore Database > Restore <current_state_date> to <server>\<instance>
from the toolbar or from the node’s shortcut menu:
32 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
You can also restore multiple databases at once – for that, select the required server or instance in the
navigation tree on the left, then:
•
If restoring multiple databases of the selected SQL Server, select Restore <current_state> to
<server_name> - in this case, all databases will be restored to corresponding instances on
that (original) server.
•
If restoring multiple databases of the selected instance, select Restore <current_state> to
<server_name>\<instance_name> - in this case, all databases will be restored to the
specified instance on the original server.
If you are to launch 1-Click Restore in Enterprise Manager:
1.
Log in to Enterprise Manager with sufficient rights, then on the Items tab click SQL.
2.
Enter the name of SQL Server hosting the database you need to restore; use the
server_name\instance_name format. Alternatively, click the link to pick server from the list
of available SQL Server VM backups.
3.
Select the database you need and click the Restore button.
Restore to Custom Location
To restore database to the state as of in currently selected restore point, but to a server different from
the original, follow the steps described in this section of Veeam Explorers document.
33 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Restoring to Specific Point in Time
This scenario allows you to recover your database to specific point in time (which may differ from
current SQL Server restore point). Database will be recovered to the closest VM restore point before
the moment you specify, and then transaction log replay will be performed on the target server to
bring the database to the necessary state. So, to implement this scenario, ensure the following:
1.
SQL Server transaction logging is enabled - logging and recovery model must be set to full or
bulk-logged.
2.
Transaction log handling in the SQL Server VM backup job settings had been configured to
keep log backups: the Backup logs option should be selected.
3.
You have SQL Server application-aware backup created successfully.
In such a scenario you can also choose to restore to the original or different location.
Notes:
•
To restore via Veeam Explorer, follow the instructions provided in Veeam Explorers
documentation.
•
To restore via Enterprise Manager, follow the instructions provided in Enterprise Manager
documentation.
Point- in-time restores from replicas and backups created with Backup Copy jobs are not supported.
Point-in-time-restores are not supported for Hyper-V VMs which were backed up with VSS copy_only
option enabled.
Restoring to State Before Selected Transaction
This scenario offers the greatest granularity of the database recovery: you can select the undesired
operation from the list of database operations (available for the time period you have specified) – for
example, user deletion. The database will be restored to the state prior to the transaction containing
the specified operation, using log replay on target server.
A list of SQL database operations and their display names as presented to user for selection when finetuning database restore is provided in the Appendix of Veeam Explorers document.
Note:
This restore scenario can be implemented only using Veeam Explorer for Microsoft SQL Server –
Enterprise Manager does not support restore to the state before transaction.
To implement such a scenario, check the following:
1.
SQL Server transaction logging is enabled - logging and recovery model must be set to Full
or Bulk-logged.
2.
Transaction log handling in the SQL Server VM backup job settings had been configured to
keep log backups: the Backup logs option was selected.
3.
You have SQL Server application-aware backup created successfully.
4.
All nodes of the same AlwaysOn Availability Group (if applicable) are located in the same time
zone.
Then follow the instructions provided in the Restoring a Database to Specific Transaction section of
Veeam Explorers document.
Note:
Under certain circumstances, restore to the state before selected transaction may fail with the “The
specified STOPAT time is too early” error when the restore is performed from secondary node of
AlwaysOn availability group. As a workaround, perform restore from the primary node.
34 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
APPENDIX. STATISTICS ON TRANSACTION LOG
PROCESSING
In the detailed statistics window of the SQL transaction log backup, you can examine the overall
statistics of logs backup (child job), as well as per-VM information.
Overall statistics on log backups for all VMs included in SQL Server image-level backup job (‘parent’) is
displayed in the upper part of the statistics window.
The Last period (all VMs) section contains statistical data for selected session of this image-level
backup job.
In the Databases column, you can view the following information:
Note:
•
Protected – number of databases that were backed up at least once during the last session
•
Unprotected – number of databases that failed to back up during the last session
•
Excluded – databases excluded from processing. This may be due to any of the following
reasons: registry key value (list of exclusions), database status is Offline, database recovery
model is set to Simple, database is read-only, database was deleted after the latest full
backup.
Unprotected databases do not comprise Excluded, as they have different reasons for being nonprocessed.
35 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
In the RPO column, you can view the following information:
•
SLA value – how many log backup intervals completed in time with successful log backup
(calculated as % of total number of intervals)
•
Misses – how many intervals were missed (number of intervals)
•
Max delay – actual difference between configured log backup interval and time actually
required for log backup. If exceeded, a warning is issued.
In the Status column, the following information is displayed (per job): number of VMs processed
successfully, with warnings or with errors.
The Latest session section includes the following information for the selected VM for the latest log
processing interval:
•
Duration – duration of log shipment from guest to repository by now since the start of
current log processing interval
•
Bottleneck – the operation with greatest duration in the last completed interval; this can
happen due to the following:
Reason (displayed name)
Slowing-down operation
Log backup
Saving .BAK files to a temporary location on VM guest file
system
Network
Uploading log files to log shipping server
Target
Saving files to target repository
•
Read — amount of data read from temporary folder on VM guest
•
Transferred – amount of data transferred to target repository
The Last period section includes the following statistics of log backups per VM for the latest sequence
of log processing intervals (that is, log backup job session).
•
The RPO column includes statistics on log processing interval (calculated as described above)
•
The Sessions column includes statistics of log backups per VM, calculated as follows:
•
•
Note:
o
Success – number of intervals when all database logs were backed up successfully
o
Warning – number of sequential intervals with failed log processing (if not more
than 4 intervals in a sequence)
o
Errors – number of sequential intervals with failed log processing (more than 4
intervals in a sequence)
The Duration column includes the following information:
o
Average – average duration of log data transfer (through all intervals in the session)
o
Max – maximal duration of log data transfer (through all intervals in the session)
o
Sync interval – duration of periodic intervals specified for log backup in the parent
job settings (default is 15 min)
The Log size column includes the following information:
o
Average – average amount of data (through all intervals) read from VM guest
o
Max – maximal amount of data (over all 15-min intervals) read from VM guest
o
Total – total amount of data written to repository
Statistics on transaction log processing is updated periodically, simultaneously for VM and for the log
backup job.
36 | How to Backup and Restore SQL Server Databases with Veeam | Rev.1
Download PDF
Similar pages