Virtual Machine Snapshots versus Database Backups

by Mar 29, 2018

Categories

Tags

Administration agent-based monitoring Agentless Monitoring alert responses alert thresholds alerting Alerts Amazon Aurora Amazon EC2 Amazon RDS Amazon RDS / Aurora Amazon RDS for SQL Server Amazon Redshift Amazon S3 Amazon Web Services (AWS) Analytics application monitoring Aqua Data Studio automation availability Azure Azure SQL Database azure sql managed instance Azure VM backup Backup and recovery backup and restore backup compression backup status Backup Strategy backups big data Blocking bug fixes business architecture business data objects business intelligence business process modeling business process models capacity planning change management cloud cloud database cloud database monitoring cloud infrastructure cloud migration cloud providers Cloud Readiness Cloud Services cloud storage cloud virtual machine cloud VM clusters code completion collaboration compliance compliance audit compliance audits compliance manager compliance reporting conference configuration connect to database cpu Cross Platform custom counters Custom Views customer survey customer testimonials Dark Theme dashboards data analysis Data Analytics data architect data architecture data breaches Data Collector data governance data lakes data lineage data management data model data modeler data modeling data models data privacy data protection data security data security measures data sources data visualization data warehouse database database administration database administrator database automation database backup database backups database capacity database changes database community database connection database design database developer database developers database development database diversity Database Engine Tuning Advisor database fragmentation database GUI database IDE database indexes database inventory management database locks database management database migration database monitoring database navigation database optimization database performance Database Permissions database platforms database profiling database queries database recovery database replication database restore database schema database security database support database synchronization database tools database transactions database tuning database-as-a-service databases DB Change Manager DB Optimizer DB PowerStudio DB2 DBA DBaaS DBArtisan dBase DBMS DDL Debugging defragmentation Demo diagnostic manager diagnostics dimensional modeling disaster recovery Download drills embedded database Encryption End-user Experience entity-relationship model ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events execution plans free tools galera cluster GDPR Getting Started Git GitHub Google Cloud Hadoop Healthcare high availability HIPAA Hive hybrid clouds Hyper-V IDERA IDERA ACE Index Analyzer index optimization infrastructure as a service (IaaS) infrastructure monitoring installation Integrated Development Environment interbase Inventory Manager IT infrastructure Java JD Edwards JSON licensing load test load testing logical data model macOS macros managed cloud database managed cloud databases MariaDB memory memorystorage memoryusage metadata metric baselines metric thresholds Microsoft Azure Microsoft Azure SQL Database Microsoft PowerShell Microsoft SQL Server Microsoft Windows MongoDB monitoring Monitoring Tools Monyog multiple platforms MySQL news newsletter NoSQL Notifications odbc optimization Oracle PeopleSoft performance Performance Dashboards performance metrics performance monitoring performance schema performance tuning personally identifiable information physical data model Platform platform as a service (PaaS) PostgreSQL Precise Precise for Databases Precise for Oracle Precise for SQL Server Precise Management Database (PMDB) product updates Project Migration public clouds Query Analyzer query builder query monitor query optimization query performance Query Store query tool query tuning query-level waits Rapid SQL rdbms real time monitoring Real User Monitoring recovery regulations relational databases Releases Reporting Reports repository Restore reverse engineering Roadmap sample SAP Scalability Security Policy Security Practices server monitoring Server performance server-level waits Service Level Agreement SkySQL slow query SNMP snowflake source control SQL SQL Admin Toolset SQL CM SQL code SQL coding SQL Compliance Manager SQL Defrag Manager sql development SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Diagnostic Manager Pro SQL DM SQL Doctor SQL Enterprise Job Manager SQl IM SQL Inventory Manager SQL Management Suite SQL Monitoring SQL Performance SQL Quality SQL query SQL Query Tuner SQL Safe Backup SQL script SQL Secure SQL Security Suite SQL Server sql server alert SQL Server Migration SQL Server Performance SQL Server Recommendations SQL Server Security SQL statement history SQL tuning SQL Virtual Database sqlmemory sqlserver SQLyog Storage Storage Performance structured data Subversion Support tempdb tempdb data temporal data Tips and Tricks troubleshooting universal data models universal mapping unstructured data Uptime Infrastructure Monitor user experience user permissions Virtual Machine (VM) web services webinar What-if analysis WindowsPowerShell

Virtual Machine Snapshots

