Backup Using Storage Snapshots
Storage snapshots are taken at storage level and are a backup or copy of all disks in a storage group at the same point in time.
Storage snapshots have the following benefits:
- They can be created with minimal impact on the system. This is because storage snapshots are created in the storage system and do not consume database services.
- Recovery from a storage snapshot is faster than recovery from a data backup.
- An SAP HANA database can be recovered to a specified point in time using a storage snapshot only or using storage snapshot in combination with log backups. This enables you to recover to a specified point in time.
Storage snapshots and SAP HANA MDC
Backup and recovery using snapshots is not yet available for Multi Database Containers (MDC). There are two types of snapshots: database aware and database unaware snapshots.
Database Unaware Snapshots
A database unaware snapshot is a storage snapshot taken without notifying the database. When a recovery to the snapshot is done and the database restarted, the database assumes that a power-failure occurred and performs an online recovery. Database unaware snapshots are, by definition, inconsistent because the snapshot was taken while the database was running.
Database Aware Snapshots
A database aware snapshot is a storage snapshot which, when taken, notifies the database. As the database is warned, it can save a consistent state to disk. Database aware snapshots are, therefore, preferred over database unaware snapshots.
From an SAP HANA perspective, the storage snapshot captures the content of the SAP HANA data area at a particular point in time. Only use database aware snapshots. A snapshot is created by first creating an internal database snapshot. The database snapshot provides a view of the database with a consistent state at the point in time when it was created. The database snapshot is used to ensure the consistent state of the storage snapshot, regardless of the physical layout of the data area with respect to the number of disks, controllers, etc.
The following steps are needed to create a Storage Snapshot (see Figure 4.3):
- Use the SAP HANA Studio or the Command Line Tool to initiate the database snapshot. DISASTER RECOVERY
- Use storage tools to create a storage snapshot.
- Use the SAP HANA Studio or the Command Line Tool to confirm that the storage snapshot was created successfully. An ID is written to the backup catalog and the snapshot is released.
Integration between SAP HANA and Storage
Database snapshots can be created via the SAP HANA Studio or the SQL command line. Both options are easy to use. For daily backups, the creation of the database snapshot will have to be automated by developing two scripts; one script to initiate the database snapshot and another to release the same snapshot. Both scripts will then have to be called from within the storage solution. Fortunately, most storage vendors provide such scripts by default.
This excerpt is from the SAP HANA – Implementation Guide complements of Espresso Tutorials!