Download presentation
Published byEugenia McCarthy Modified over 7 years ago
1
Backups for Azure SQL Databases and SQL Server instances running on Azure Virtual Machines
Session on backup to Azure feature (manual and managed) in SQL Server 2014 to provide a cost effective DR and best practices around the same Chandra Mohan Situmalli
2
Sponsors Main Sponsor Gold Sponsors
3
Agenda Cloud backup benefits Pre-requisites
Backup to Windows Azure tool SQL Server Backup to URL SQL Server Managed Backup Azure SQL Database backup Copy/Export Geo-replication
4
Azure blob service backup benefits
Flexible, reliable, and limitless off-site storage Better alternative to the often used tape option to archive backups No overhead of hardware management Bypass the 16 disk limit on Windows Azure Virtual Machine Backups become available to on-prem and other Azure VMs Cost Benefits: Pay only for the service that is used Remote Accessibility
5
Pre-requisites Create a storage account Create a blob container
A container provides a grouping of a set of blobs Create a credential A container provides a grouping of a set of blobs
6
Backup to Windows Azure Tool
7
Backup to Windows Azure Tool
Features: Three step wizard Redirect the backups Can backup from Azure VM and/or on-premises databases Benefits: Support for backups to Windows Azure Storage for older SQL Server versions Encryption support for older SQL Server versions Compression support for older SQL Server versions Supported platforms and pre-reqs: SQL Server 2005 and later on Windows 2008/ Windows 7 or later A Windows Azure Blob Storage Container
8
Demo: Backup to Windows Azure Tool
9
Backup to Windows Azure Tool – Remember..
It does not run the backups Does not provide for scheduling, error tracking or logging of the backups No retry logic built into the tool Turn off SQL Backup compression on the databases that you want to compress with the tool New backup will create a new backup file Creates .bak, .enc (if encrypted), .gz files (if compressed and not encrypted), .data files (if no options are selected)
10
BACKUP TO URL
11
Backup to URL Available in SQL Server 2012 SP1 CU2 (T-SQL) or later
Backup database to Azure Blob Storage service The maximum backup size supported is 1 TB You can issue backup or restore statements by using TSQL, SMO, or PowerShell cmdlets, and SSMS (SQL 2014) Appending to existing backup blobs is not supported Backup to multiple blobs in a single backup is not supported
12
Backup to URL – Demo
13
Best Practices Use unique file names
Set container access level to private Location of storage account and VMs Housekeeping Enable backup compression especially for large DBs Backup/restore times are proportional to network bandwidth/latency – especially for large DBs
14
MANAGED BACKUPs
15
Managed Backups Available in SQL Server 2014 or later
SQL Server Manages backups to Windows Azure Can be configured at the database or at instance level Supports SQL Server on-premises or Windows Azure virtual machine
16
Managed Backups - Benefits
No elaborate backup planning required. Just need the storage location and the retention period Setting at instance level will apply to all the databases created thereafter Can be overridden at the database level too Backups can be encrypted Built-in intelligence And the advantages of Azure backups..
17
How it works? Stores the metadata in the msdb database
Uses system jobs to write full, transaction log backups (Agent should be running..) System stored procedures and system function for enabling, configuring, and monitoring retrieving existing configuration settings, parameter values, and backup file information Extended events are used to surface errors and warnings Alert mechanisms are enabled through SQL Agent jobs and SQL Server Policy Based Management Containers are created in machinename-instance name format Workload of the database determines frequency of backups
18
Limitations.. Supports Full and Log Backups only
Operations are currently supported using Transact-SQL System Databases are not supported Windows Azure Blob Storage service is the only supported backup storage option Maximum file size allowed for a Page Blob in is 1 TB Only databases set to Full or Bulk-logged model are supported
19
Managed Backup – Demo
20
Azure SQL Database BACKUP
21
Azure SQL Database Backup
Available on Basic, Standard, and Premium service tiers Automatic Backup schedule: 1 full backup / week 1 differential backup / day 1 log backup / 5 minutes Most recent Full and differential backups are copied to blob storage and these blobs are geo redundant
22
Restore Options Service Tier Geo-Restore
Self-Service Point in Time Restore Backup Retention Period Restore a Deleted Database Web Not supported n/a Business Basic Supported 7 days √ Standard 14 days Premium 35 days
23
Point in Time Restore Recover a database to a specific point in time (to the same server) Make sure you have available quota on the logical server to create another database Deleted databases can be restored to the point in time at which it was deleted
24
Point in Time Restore Restoring creates a new database
To the same service tier that was in use at the chosen restore point To the lowest performance level supported by that tier On 1st Dec 2014 – database was premium with P2 performance On 2nd Dec 2014 – database downgraded to Standard On 3rd Dec 2014 – database restored to 1st Dec 2014 Restored database will be Premium with P1 performance level Time to restore depends on the size of the database and the length of the log chain sys.dm_operation_status - Returns information about operations performed on databases in a Azure SQL Database server
25
Demo: Point in time restore
26
COPY And export
27
Copy and Export Database Copy Export
Creates a copy of the database in a asynchronous operation Transactionally consistent with the source Monitor the copy process with the sys.dm_database_copies, sys.databases views, sys.dm_operations_status Copied database created with the same service tier and performance level Performs an individual bulk copy of the data from each table in the database Transactional consistency not guaranteed The .bacpac files in the storage account can be used for importing to create new databases Automated export: First creates a copy of the database and then exports to .bacpac files
28
Demo: Copy, Export, Automated Export
29
GEO replication
30
Geo-Restore Geo-restore is similar to point-in-time restore
Automatically available with basic, standard, and premium databases Uses the most recent daily backup of your databases in a different geographical location Useful, if the application can tolerate up to 24 hours downtime and data loss
31
Standard Geo-replication
Available for standard and premium databases For applications with aggressive recovery intervals than Geo-restore Standard geo-replication doesn’t support ability to select the location of the secondary, to have read access to secondaries to have full control of when and where you failover
32
Active geo-replication
Available for premium databases For applications with most aggressive recovery requirements Support online application upgrade or relocation scenarios Supports load balancing for read-only workloads Provides the failover and location control
33
Demo: Geo-Replication
34
Questions
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.