francesco.diaz@insight.com http://francescodiaz.azurewebsites.net
Agenda SQL Server workloads on Azure Backup scenarios SQL Server backup options Azure Backup and System Center DPM SQL Database backup options
SQL Server & Azure SQL Database For cloud-designed apps when near-zero administration and enterprise-grade capabilities are key
SQL Server, Azure and System Center Backup features for Azure Tools to facilitate database migration to Azure High Availability passive DBs for backups offloading Storage and/or VNETs for Cloud/Hybrid configurations Azure Backup SQL Database data with backup the features power of the cloud Complete solution for backing up your Backup of VMs running SQL Integrated backup features for SQL Server
Backup to Azure Backup to URL SQL Server 2012/2014 Managed Backup SQL Server 2014 Azure Backup tool SQL Server 2005 +
Backup to URL (SQL2012/SQL2014) Windows Azure VM Microsoft Azure Storage Near bottomless storage Off-site, geo-redundant No provisioning No device management Media safety (decay free) Remote accessibility On-premise box CREATE CREDENTIAL mystoragecred WITH IDENTITY = mystorage', SECRET $credential = <your = "mycredential" storage access key> using Microsoft.SqlServer.Management.Smo; $url = "https://[storage].blob.core.windows.net/backups/db.bak" Backup $server mybackup = "SQLSERVER:\SQL\[computer]\DEFAULT" = new Backup(); CD $server BACKUP mybackup.credentialname DATABASE mydb = TOstrCredential; URL ='https://mystorage.blob.core.windows.net/backup-container/mydb- 20130411.bak' mybackup.database Backup-SqlDatabase = strdatabase; -Database AdventureWorks2012 WITH mybackup.compressionoption CREDENTIAL = mystoragecred', = BackupCompressionOptions.On; FORMAT, mybackup.devices.adddevice(desturl, COMPRESSION, -backupfile $url STATS = 5, DeviceType.Url); MEDIANAME mybackup.sqlbackup(mylocalserver); -SqlCredential = mydb $credential 20130411', -CompressionOption MEDIADESCRIPTION = 'Backup On of mydb'
Restore GUI Backup GUI
Managed Backup to Microsoft Azure What is it? An agent that manages and automates SQL Server backup policy Benefits Flexibility in configuration and no need to manage backup policy Minimal knobs control retention period Context-aware e.g. workload/throttling Manage whole instance, or particular DBs Leverage Backup to Azure Inherently off-site & geo-redundant Minimal storage costs Zero hardware management Intelligence built-in Retention Log backups consider workload Example: EXEC smart_admin.sp_set_db_backup @database_name='testdb', @retention_days=30, @credential_name='mycredential', @encryption_algorithm='no_encryption', @enable_backup=1 GO
Built-in intelligence Main loop DB ID= x Not based on time and frequency (for example, maintenance plan) Skips unnecessary (log) backups when there is no database activity Throttle Yes No 1. Is SB on for DB? 2. Is backup chain broken? 3. Is DB backup due? No Yes Yes DB ID++ 5. Schedule DB backup Caps the full database backups that can be issued by the main loop simultaneously. Staggers log backups Based on log accumulation exceeds 5 megabytes No No 4. Is log backup due? Yes 5. Schedule log backup Occurs at regular intervals
Managed Backup Roadmap (SQL 2016) Support system databases Support databases in simple recovery mode Richer UI support 11
What is it? Stand-alone Tool that adds backup to Microsoft Azure capabilities and backup encryption to prior versions of SQL Server Benefits One Cloud Backup strategy across prior versions of SQL Server including 2005, 2008, and 2008 R2 Adds backup encryption to prior versions, locally or in the cloud Takes advantage of backup to Azure Easy configuration http://www.microsoft.com/en-us/download/details.aspx?id=40740
AlwaysOn to offload backups to secondary replicas On-prem network 10.1.50.0/24 Azure network 10.0.1.0/24 FRANCEDN5 FRANCEDN2 VPN tunnel RRAS service Virtual Network FRANCEDN4 BACKUP CLIENT FRANCEDN1 Availability Group Windows Cluster VPN Device FRANCEDRRAS AZURE Virtual Gateway FRANCEDN3 Availability Group Windows Cluster REPORTS
- SQL BACKUP TO AZURE
Azure Backup Off-site backup of files and databases from the on-premises Your On-Premises Datacenter Benefits Reliable offsite data protection Simple, integrated Secure, encrypted backups Efficient backup and recovery Easy set up
Azure Backup A backup vault A configuration file, provided by the platform A Microsoft Azure Backup Agent installed on the DPM Server Server registration
SQL On-Premise and Backup Online DPM agent installed on the SQL machine on-premises Azure Backup Agent installed on DPM servers Database or Instance backup SQL On-Prem DPM On-Prem Up to Every 15 minutes Azure Backup
- AZURE BACKUP
SQL Database backup options How SQL Database backup works Fully managed by Microsoft Point in time Restore Self-service option for the end user Database copy + Database export Useful for Database archiving purposes
How SQL Database backup works l---- Full l---- Diff l---- Full l---- Log l---- Diff
Point In Time Restore Self-service restore Portal, PowerShell, REST API Important facts Restores are non-disruptive, instead of inplace Retain the same edition as it was by the PIT specified Default SLO assignment in S1/P1 Concurrent requests are queued
SQL Database database copy + export Asynchronous DATABASE COPY sys.dm_database_copies BACPAC to export the database to Azure Storage
Geo-Restore l---- Full l---- Diff l---- Full l---- Log l---- Diff Target could be a different server/region/geo Restore to last available backup Available on Basic, Standard, Premium
Point In Time Restore Geo-Restore Standard Geo- Replication Active Geo- Replication Basic Standard Premium Any restore point within the past 7 days ERT* < 12 hours RPO < 1 hour Note: Pre-v12 server RPO < 24 hours Not available Any restore point within the past 14 days ERT* < 12 hours RPO < 1 hour Note: Pre-v12 server RPO < 24 hours ERT* < 30 seconds RPO < 5 seconds Note: Pre-v12 server ERT* < 2 hours Pre-v12 server RPO < 30 minutes Any restore point within the past 35 days ERT* < 12 hours RPO < 1 hour Note: Pre-v12 server RPO < 24 hours ERT* < 30 seconds RPO < 5 seconds Note: Pre-v12 server ERT* < 2 hours Pre-v12 server RPO < 30 minutes Not available Not available ERT* < 30 seconds RPO < 5 seconds Note: Pre-v12 server ERT* < 2 hours Pre-v12 server RPO < 5 minutes
- SQL DB BACKUP
Deploy databases to Windows Azure VM New wizard to deploy databases to SQL Server in Windows Azure VM Can also create a new Windows Azure VM if needed Easy to use Perfect for database administrators new to Azure and for ad hoc scenarios Complexity hidden Detailed Azure knowledge not needed Almost no overhead: defining factor for time-to-transfer is database size
Overview Native support for SQL Server database files stored as Microsoft Azure blobs DB1 DB2 DB3 Microsoft Azure VM DB4 DB5 DB6 Microsoft Azure Storage DB3 DB6 On-premises box Benefits Near-bottomless storage Offsite, geo-redundant No provisioning No device management Media safety (decay-free) Remote accessibility Details Can persist data, log files, or both Works with backup to Microsoft Azure FileStream currently not supported Failover clustering not supported AlwaysOn availability groups supported
Scenarios Node1 DB1 DB1 Microsoft Azure Storage DB1 Migration of database to another machine Basic disaster recovery Separation of compute and storage For Microsoft Azure virtual machines, expansion of drive and size of X-drive Better together: IaaS virtual machine per-minute billing Node2
How-to CREATE CREDENTIAL [https://mystorage.blog.core.windows.net/data] WITH IDENTITY = Shared Access Signature', SECRET = <your SAS key> CREATE DATABASE mydb ON ( NAME = mydb_dat, FILENAME = 'https://mystorage.blob.core.windows.net/data/mydb.mdf' ) LOG ON ( NAME = foo_log, FILENAME = 'https://mystorage.blob.core.windows.net/data/mydblog.ldf')
- DATABASE DEPLOY - SQL SRV ON AZURE STORAGE
36
2015 Microsoft Corporation. All rights reserved. Microsoft, Windows, Microsoft Azure and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION