Backups to Azure Why I would do this?

Backups to Azure Why I would do this?

Backups to Azure – Why I would do this

SQLShack

SQL Server training Español

Backups to Azure – Why I would do this

July 2, 2015 by Murilo Miranda With the evolution of the Cloud, specifically talking about Azure, SQL Server team started to take advantage of the new opened horizon. In this article we will discuss about backups. What are the pros and cons of store your backup files in Azure? In the previous article, I started a “Hybrid series”, with the objective of show how to take advantage of this new cloud era, without migrate our entire datacenter. This way, we can keep our servers up and running with the critical services and holding the critical information, but we can still use the cloud to offload some tasks. Building, this way, a hybrid scenario. Talking about backups, we need to check some points before dive into the technical part. First of all, why should I use Azure to store my backups? Being direct, there are two main motivations here: minimize costs and use it as a disaster recovery solution. Let’s check more details…

The mainstream

If we stop and think about what we usually do, we will fall into possible scenarios, talking about backup strategy (in terms of storage and retention): Store the backups in a disk and retain the files for some time. My observation: Good option, because the DBA has a direct control over the files. However, as the databases are growing or the new databases are being added to an instance, a disk remains with the same capacity. The problem? The available space won’t be enough to store all the files for the initially defined retention period. This way backups will start to fail! As the quick solution is reduce the rotation period, the problem will be “extinguished”, people will forget the root cause…and in most of the cases, the disk won’t be expanded.
Directly perform backups to the tape. My observation: Good option as well, as this probably won’t be your responsibility. So the disk space is not DBA.
In other hands, a DBA would lose all the control over the backups, as some paid tool, would be used to perform the backups.
So, for every needed restore, a DBA will need the help of the respective team (responsible for the backups). Think positive, if something go wrong, you will have always someone to blame :p

There’s also an option that is very common, mixing both strategies that we talked before: The backup is done to the disk and retained for a short time, for e.g. a week, and then the backup agent (third party tool) does its job, and copy the file from the disk to the tape, where the retention policy will be assured. My observation: From those three, this is my preferred one! Why? Because you, as a DBA, still have control of the most recent backups. So in case of a problem, you will have easy access to the most recent FULL and t-log backups. The other nice point here, is that you will have the retention period assured by the tapes. Looking to those three options, which one is appropriate to my environment? Well, it depends! Defining a backup strategy is a very important, and critical, part of the DBA role. And this is not that easy to define. Some factors may influence on this: The resources available. The database size. The Recovery Point Objective (RPO). The Recovery Time Objective. … and more… Looking for the described scenario, we can agree that if you have the backup files in a local disk, right there in the server, it would be very simple and easy to restore the files, right? Now think in the scenario where you have the tapes involved. Probably you would need to open a ticket to another team, in order to position the right tape and ask them to restore a database for you. So you would need to: Identify a database and the right files to restore. Identify and specify the order to restore. Open a ticket with all the collected information. Wait for someone, from the respective team, to grab the ticket and start working on this. In most of the cases, they have problems restoring a database, because it is open for connections… And some other steps that are not in the DBA’s hands. Let’s agree that this is not the most practical process…In some cases, the DBAs have control over all the process (involving tapes), but this is most common in smaller companies.

Where is Azure in the middle of this

Well, now let’s explore what we can expect from Azure… First of all, backups to Azure is a process that involves “out-of-box” resources. Be prepared to open the connectivity to this service. If you look to the first article, you will notice that we have different ways to connect to Azure. By default this one uses the internet connection to transfer the files, but there are ways to use a S2S VPN, for example. The main constraint here would be the transfer rate. If the database is too large, you may have problem in the time to transfer the file (during backup or restore operations). Still talking about the connectivity, some companies are not happy in have their data traveling in a public network… From this point, we can approach another point: your data will be out of your “controlled zone”. We can still use the complementary solutions to encrypt the file, but still some companies don’t want to try their luck. Ok, we already saw the bad side, let’s check the good ones! As said before, in general there are two main points to attract people to send backups to Azure: Less costs and a better DR solution. Let’s look into details: Sending backups to Azure, we will be able to eliminate tapes. Less hassle!! You can say “I’m not using a tape! This is not for me.”. Wrong!!!
Just think that you have a limited and finite storage space to put you data files in…. In Azure you have “unlimited” storage, by a good price. Less worries! As we talked about “price”, we need to say that in Azure you pay-per-use. Let’s pretend that you are storing backups in a local disk. What happened if the space is not enough anymore? You add a new disk (or extend the existing one). This operation would involve a good amount of gigabytes in one time. So, if you have a dis of 1Tb, and you need to replace it, you would never buy one with less than 1,5Tb…or maybe 2Tb. This would cost some extra money, and you won’t be using all the disk capacity from the day zero. In some case, you won’t be ever using all the free space. So, this is waste of money!
By paying per use, as your backup files are growing, you are paying exactly what you are using. You need more space, you pay more. You activated backup compression and the database backup is now smaller, you pay less. By putting backups in Azure, you will have a Disaster Recovery scenario. The first point is to notice is that you are doing an offsite backup. Your datacenter could be destroyed by aliens, but your backups would still be in safe! But we have more here. By default, a storage account is always replicated to a secondary location…Even if the Azure datacenter has problems, your data will be safe in another location (datacenter). Fair enough? So now we are ready to check our technical options! Check the second part to see the option that we already have available.
Author Recent Posts Murilo MirandaMurilo Miranda is a Luso-Brazilian blogger and speaker. SQL Server MVP, living in the UK. Nowadays he's Database Consultant at Pythian, company based in Ottawa - Canada.

With experience working in Portugal, Holland, Germany and United Kingdom, he's always available to learn and share his knowledge, in order to contribute to SQL Server community,

View all posts by Murilo Miranda Latest posts by Murilo Miranda (see all) Understanding backups on AlwaysOn Availability Groups – Part 2 - December 3, 2015 Understanding backups on AlwaysOn Availability Groups – Part 1 - November 30, 2015 AlwaysOn Availability Groups – Curiosities to make your job easier – Part 4 - October 13, 2015

Related posts

SQL interview questions on database backups, restores and recovery – Part II SQL interview questions on database backups, restores and recovery – Part I SQL Restore Database using DBATools Understanding SQL Server Backup Types Understanding backups on AlwaysOn Availability Groups – Part 1 716 Views

Follow us

Popular

SQL Convert Date functions and formats SQL Variables: Basics and usage SQL PARTITION BY Clause overview Different ways to SQL delete duplicate rows from a SQL Table How to UPDATE from a SELECT statement in SQL Server SQL Server functions for converting a String to a Date SELECT INTO TEMP TABLE statement in SQL Server SQL WHILE loop with simple examples How to backup and restore MySQL databases using the mysqldump command CASE statement in SQL Overview of SQL RANK functions Understanding the SQL MERGE statement INSERT INTO SELECT statement overview and examples SQL multiple joins for beginners with examples Understanding the SQL Decimal data type DELETE CASCADE and UPDATE CASCADE in SQL Server foreign key SQL Not Equal Operator introduction and examples SQL CROSS JOIN with examples The Table Variable in SQL Server SQL Server table hints – WITH (NOLOCK) best practices

Trending

SQL Server Transaction Log Backup, Truncate and Shrink Operations Six different methods to copy tables between databases in SQL Server How to implement error handling in SQL Server Working with the SQL Server command line (sqlcmd) Methods to avoid the SQL divide by zero error Query optimization techniques in SQL Server: tips and tricks How to create and configure a linked server in SQL Server Management Studio SQL replace: How to replace ASCII special characters in SQL Server How to identify slow running queries in SQL Server SQL varchar data type deep dive How to implement array-like functionality in SQL Server All about locking in SQL Server SQL Server stored procedures for beginners Database table partitioning in SQL Server How to drop temp tables in SQL Server How to determine free space and file size for SQL Server databases Using PowerShell to split a string into an array KILL SPID command in SQL Server How to install SQL Server Express edition SQL Union overview, usage and examples

Solutions

