Two ways to Migrate your SAP HANA Database to Google Cloud
Reading time: 5 mins
Key Takeaways
⇨ Flexible Scaling and Cost Efficiency: Migrating SAP S/4HANA to Google Cloud enables flexible, scalable architecture and pay-as-you-go cost efficiency.
⇨ Minimal Downtime with Built-in Features: Google Cloud's built-in features like Compute Engine live migration and automatic restart minimize downtime for infrastructure maintenance.
⇨ Enhanced Data Analytics: Integrating SAP data with Google Cloud technologies such as BigQuery enhances data processing and analytics capabilities.
Learn two methods for moving your current SAP environment unchanged onto Google Cloud.
Deploying an SAP HANA system on Google Cloud
Google Cloud offers SAP-certified virtual machines (VMs) optimized for SAP products, including SAP HANA and SAP HANA Enterprise Cloud, as well as dedicated servers for SAP HANA for environments greater than 12TB. (For a complete list of VM and hardware options, visit the Certified and Supported SAP HANA Hardware Directory.)
Before proceeding with a rehost migration to Google Cloud, your current (source) environment and Google Cloud (target) environments should meet these specifications:
Prerequisites:
- The configuration of the Google Cloud environment (i.e., VM resources, SSD storage capacity) should be identical to that of the source environment. If the underlying hardware is different, however, you must use Option 2 for your migration, detailed below.
- Both environments should be running the same operating system (SUSE or RHEL Linux).
- The HANA version, instance number, and system ID (SID) should be identical.
- Schema names must remain the same.
- Establishing the network connection between the on-premises environment and Google Cloud will be required in this phase to support rehost of the SAP application.you can use Cloud VPN or Dedicated Interconnect. Learn more about Dedicated Interconnect and Cloud VPN.
Note: Depending on your internet connection and bandwidth requirements, we recommend using a Dedicated Interconnect over Cloud VPN for production environments.
We offer a number of automated processes to accelerate your cloud journey. To deploy the SAP HANA system on Google Cloud, you can use the Google Cloud Deployment manager or Terraform and Ansible scripts available on GitHub with configuration file templates to define your installation. For more details, see the Google Cloud SAP HANA Planning Guide.
Note: To deploy SAP HANA on Google Cloud machine types that are certified by SAP for production, please review the Certification for SAP HANA on Google Cloud page.
Moving an SAP HANA Database to Google Cloud
There are two different options you can use to rehost your SAP HANA database to Google Cloud, and each has pros and cons that you should consider when deciding on your approach.
Option 1: Asynchronous replication uses SAP’s built-in replication tool to provide continuous data replication from the source system (also known as the primary system) to the destination or secondary system—in this case residing on Google Cloud. It’s best for mission-critical applications for which minimum downtime is a high priority, and for large databases. In addition, the high level of automation means that the process requires less manual intervention. Here’s where you can learn more on HANA Asynchronous Replication.
Option 2: Backup and restore relies on SAP’s backup utility to create an image of the database that is then transferred to Google Cloud, where it is restored in the new environment. Downtime for this method varies by database size, so large databases may require more downtime via this method vs. asynchronous replication. It also involves more manual tasks. However, it requires fewer resources to perform, making it an attractive option for less urgent use cases. Here’s where you can learn more on SAP HANA database Backup and restore.
Click to enlarge
Click to enlarge
- Create and configure Dedicated Interconnect or Cloud VPN between the current environment and Google Cloud.
- Set up SAP HANA asynchronous replication. You can configure system replication using SAP HANA Cockpit, SAP HANA Studio, or hdbnsutil. See Setting Up SAP HANA System Replication in the SAP HANA Administration Guide.
- Be sure to use the same instance number and HANA SID in the template as the primary instance.
- Configure the Google Cloud instance as the secondary node for using HANA Asynchronous replication.
- Perform data validation once full data replication is completed to the SAP HANA database in Google Cloud. To learn more: HANA System Replication overview.
- Perform an SAP HANA takeover on your standby database. This switches your active system from the current primary system onto the secondary system on Google Cloud. Once the takeover command runs, the system on Google Cloud becomes the new primary system.To learn more: HANA Takeover.
How to migrate the SAP HANA database to Google Cloud using Backup and Restore
Click to enlarge
- Create a full backup of your SAP HANA database in your current environment.
- Create a new storage bucket in your Google Cloud environment. Visit Creating Storage Buckets in the Google Cloud Storage documentation.
- Download and install gsutil onto the source environment and run it to upload the HANA backup to the Google Cloud storage bucket. To install gsutil utility on any computer or server, visit Install gsutil in the Google Cloud Storage documentation.
Note: You can run parallel multi thread/multi processing in gsutil to copy large files more quickly. - Recover the HANA database on Google Cloud using SAP’s RECOVER DATABASE statement. See RECOVER DATABASE Statement (Backup and Recovery) in the SAP HANA SQL Reference Guide for SAP HANA Platform.
Note: BackInt agent is an integrated SAP interface tool used for HANA database on Google Cloud.Backint agent for SAP HANA can be used to store and retrieve backups directly from Google Cloud Storage. It is supported and certified by SAP on Google Cloud. To learn more: SAP HANA Backint Agent on Google Cloud.
In summary, we recommend using Asynchronous Replication (Option 1) for mission-critical applications that require the lowest downtime window. For all other applications, we recommend Backup and Restore (Option 2), as this approach requires fewer resources. It’s also a great way to implement the backup and restore functionality on Google Cloud.
A rehost migration is the most straightforward path to getting your SAP on HANA system up and running on Google Cloud. And the sooner you migrate, the sooner you can take advantage of the many benefits Google Cloud brings to your SAP solution. For more information on the different migration options please review: SAP on Google Cloud: Migration strategies.
Learn more about deploying SAP on Google Cloud. Technical resources can be found here.
Ajay Asthana
SAP Cloud Consultant, Google Cloud Professional Services