Home > Enterprise >  Data Migration from Snowflake (on GCP Instance) to Snowflake (Azure Instance)
Data Migration from Snowflake (on GCP Instance) to Snowflake (Azure Instance)

Time:04-21

I am looking for some inputs on how to do a GCP cloud to AZURE cloud data migration.

Scenario -

I have a snowflake instance configured on GCP cloud (multiple databases holding legacy data) and I have another snowflake instance configured on Azure Cloud (DWH created on this instance).

I want to move/copy the data of all the databases (including all child objects - schema, table, views etc) sitting on GCP snowflake instance to snowflake instance configured on Azure Cloud.

Can you please guide me on what can be the best solution for such data migration and any steps or documentation link would be really helpful.

Many thanks - Minti

CodePudding user response:

Please check the Database replication mechanism which can be used as a migration tool for SF account from 1 cloud platform to another. https://docs.snowflake.com/en/user-guide/database-replication-intro.html

CodePudding user response:

Not something I've done before to be honest but if you didn't want to use external tools one possible method would be to secure share your GCP databases with your Azure Snowflake account.

You then might be able to create a new database that is a clone of this share (not sure if this is possible).

Most objects get cloned apart from stages and pipes but tables, views etc should carry over

CodePudding user response:

The steps involved are

  1. Creation of the Target account in the required region/cloud by involving SE (Sales engineer) or Account Owner.
  2. Open a support case with Snowflake Support to enable replication and failover capabilities between the source and target accounts.
  3. Re-create account level objects in the target account based on the source account. (Eg., users, roles).
  4. Replicate the databases from your source account to the target account.
  5. Freeze the Source account and make a final refresh.
  6. Fail-over the databases to the target account and make them Primary on it.
  7. Disable the replication on databases.
  8. Raising a support case for decommissioning of the source account [Optional]

Reference.

CodePudding user response:

This is a pretty easy process with a couple of prerequisites.

  1. Make sure you have Organizations enabled on your GCP account.
  • This feature allows you to self-provision Snowflake accounts on any cloud provider/region. Open a support case to enable it.
  • Introduction to Organizations
  1. Create a new account on Azure if you haven't already.

  2. Enable Replication on both accounts

  • This can be done when logged into the account with the ORGADMIN role
  1. Replicate your databases

Note: this will work for having a replica of the databases in the GCP Snowflake account databases in your Azure Snowflake account. If you want to permanently migrate your databases you need to set up Failover/Failback. This is a Business Critical feature, but Snowflake support will enable it for lower editions until you can complete your migration, at which point they will disable it.

Replicating a Database to Another Account

CodePudding user response:

There are two options

  1. You could make use of the replication feature

High level Steps include the below a. Target account to be created - Can use the Organizations feature available in Snowflake(Enabled by Snowflake Support upon request) b. Account level objects should be created manually in the target account

Note: The Failover feature is supported for the accounts whose edition is Business-critical and above. However, for account migration scenarios, this feature will be enabled for a temporary period by the Snowflake Support.

c. Replication - the below links can be referenced for a complete understanding of the process. https://docs.snowflake.com/en/user-guide/database-replication-intro.html#introduction-to-database-replication-across-multiple-accounts https://docs.snowflake.com/en/user-guide/database-replication-config.html#replicating-a-database-to-another-account https://docs.snowflake.com/en/user-guide/database-failover-config.html#failing-over-databases-across-multiple-accounts

Please find the link below to have an overview on the costs associated https://docs.snowflake.com/en/user-guide/database-replication-billing.html#understanding-billing-for-database-replication

Limitations https://docs.snowflake.com/en/user-guide/database-replication-intro.html#current-limitations-of-replication

  1. One other option is to create the target account and use the unloading and loading feature https://docs.snowflake.com/en/user-guide-data-unload.html https://docs.snowflake.com/en/user-guide-data-load.html
  • Related