Read a SQL Server transaction logSQL Server database auditing techniquesHow to recover SQL Server data from accidental UPDATE and DELETE operationsHow to quickly search for SQL database data and objectsSynchronize SQL Server databases in different remote sourcesRecover SQL data from a dropped table without backupsHow to restore specific table(s) from a SQL Server database backupRecover deleted SQL data from transaction logsHow to recover SQL Server data from accidental updates without backupsAutomatically compare and synchronize SQL Server dataOpen LDF file and view LDF file contentQuickly convert SQL code to language-specific client codeHow to recover a single table from a SQL Server database backupRecover data lost due to a TRUNCATE operation without backupsHow to recover SQL Server data from accidental DELETE, TRUNCATE and DROP operationsReverting your SQL Server database back to a specific point in timeHow to create SSIS package documentationMigrate a SQL Server database to a newer version of SQL ServerHow to restore a SQL Server database backup to an older version of SQL Server

Categories and tips

►Auditing and compliance (50) Auditing (40) Data classification (1) Data masking (9) Azure (295) Azure Data Studio (46) Backup and restore (108) ►Business Intelligence (482) Analysis Services (SSAS) (47) Biml (10) Data Mining (14) Data Quality Services (4) Data Tools (SSDT) (13) Data Warehouse (16) Excel (20) General (39) Integration Services (SSIS) (125) Master Data Services (6) OLAP cube (15) PowerBI (95) Reporting Services (SSRS) (67) Data science (21) ►Database design (233) Clustering (16) Common Table Expressions (CTE) (11) Concurrency (1) Constraints (8) Data types (11) FILESTREAM (22) General database design (104) Partitioning (13) Relationships and dependencies (12) Temporal tables (12) Views (16) ►Database development (418) Comparison (4) Continuous delivery (CD) (5) Continuous integration (CI) (11) Development (146) Functions (106) Hyper-V (1) Search (10) Source Control (15) SQL unit testing (23) Stored procedures (34) String Concatenation (2) Synonyms (1) Team Explorer (2) Testing (35) Visual Studio (14) DBAtools (35) DevOps (23) DevSecOps (2) Documentation (22) ETL (76) ►Features (213) Adaptive query processing (11) Bulk insert (16) Database mail (10) DBCC (7) Experimentation Assistant (DEA) (3) High Availability (36) Query store (10) Replication (40) Transaction log (59) Transparent Data Encryption (TDE) (21) Importing, exporting (51) Installation, setup and configuration (121) Jobs (42) ►Languages and coding (686) Cursors (9) DDL (9) DML (6) JSON (17) PowerShell (77) Python (37) R (16) SQL commands (196) SQLCMD (7) String functions (21) T-SQL (275) XML (15) Lists (12) Machine learning (37) Maintenance (99) Migration (50) Miscellaneous (1) ►Performance tuning (869) Alerting (8) Always On Availability Groups (82) Buffer Pool Extension (BPE) (9) Columnstore index (9) Deadlocks (16) Execution plans (125) In-Memory OLTP (22) Indexes (79) Latches (5) Locking (10) Monitoring (100) Performance (196) Performance counters (28) Performance Testing (9) Query analysis (121) Reports (20) SSAS monitoring (3) SSIS monitoring (10) SSRS monitoring (4) Wait types (11) ►Professional development (68) Professional development (27) Project management (9) SQL interview questions (32) Recovery (33) Security (84) Server management (24) SQL Azure (271) SQL Server Management Studio (SSMS) (90) SQL Server on Linux (21) ►SQL Server versions (177) SQL Server 2012 (6) SQL Server 2016 (63) SQL Server 2017 (49) SQL Server 2019 (57) SQL Server 2022 (2) ►Technologies (334) AWS (45) AWS RDS (56) Azure Cosmos DB (28) Containers (12) Docker (9) Graph database (13) Kerberos (2) Kubernetes (1) Linux (44) LocalDB (2) MySQL (49) Oracle (10) PolyBase (10) PostgreSQL (36) SharePoint (4) Ubuntu (13) Uncategorized (4) Utilities (21) Helpers and best practices BI performance counters SQL code smells rules SQL Server wait types © 2022 Quest Software Inc. ALL RIGHTS RESERVED. GDPR Terms of Use Privacy
Share:
0 comments

Comments (0)

Leave a Comment

Minimum 10 characters required

* All fields are required. Comments are moderated before appearing.

No comments yet. Be the first to comment!