Transcript
SAP HANA SPS12 Backup and Recovery (Overview) Stephanie Lewellen, SAP HANA Product Management May 2016
Public
Disclaimer This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP's strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
2
Agenda Backup Recovery Support for multitenant database containers Database copy Dynamic Tiering integration Backint certification What‘s new?
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
3
Backup
SAP HANA Backup and Recovery In-memory data and persistent storage In-memory computing is safe: SAP HANA holds the bulk of its data in memory for maximum performance, but still uses persistent storage to provide a fallback in case of failure. During normal operation, data is automatically saved from memory to disk at regular savepoints. Additionally, all data changes are captured in redo log entries. A redo log entry is written to disk after each committed database transaction. After a power failure, SAP HANA can be restarted like any disk-based database and returns to its last consistent state by replaying the redo log entries since the last savepoint. Time
1 Savepoint: Data is written to disk (data area) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
2 After each COMMIT, log is written to disk (log area)
3 Power failure
Public
5
SAP HANA Backup and Recovery Why backups?
SAP HANA database
Memory Savepoint
Data Area (disk)
COMMIT
Log Area (disk)
While savepoints and redo log writing protect your data against power failures, this does not help when the persistent storage itself is damaged or a logical error occurs. Backups are required To protect against disk failures To make it possible to reset the database to an earlier point in time
Backups are also used for other scenarios such as database copies. Backups complement other availability strategies such as system replication or storage replication.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
6
SAP HANA Backup and Recovery Comparison of different high availability and disaster recovery options
…system operational Backup or Sync
operation resumed…
RPO design & prepare
time
RTO detect
recover
performance ramp-up
RPO (Recovery Point Objective) = worst-case data-loss RTO (Recovery Time Objective) = time to recover from outage Solution Backup & Recovery SAP HANA Host Auto-Failover SAP HANA Storage Replication w/ QA, Dev. SAP HANA System Replication SAP HANA System Replication w/ QA, Dev.
Used for HA & DR HA DR HA & DR HA & DR
Cost $ $ $$ $$$ $**/$$
** single host installations © 2015 SAP SE or an SAP affiliate company. All rights reserved.
RPO >0 0 0* 0* 0*
RTO high med med low med
Perf. ramp med long long short long
*synchronous solution Public
7
SAP HANA Backup and Recovery Memory disk backup Data backups/snapshots SAP HANA database
Memory Savepoint
COMMIT
Data Area (disk)
Log Area (disk)
A full data backup saves all current data that is contained in the data area (payload only). Delta backups save subsequently changed data. A snapshot saves the content of the whole data area. Snapshots are an alternative to full data backups. Data backups and snapshots are executed manually (scheduling possible)
Log backups Data Backups/Snapshots
Log Backups
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Log backups save the redo log entries that are contained in the log area Log backups are carried out automatically (asynchronously)
Public
8
SAP HANA Backup and Recovery Terminology
Data Area
Data Volume Data Data area = all data volumes 1 data volume per service with persisted data Data volumes contain the data and the undo log entries
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Log Area Log Volume
Log Volume Log Segment
Redo log entries Log area = all log volumes 1 log volume per service with persisted data Log volumes contain log segments, which contain the individual redo log entries A log segment is closed and automatically backed up if it is full, or the log backup timeout has elapsed and the log segment contains at least one COMMIT redo log entry A log segment is released for overwriting once it has been backed up and is no longer needed for restart Public
9
SAP HANA Backup and Recovery Data backups: full and delta Full data backup – all data
F
A full data backup contains all current data Note: Old data that is no longer valid but might still be physically present in the data volumes is not part of the data backup
III
D
Incremental backup – changed data since the last data backup (full or delta)
Differential backup – changed data since the last full data backup
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Delta backups contain data that was changed since an earlier data backup Two types: incremental and differential Notes: Delta backups are data backups – they contain actual data. In contrast, log backups contain redo log entries (=sequence of changes) Delta backups can be used together with a snapshot for recovery Public
10
SAP HANA Backup and Recovery Delta backups – when to use what Full data backup
Incremental backups... ...are the smallest data backups as unchanged data will not be backed up in multiple backups faster backup ...are restored one after the other during a recovery longer recovery times
F
Incremental backup
III
Differential backups...
Differential backup
D
...increase the amount of data saved with each backup longer backup times ...reduce the number of data backups during recovery faster recovery
Note: You can also mix incremental and differential backups in your backup strategy © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
11
SAP HANA Backup and Recovery What happens during a data backup? While backups are running, users can continue to work normally. All services that persist data are backed up E.g. master name server, index servers
Global backup savepoint for these services Synchronized across all hosts and services No user interaction for synchronization required!
Data marked in the global backup savepoint is read from the data volumes and written to the backups Parallelization by asynchronous reading per service
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Master Name Server
Name Server
Name Server
Index Server
Index Server
Index Server
Savepoint Savepoint
Savepoint
Savepoint
Parallelization Synchronized backup savepoint Backup
Public
12
SAP HANA Backup and Recovery Options for backups There are different options for carrying out backups for SAP HANA
Backups to the file system
Backups via the “Backint for SAP HANA” API to 3rd party tools
Data snapshots using storage tools
Note: You can mix different backup options, e.g. write the data backups to the file system and the log backups to Backint.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
13
SAP HANA Backup and Recovery Options for backups: File system You can back up data and logs to the file system Data backups can be triggered using
SAP HANA Cockpit SAP HANA Studio SQL commands DBA Cockpit (scheduling)
SAP HANA Studio hdbsql Create backup
SAP HANA
File system, e.g. NFS
Log backups are written automatically More information: File systems that are not supported: SAP Note 1820529 Data backup scheduling can be performed in the SAP HANA cockpit © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
14
SAP HANA Backup and Recovery Options for backups: Backint (3rd party backup tools) You can back up data and logs using 3rd party backup tools SAP HANA provides an API (“Backint for SAP HANA”) via which 3rd party backup tools can be connected
SAP HANA Studio hdbsql Create backup
3rd party backup agent runs on the SAP HANA server Backups are transferred via pipe
Direct integration with SAP HANA: Data backups to Backint can be triggered using SAP HANA Cockpit, SAP HANA Studio, SQL commands, or DBA Cockpit Log backups are automatically written to Backint (if configured) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
SAP HANA
3rd Party Backup Agent
3rd Party Backup Server
Public
15
SAP HANA Backup and Recovery Options for backup: Backint – parallel streaming (I) For improved performance Backint can now use multiple parallel streams for data backups If parallel streams have been configured, the individual service backups are distributed across all available streams. Note that the different services always use dedicated backup streams. Backups will only be distributed if they are bigger than 128 GB. Both full and delta backups are supported. To configure the number of parallel streams, use the parallel_data_backup_backint_channels ini file parameter (default: 1, max: 32). During recovery, the number of streams used is the same as during backup (independent of the current setting of the parameter).
Note: It is recommended to adapt the configuration of the 3rd party backup tool accordingly. © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
16
SAP HANA Backup and Recovery Options for backup: Backint – parallel streaming (II) In the example below, 3 parallel streams have been configured. The index server backup is distributed across 3 streams. Because both name server and XS engine backups are smaller than 128 GB, they are not distributed across several streams Index server backup (1/3)
Index server backup (2/3)
SAP HANA
Index server backup (3/3)
3rd Party Backup Server
Name server backup (1/1) XS engine backup (1/1) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
17
SAP HANA Backup and Recovery Options for backups: Snapshots As an alternative to data backups to the file system or to Backint, you can use snapshots (data only) 1. First, you trigger the creation of an internal data snapshot in SAP HANA using SAP HANA Studio or SQL commands (“prepare database”) 2. Using a storage tool or similar, you create a snapshot of the whole data area 3. Confirm the snapshot as successful, using SAP HANA Studio or SQL commands. This is necessary to include the snapshot in SAP HANA’s backup catalog
Note: No other data backup is possible until the snapshot has either been confirmed or canceled © 2015 SAP SE or an SAP affiliate company. All rights reserved.
SAP HANA Studio hdbsql
Storage Tool Plugin* *some storage tools provide HANA plugins
Prepare database
Confirm snapshot
SAP HANA
Internal snapshot Data Area (Disk)
Create snapshot
External Storage
Public
18
SAP HANA Backup and Recovery Options for backup: Comparison File system
Backint
Advantages
Consistency checks on block level
Consistency checks on block level Additional features, e.g. encryption or de-duplication Data center integration Backups immediately available for recovery
Usually created/restored very fast Negligible network load
Disadvantages
Additional storage cost impact File system fill level needs to be monitored Additional time needed to make backups available for recovery Network load
Network load
No consistency checks on block level
Size
Current data only (backup size usually smaller than the data area)
Current data only (backup size usually smaller than the data area)
~ Size of the data area, but usually compressed/de-duplicated by storage
Duration
IO-bound (reading from data volumes, writing to file system) Network-bound (writing to file system)
IO-bound (reading from data volumes) Network-bound (writing to backup server)
Usually negligible (logical pointers are replicated)
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Snapshot
Public
19
SAP HANA Backup and Recovery Tools By SAP SAP HANA Cockpit (web-based administration tool) SAP HANA Studio (Eclipse-based administration tool and IDE) DBA Cockpit (ABAP-based tool for high-level database administration tasks)
3rd party Certified backup tools (connected via Backint API) Storage tools (for snapshots)
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
21
SAP HANA Backup and Recovery Backup operations in SAP HANA Cockpit Support for backup operations has been extended in SAP HANA Cockpit The Data Backup tile shows the state of the current backup. Clicking on the tile takes you to the backup catalog.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
22
SAP HANA Backup and Recovery Displaying the backup catalog in SAP HANA Cockpit The backup catalog provides detailed information on backups, including snapshots The backup catalog is stored within SAP HANA. It is backed up itself as part of the log backup (even in log mode OVERWRITE). This allows for offline access to the backup catalog during recovery. Displaying the backup catalog 1. In SAP HANA Cockpit, click on the Data Backup tile 2. By clicking on an entry in the catalog, detailed information on the respective backup is displayed
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
23
SAP HANA Backup and Recovery Customizing the backup catalog in SAP HANA Cockpit You can select which columns are displayed in the backup catalog in SAP HANA Cockpit To hide/unhide columns, use the check boxes in the Columns dialog. To change the order in which the columns are displayed, use the arrow buttons at the top of the sort dialog. Note: You can also customize the details pages of the backup catalog in the same way.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
24
SAP HANA Backup and Recovery Filtering the backup catalog in SAP HANA Cockpit (I) You can filter the backup catalog in SAP HANA Cockpit The filter dialog displays the number of filters that are set for the different columns.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
25
SAP HANA Backup and Recovery Filtering the backup catalog in SAP HANA Cockpit (II) Click on the filter type to change the filter values.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
26
SAP HANA Backup and Recovery Filtering the backup catalog in SAP HANA Cockpit (III)
The current filter settings are displayed in the blue filter bar at the top of the backup catalog
To change the settings, you can either click on the filter bar or the filter button
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
27
SAP HANA Backup and Recovery Creating a data backup in SAP HANA Cockpit Using SAP HANA Cockpit, you can create data backups to the file system or to Backint Both full and delta backups are supported. Creating a data backup 1. In SAP HANA Cockpit, click on the Data Backup tile 2. On the Backup Catalog page, choose Start New Backup 3. Specify your backup settings 4. Start the backup by choosing Back Up 5. The progress is displayed on the Data Backup tile To view the progress details, click the tile
By toggling between the backup types, you can easily compare the estimated backup sizes of complete, incremental and differential backups. © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
28
SAP HANA Backup and Recovery Data backup scheduling in the SAP HANA cockpit (I) You can now schedule data backups in the SAP HANA cockpit. To open the backup scheduling page, from within the Data Backup application, select Create Schedule at the bottom of the backup catalog. To view existing data backup schedules, select Go to Schedules. You can schedule complete, incremental, or differential backups, as well as backups to file or third-party (Backint) tools. Before scheduling backups, enable the XSC base scheduler, and assign the additional scheduler role to the database user: sap.hana.backup.roles::Scheduler © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
29
SAP HANA Backup and Recovery Data backup scheduling in the SAP HANA cockpit (II) Specify the schedule data settings. At the top of the Schedule Settings page, select the general data backup settings: •
Backup Type: Complete, incremental or differential data backup Note: Currently snapshots cannot be scheduled.
•
Destination Type: File-based or Backintbased
•
Backup Prefix: Date/time place holder that is replaced at backup execution
•
Backup Destination: For file-based data backup, it’s the target location in the file system, otherwise it’s the unchangeable identifier of the named pipe used by Backint © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
30
SAP HANA Backup and Recovery Data backup scheduling in the SAP HANA cockpit (III) Specify the schedule data settings. On middle of the Schedule Settings page, specify the proper schedule data settings: •
Schedule Name: an unique identifier
•
Start of Schedule: Date and time when the schedule shall become active, specified in UTC
Note: Next resp. first execution time will be calculated dependent of the recurrence pattern. •
Recurrence pattern: • •
•
Weekly: one or more days in a week including recurrence all n weeks (max 4) Monthly: first, second, third, forth or last of a weekday including recurrence all n month (max 12)
Create Backup at: Execution time of the scheduled backup, specified in UTC © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
31
SAP HANA Backup and Recovery Data backup scheduling in the SAP HANA cockpit (IV) Get an overview of scheduled data backups. From the Backup Schedules page, you can view existing schedules. complete_wed
You can activate or pause schedules from the schedule menu, drill down into individual schedule details, or delete a schedule permanently.
incr_thurs complete_mon
You can also execute these operations on the Schedule Settings details page using the toolbar buttons. Note: You cannot modify a schedule. © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
32
SAP HANA Backup and Recovery Backup information in SAP HANA Studio You can also use SAP HANA Studio to display the current backup status The backup overview displays information on Progress of the currently running data backup, with information on the services included in the backup Last successful data backup – Start/end time, duration, size, and throughput – To display more detailed information on this data backup, click More Information Open snapshot (if available)
Buttons for Starting a data backup Creating/confirming a snapshot Displaying backup.log file © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
33
SAP HANA Backup and Recovery Displaying the backup catalog in SAP HANA Studio You can also display the backup catalog using SAP HANA Studio
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
34
SAP HANA Backup and Recovery Creating a data backup in SAP HANA Studio You can also use SAP HANA Studio to create data backups
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
35
SAP HANA Backup and Recovery Creating a delta backup in SAP HANA Studio To create delta backups, you can use SAP HANA Studio or SQL commands Creating a delta backup 1. In the Systems view in SAP HANA Studio, right-click on the system and choose Backup and Recovery Backup System... 2. Choose the backup type, for a delta backup: either Differential Data Backup or Incremental Data Backup, and specify further settings 3. Start the backup Note: The creation of delta backups is not yet available in SAP HANA Cockpit
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
36
SAP HANA Backup and Recovery Creating a snapshot To create snapshots, you can use SAP HANA Studio or SQL commands Some storage tools can also trigger snapshots in SAP HANA directly Creating a snapshot 1. In the Systems view in SAP HANA Studio, right-click on the system and choose Storage Snapshot... Prepare. Alternatively, you can use the SQL command: BACKUP DATA CREATE SNAPSHOT COMMENT ‘My Snapshot Test' 2. Using the storage tool, create a snapshot of the SAP HANA data area 3. In SAP HANA Studio, confirm the successful snapshot and enter the external snapshot ID. Alternatively, you can use the SQL command: BACKUP DATA CLOSE SNAPSHOT BACKUP_ID 3456789 SUCCESSFUL 'storage_id_12345' © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
37
SAP HANA Backup and Recovery Backup configuration in SAP HANA Studio To change the backup configuration, use SAP HANA Studio Backint o If a 3rd party backup tool is installed, it is displayed automatically. You can optionally specify vendorspecific parameter files
Data backup o Default settings for data backups to the file system (destination, maximum file size). Note: You specify the destination type (file or Backint) when executing the data backup
Log backup o Default settings for log backups (destination type – file or Backint), destination, backup interval). Log backups are carried out automatically unless disabled
Note: This is not yet available in SAP HANA Cockpit © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
38
SAP HANA Backup and Recovery Backup lifecycle management in SAP HANA Studio You can use SAP HANA Studio or SQL commands to delete old backups Deleting old backups may be required in order to manage your backup storage space or to fulfill regulatory deletion requirements You can delete old backups From the backup catalog (logical view) Physically (from disk and/or from a 3rd party backup server via the Backint API)
You can enable an audit event to create an entry in the audit trail whenever a backup is deleted using this function. Note: Not yet available in SAP HANA Cockpit © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
39
Recovery
SAP HANA Backup and Recovery Backups during normal operation Now
F
I
I
D
I
I
1 Last full backup
Time
5 Most recent redo log entries from the log area
2 Incremental backup 3 Differential backup 4 Log backup
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
41
SAP HANA Backup and Recovery Recovery options C
F
B
I
I
D
I
A
I
Time
(A) To the most recent state Full backup (data backup to the file system/Backint or snapshot) + last differential backup (Note: not supported if a snapshot is used as basis) + subsequent incremental backups (Note: not supported if a snapshot is used as basis) + subsequent log backups + redo log entries that are still available in the log area (if it was not destroyed by the failure) (B) To a point in time in the past Same as above; redo log entries from the log area might not be required (C) To a specified full backup Full backup, but no replay of redo log entries (“clear log”) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
42
SAP HANA Backup and Recovery Recovery phases
Time
Data recovery
Log replay
Restart
After the initial collection of system information required for the recovery, there are the following recovery phases: 1. Data recovery (full backup + delta backups, if applicable) 2. Log replay (log backups + log entries from the log area, if applicable) 3. Restart © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
43
SAP HANA Backup and Recovery Improved log replay during resume recovery (II) Resume database recovery after a failure during delta data backup recovery. • Accelerate subsequent recovery using successful recovered full data backups, differential and incremental data backups and log backups. • Successful recovered data backups are kept implicitly as internal database snapshot (aka fallback point) in the data area. • If a recovery failure occurs during delta data backup recovery, the full backup recovery is preserved, and only the delta data backups and the log backups are reprocessed.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Full Backup
Delta Backups
Time
Data recovery
Log replay Resume
Public
44
SAP HANA Backup and Recovery Improved log replay during resume recovery (III) Resume database recovery after a failure during log recovery. • Data changes caused by replaying log backups during a database recovery are periodically stored in the log area with savepoints. • The frequency of savepoints can be set using the configuration parameter: log_recovery_resume_point_interval (default: 1.800 sec; max: 18.000 sec, 0 = disabled) • Once the interval expires, the next savepoint log entry will be replayed. • If a recovery failure occurs after a savepoint, only the log backups after most recent savepoint must be reprocessed.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Savepoints
Time
Data recovery
Log replay Resume
Public
45
SAP HANA Backup and Recovery Starting a recovery in SAP HANA Studio You can use SAP HANA Studio or SQL commands to execute a recovery Caution: For a recovery, SAP HANA will be shut down In the Systems view in SAP HANA Studio, choose Backup and Recovery Recover System... from the context menu of the database and enter the credentials of the SAP HANA operating system user
adm Note: Recovery is not yet available in SAP HANA Cockpit
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
46
SAP HANA Backup and Recovery Recovery to the most recent state (option A) You can use either a data backup (from the file system or Backint), or a snapshot as the basis for the recovery
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
47
SAP HANA Backup and Recovery Recovery to a point in time in the past (option B) You can use either a data backup (from the file system or Backint), or a snapshot as the basis for the recovery
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
48
SAP HANA Backup and Recovery Recovery using a specified data backup or snapshot (option C) You can use either a data backup (from the file system or Backint), or a snapshot as the basis for the recovery. Note that you do not need the backup catalog for this recovery option but can also directly specify a backup.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
49
SAP HANA Backup and Recovery Further recovery settings, e.g. use of delta backups during recovery Recovery includes delta backups automatically SAP HANA automatically determines the best recovery strategy based on all available backups, including delta backups. If you do not want SAP HANA to use delta backups for the recovery, de-select Use Delta Backups when specifying your recovery settings
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
50
SAP HANA Backup and Recovery Recovery SQL statement displayed in the recovery wizard You can display the SQL statement for a specific recovery in SAP HANA Studio After you have specified your recovery settings, a summary screen is displayed. You can display the SQL statement equivalent to these recovery settings by clicking the relevant button
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
51
SAP HANA Backup and Recovery Recovery phases After the initial collection of system information required for the recovery, there are the following recovery phases: Phase 1: Data recovery Using data backups or snapshot plus delta backups if available
Phase 2: Log recovery Redo log entries are replayed – from the log backups and/or – from the log area (if still available/required)
Phase 3: Restart SAP HANA is restarted © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
52
SAP HANA Backup and Recovery Preparation of a recovery using a snapshot As an alternative to a full data backup to the file system/Backint, you can use a snapshot as the basis for a recovery
We recommend that you already transfer the snapshot back to the data area of SAP HANA before starting the recovery.
SAP HANA Studio
Storage Tool
cmd
Plugin* *some storage tools provide HANA plugins
Recover database
SAP HANA
Internal snapshot Data Area (Disk)
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Transfer storage snapshot
External Storage
Public
53
Support for multitenant database containers
SAP HANA Backup and Recovery Multitenant database containers: Overview Multitenant database containers allow you to run multiple applications on one SAP HANA system 1 system database and multiple tenant databases Shared installation of the database system software Strong isolation features per default, the system database and each of the tenant databases have their own: – Database users, database catalog, repository, persistence, backups, traces and diagnosis files The system database contains information about the system as a whole and is used for central system administration The tenant databases contain the actual business data
More information:
Application 1
Application 2
Tenant database 1
Tenant database 2
System database
SAP HANA system
SAP Note 2096000 © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
56
SAP HANA Backup and Recovery Multitenant database containers: Backup/recovery concept MDC systems follow the same backup/recovery principles as single-container systems The system database plays a central role for MDC backup and recovery It can initiate both backups of the system database itself and of individual tenants databases. A tenant database can also carry out its own backups unless this feature has been disabled for this tenant database Note that the backup location in the file system is specified system-wide and tenant databases always back up to sub-directories of this location. Recoveries are always initiated from the system database The system privilege DATABASE ADMIN authorizes the administration of tenant databases from the system database
To recover a complete MDC system, first the system database and then all tenants need to be recovered individually. Note: Snapshots are currently not supported in multi-tenant database container systems © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
57
SAP HANA Backup and Recovery Multitenant database containers: Backint support The current Backint API specification also covers MDC systems There are a few points that you need to be aware of when using a 3rd party backup tool Isolation level “high” With SPS10, a new option “isolation level” was introduced for MDC systems. If the isolation level is set to high, all tenant databases run under individual operating system users. In high isolation scenarios, Backint is supported from the SAP HANA side but you need to check with your 3rd party tool vendor whether any tool-specific restrictions apply. Tenant copy Tenant copy using Backint is currently not supported. Use file system backups for tenant copy instead. © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
58
SAP HANA Backup and Recovery Multitenant database containers: SAP HANA Cockpit support You can use SAP HANA Cockpit to create data backups of the system database and of individual tenant databases Log on to the relevant database and click on the Data Backup tile Create data backups and view backup information in the same way as for single-container databases
Note: You can also use SAP HANA Studio to create data backups. Backup lifecycle management is currently not available in SAP HANA Cockpit. © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
59
SAP HANA Backup and Recovery Multitenant database containers: Backing up the system database You regularly need to create data backups of the system database The system database contains information about the system as a whole and all tenant databases and is used for central system administration. Creating a data backup of the system database 1. In the Systems view in SAP HANA Studio, right-click on the system database and choose Backup and Recovery Backup Up System Database... 2. Specify your backup settings and start the backup
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
60
SAP HANA Backup and Recovery Multitenant database containers: Backing up a tenant database from the system DB You regularly need to create data backups of the tenant databases The tenant databases contain the business data. They have their own index servers. Note: Depending on the system configuration, it may also be possible to initiate a data backup directly from a tenant database Creating a data backup of a tenant database 1. In the Systems view in SAP HANA Studio, right-click on the system database and choose Backup and Recovery Backup Up Tenant Database... 2. Select the tenant database to be backed up 3. Specify your backup settings and start the backup © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
61
SAP HANA Backup and Recovery Multitenant database containers: Viewing backup information Backup information is contained in the backup catalog Viewing information for all databases 1. In the Systems view of the system database in SAP HANA Studio, expand the system database and double-click on Backup 2. Open the Backup Catalog tab and select the database for which you want to view the information
Viewing information for a tenant database 1. In the Systems view in SAP HANA Studio, expand the tenant database and double-click on Backup 2. Open the Backup Catalog tab © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
62
SAP HANA Backup and Recovery Multitenant database containers: Backup lifecycle management You can delete backups that are not needed any longer Deleting old backups 1. In the Systems view of the system database in SAP HANA Studio, expand the system database and double-click on Backup 2. Open the Backup Catalog tab and select the database for which you want to delete backups 3. From the context menu, choose which backups you want to delete. Specify whether the backups should be deleted from the backup catalog only, or also from the file system/3rd party backup tool
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
63
SAP HANA Backup and Recovery Multitenant database containers: Recovering the system database Use SAP HANA Studio or SQL commands to recover the system database Caution: The whole system will be shut down, including all tenant databases You need the adm operating system user credentials for recovering the system database The system database can only be recovered to the latest state Only the system database will be recovered, the content of the tenant databases is not affected
Note: Recovery is currently not available in SAP HANA Cockpit © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
64
SAP HANA Backup and Recovery Multitenant database containers: Recovering a tenant database Use SAP HANA Studio or SQL commands to recover an individual tenant database Tenant databases can be recovered to the latest state, a point in time, or to a specific backup The system database and all other tenant databases are not affected by the recovery of an individual tenant database Recovery of a tenant database can only be initiated from the system database. Note that the system database needs to be online for this.
Note: Recovery is currently not available in SAP HANA Cockpit © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
65
Database copy
SAP HANA Backup and Recovery Database copy – overview You can copy a database using SAP HANA’s standard backup/recovery functions A typical use case would be to copy your production system to a smaller QA system. Note that if the target system has less resources, e.g. less CPU and RAM, performance cannot be expected to be the same as in the source system. As a basis for a database copy, you can use a full backup: data backup to the file system/Backint or a snapshot. You can choose to also use delta backups/log backups The number of hosts can differ between source and target system The following scenarios are possible: n n hosts n n+x hosts (not supported for snapshots) n n-x hosts (not supported for snapshots) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
67
SAP HANA Backup and Recovery Database copy from n n Source and target system have the same number of hosts
Host n
Host n
Host 2
Host 2
Index Server
Index Server
Host 1
Host 1
Index Server
Index Server
Index Server 1
Index Server 1
Source database with n hosts (e.g. PROD) © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Data backup or snapshot + log backups
Target database with n hosts (e.g. DEV) Public
68
SAP HANA Backup and Recovery Database copy from n n+x First copy to a system with the same number of hosts (n n), then add more hosts (+x)
Host n
Host n
Host n Host 2
Index Server
Index Server
Index Server
Host 2
Host 1
Host 1
Index Server
Index Server
Index Server 1
Index Server 1
Source database with n hosts (e.g. PROD)
Host 3
Host 2
Data backup + log backups
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Target database with n hosts (e.g. PROD_NEW)
Index Server
Add host and distribute data
Host 1 Index Server Index Server 1
Target database with n+1 hosts (e.g. PROD_NEW) Public
69
SAP HANA Backup and Recovery Database copy from n n-x Before you copy the database, configure x additional index servers in the target system
Host n
Host 2
Host 2 Index Server
Host 1
Host 1
Index Server
Index Server
Index Server 1
Index Server 1
Index Server 2
Source database with n hosts (e.g. PROD)
Node 2
Data backup + log backups
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Node 1 Remove additional index servers
Index Server Index Server 1
Target database with n-1 hosts (e.g. QA) Public
70
Integration with Dynamic Tiering
SAP HANA Backup and Recovery Dynamic tiering – overview Dynamic tiering is an add-on option for SAP HANA for managing data of different temperatures Backup and recovery always apply to all of SAP HANA, both the hot and the warm store
Hot data Always in memory Classical SAP HANA database tables
Fast data movement and optimized push down query processing
Warm data In extended table = disk-based columnar table “Dynamic Tiering” option
Note: Snapshots are currently not supported © 2015 SAP SE or an SAP affiliate company. All rights reserved.
SAP HANA hot store (in-memory)
Hot table (definition/data)
Extended table (definition)
SAP HANA
Extended table (data)
SAP HANA warm store (dynamic tiering)
All data of extended table resides in warm store Public
72
SAP HANA Backup and Recovery Dynamic tiering – backup/recovery Backup Backup paths for the warm store are the same as for the hot store Data backups are carried out as usual for SAP HANA either using SAP HANA Studio, SAP HANA Cockpit, or SQL commands. They will automatically include the warm store Log backups are carried out automatically (unless disabled) The SAP HANA backup catalog also contains information about backups of the warm store
Recovery Both data and log backups for the hot and the warm store are required for a recovery. You cannot recover one without the other The number and type of services must be identical in both the source and target system Recovery can be carried out in SAP HANA Studio or using SQL commands
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
73
Backint certification
SAP HANA Backup and Recovery Backint certification – certified tools Certification is an installation prerequisite for tools using the “Backint for SAP HANA” API See SAP Note 1730932 (Using backup tools with Backint)
Certified tools (as of 2016.05.) Vendor
Backup tool
On Intel On POWER Support process Architecture Architecture (SAP Notes)
Allen Systems
ASG-Time Navigator 4.4
2212571
Commvault
Simpana 10.0, Hitachi Data Protection Suite 10 (via Simpana Backint interface)
1957450
EMC
Networker 8.2, Interface for Data Domain Boost 1.0
1999166, 1970559
HP
Data Protector 7.0, 8.1, 9.0; StoreOnce Plug-in for SAP HANA 1.0
1970558
IBM
Tivoli Storage Manager for Enterprise 6.4
1913500
Spectrum Protect for Enterprise Resource Planning 7.1
New
1913500
Libelle
BusinessShadow 6.0.6
2212575
SEP
Sesam 4.4
2024234
Veritas (Symantec)
NetBackup 7.7
1913568
New Version
Online listing of certified tools: Application Development Partner Directory Enter the search term HANA-BRINT and click on a partner name ”SAP Certified Solutions” for further details © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
75
What’s new? SAP HANA SPS12 and SPS11
SAP HANA Backup and Recovery What’s New in SAP HANA SPS12 Backup Data backup scheduling capability in the SAP HANA cockpit Show the approximate size of backup Customize the backup overview page concerning the backup prefix
Recovery Improved log replay during resume recovery
Supportability Reconstruct the SAP HANA backup catalog using file-based delta data backups Single DB copy using Backint-based data backup w/o accessing the backup catalog Recovery with storage snapshots and delta backups
Backint certifications: New certification: IBM Spectrum Protect for Enterprise Resource Planning 7.1 (POWER architecture) Recertification: Veritas NetBackup 7.7 (Intel architecture)
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
77
SAP HANA Backup and Recovery What’s New in SAP HANA SPS11 Backup Extended backup functionality in SAP HANA Cockpit – Support for delta backups – Filtering and sorting of the backup catalog
Recovery Resume recovery after error during log replay MDC: Configure target host for tenant recovery
Backint Multiple parallel data backup streams New certifications: Allen Systems ASG-Time Navigator 4.4, HP StoreOnce Plug-in for SAP HANA 1.0, Libelle BusinessShadow 6.0.6, IBM Spectrum Protect for Enterprise Resource Planning 7.1 (certified for POWER architectures)
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
78
More information
SAP HANA Backup and Recovery More information Documentation: SAP Help Portal – Administration Guide, Technical Operations Manual, SQL Reference Guide Overview presentation: SAP HANA Backup/Recovery Overview Certification: “Backint for SAP HANA” Certification Best practice: SAP Note 2091951: SAP HANA Backup and Restore Training: HA200: SAP HANA - Operations & Administration SAP Note
Title
1642148
FAQ: SAP HANA database backup and recovery
2031547
Backint Tools und Support
2039883
FAQ: SAP HANA database and storage snapshots
2165547
FAQ: SAP HANA Database Backup & Recovery in a SAP HANA System Replication landscape
2021789
SAP HANA revision and maintenance strategy
Further SAP notes are available on component HAN-DB-BAC © 2015 SAP SE or an SAP affiliate company. All rights reserved.
Public
81
Thank You! Contact information: Stephanie Lewellen, SAP HANA Product Management [email protected]
© 2015 SAP SE or an SAP affiliate company. All rights reserved.