Virtual machines provide exciting possibilities concerning backup, recovery, and cloning of databases. Convenient mechanisms are available for obtaining consistent snapshots of data volumes in virtual machines. Correctly implemented and tested snapshots can significantly simplify backup tasks. These snapshots can also clone databases to other environments. Snapshots of virtual machines to backup databases may be undoubtedly suitable for test and development environments. Snapshots of virtual machines are popular with system administrators because they standardize implementations of backups across organizations and remove the need for application-specific backup configurations.

Point-in-time Restores

Snapshots of virtual machines can perform point-in-time restores of virtual machine images and individual files contained within virtual machines to the last snapshot point. However, backups of databases allow restoring to any point in time using a combination of full and differential backups of databases and backups of transaction logs.

Transaction Log Clearing

For databases that use full or bulk-logged recovery models, clearing of transaction logs only occurs after logs are backed up using database backup commands. Some tools for snapshots of virtual machines offer options to perform transaction log clearing after taking snapshots of virtual machines. However, when conducting concurrent backups of databases for virtual machines, such options can break log backup chains for backups of databases.

Recovery Objectives

Using snapshots of virtual machines exclusively also removes some essential database recovery capabilities that are available with backups of databases (such as restore of individual database files and pages, and piecemeal restores). Consequently, it is essential to evaluate requirements for recovery time objectives and recovery point objective (which tend to be short for databases) to meet expectations.

Stun Moments

For example, snapshots of virtual machines allow freezing of virtual disks at a point in time for a time duration. Consequently, virtual machines suffer from stun moments during phases of consolidation for snapshots. Stun moments can be lengthy and disruptive to throughput. The more demand for input and output is present on virtual machines, the longer the duration of stun moments will be. For production databases and high-performance workloads, underlying snapshot technologies may introduce unacceptable pauses to the throughput of databases. At the very least, for production systems, these types of backups need to be scheduled during periods of low activity where pauses are tolerable.

Data Inconsistencies

Even with frozen virtual disks, snapshots of virtual machines do not guarantee consistency of data unless such snapshots include other mechanisms. Database applications require that data structures on disk remain consistent with memory contents at any time. Consequently, database applications need to be aware of ongoing backups so that they can flush their data buffers to disk and suspend pending disk transactions until backups complete. This process is called quiescing. Snapshots of virtual machines quiesce file systems but not databases. While quiescing file systems guarantee consistency of data on the file level, database applications remain unaware of backups and restores. Consequently, database applications may not have consistent data files with snapshots of virtual machines. Consequently, snapshots of virtual machines with live databases with database files residing in virtual machines can lead to apparently successful backups of inconsistent data.

System Services

The lack of a guarantee for consistency of data usually means that snapshots of virtual machines need to place databases in hot backup mode. Alternatively, databases running in the Microsoft Windows operating system may be able to take advantage of the Volume Shadow Copy Service. The Volume Shadow Copy Service coordinates activities of providers, writers, and requesters in creating and usage of shadow copies, furnishes default system providers, and implements low-level driver functionality necessary for any provider to work. Similar system services may also exist in other operating systems. However, any such system services create significant complexity for their correct implementation, configuration, and verification.

Generic Quiescing Mechanisms

Further, some tools for snapshots of virtual machines may provide generic quiescing mechanisms via user scripts. However, actual implementations of quiescing depend on end users. Pausing databases during snapshots may not be possible or feasible. Further, it is required to perform backups of databases with database agents that use application programming interfaces for these databases to perform application-aware backups. Otherwise, by performing snapshots of virtual machines, consistency of data is only guaranteed for file systems and not for applications. This potential inconsistency of data defeats the purpose of solutions for protection of data. Consequently, it is not recommended to backup highly transactional databases with substantial input and output via snapshots of virtual machines.

Conclusion

While virtual machines offer exciting mechanisms for backing up databases, there is usually no substitute for the flexibility and safety provided by tools dedicated to backing up and recovering databases, especially for production databases and high-performance workloads.

Achieve Better Database Backup and Recovery with IDERA

View backup histories with the free SQL Backup Status Reporter. Access more features with SQL Admin Toolset’s Backup Status. Level up to back up faster than native SQL Server, save space using dynamic compression, reduce failures from network problems, automate backups, ensure organizational compliance via policy-based management, back up to cloud storage, instantly access data from backups, receive alerts, and create reports with the full-featured SQL Safe Backup.

Also, discover instances on networks and check for versions with the free SQL Instance Check. Access more features with SQL Admin Toolset’s Discovery, Patch Analyzer, and Inventory Reporter. Level up to automatically discover new instances, find SQL Business Intelligence Services, identify databases on Always On Availability Groups, and organize using tags with the full-featured SQL Inventory Manager.