This document explains how to automate the migration of your self-managed Redis
and Valkey workloads into Memorystore for Valkey. Migrating to a fully managed
environment eliminates the operational burden of managing your own
infrastructure, so you don't have to handle manual OS patching, replication
setup, or custom backup scripts. This feature lets you take advantage of
built-in automatic failover, secure VPC connectivity, and zero-downtime scaling.

By migrating your self-managed workloads into Memorystore for Valkey, you
unlock the following advantages that eliminate operational toil and modernize
your database infrastructure:

- **Eliminate your operational overhead**: offload manual and time-consuming tasks to Google Cloud, such as OS patching, infrastructure monitoring, backup scripts, and replication management. As a result, you can focus on application development instead of database maintenance.
- **Achieve enterprise-grade high availability**: benefit from a fully managed 99.99% SLA. Memorystore for Valkey provides automatic failover and built-in backup and restore capabilities. This protects your applications from unexpected node failures and ensures rapid disaster recovery.
- **Scale with near-zero downtime**: dynamically scale your instances in or out to match unpredictable traffic spikes. You can expand to hundreds of nodes (up to 250 shards) without taking your applications offline.
- **Enhance your security**: replace complex, manually configured network rules with secure, built-in VPC connectivity and granular Identity and Access Management (IAM)-based access controls. This ensures that Google Cloud's strict security boundaries protect your data.
- **Consolidate and upgrade your instances**: merge your scattered, siloed, and self-managed instances into a single, high-performance deployment in Memorystore for Valkey. As part of this migration, you can also automatically upgrade your outdated Redis or Valkey versions to the latest supported releases.
- **Unlock advanced real-time analytics and GenAI**: transition to an optimized environment that delivers microsecond latencies for caching and session management. To power your generative AI (GenAI) applications, you gain immediate, managed access to advanced features like Vector Search.

## Version support

The table in this section lists the following information about the source Redis
and Valkey self-managed instances, and the target instances in
Memorystore for Valkey:

- The types and versions of the source instances that the migration supports
- The versions of the target Memorystore for Valkey instances to which you can migrate your workloads

| **Source instance type** | **Source instance version** | **Target instance version** |
|---|---|---|
| Redis | 3.2.x - 7.2.x | Valkey 7.2, 8.0, 9.0, and 9.1 |
| Valkey | 7.x, 8.x, and 9.x | Valkey 7.2, 8.0, 9.0, and 9.1 |

> [!CAUTION]
> **Important** : The version of the target instance *must* be the same or a later version than the source instance. You can't downgrade the target instance to an earlier version.

## Before you begin

Before you begin to migrate your workloads, complete the prerequisites in this
section.

### Use the Google Cloud console, gcloud CLI, and APIs

To use the Google Cloud console, Google Cloud CLI (gcloud CLI), and APIs,
do the following:

1. [Install](https://docs.cloud.google.com/sdk/docs/install) and
   [initialize](https://docs.cloud.google.com/sdk/docs/initialize.md.txt) the Google Cloud CLI.

   If you installed the gcloud CLI previously, then make sure that
   you have the latest version by running
   [`gcloud components
   update`](https://docs.cloud.google.com/sdk/gcloud/reference/components/update). To access the Memorystore for Valkey gcloud CLI
   commands, you need at least gcloud CLI version
   `489.0.0`.
2. Enable the Memorystore for Valkey API.   
   [Memorystore for Valkey API](https://console.cloud.google.com/apis/library/memorystore.googleapis.com)
3. Enable the Network Connectivity API.   
   [Network Connectivity API](https://console.cloud.google.com/apis/library/networkconnectivity.googleapis.com)
4. Enable the Service Consumer Management API.   
   [Service Consumer Management API](https://console.cloud.google.com/apis/library/serviceconsumermanagement.googleapis.com)
5. Enable the Compute Engine API.   
   [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com)

### Assign roles and permissions

To migrate your self-managed Redis and Valkey workloads into
Memorystore for Valkey, ask your administrator to
grant you the Memorystore Admin (`roles/memorystore.admin`)
IAM role on your Google Cloud project. For more information
about this role, see [Predefined roles](https://docs.cloud.google.com/memorystore/docs/valkey/access-control.md.txt#predefined_roles).

To create and view network attachments, ask your administrator to grant you the
Compute Network Admin (`roles/compute.networkAdmin`) IAM role on
your Google Cloud project. For more information about this role, see
[Compute Engine roles](https://docs.cloud.google.com/iam/docs/roles-permissions/compute.md.txt#compute-engine-roles).

## Workflow to migrate your workloads

To migrate your self-managed Redis and Valkey workloads into
Memorystore for Valkey, perform the following actions:

1. **Prepare your source instance**: configure your self-managed Redis or Valkey instance to allow secure connections and outbound replication to Memorystore for Valkey.
2. **Prepare the target instance**: determine your required instance specifications, such as the shard count and node type.
3. **Create the target instance**: provision the Memorystore for Valkey instance that receives your migrated data.
4. **Configure a network attachment**: set up a network attachment. This attachment lets the target instance (which resides in a Google-managed VPC network) initiate connections to the source instance (which resides in your VPC network). As a result, replication is established.
5. **Start the migration**: initiate the synchronization process. The target instance automatically connects to your source instance and continuously replicates your data as a read replica.
6. **Monitor the migration** : verify that the migration progresses without issues and that the status of the migration is **HEALTHY**.
7. **Finish the migration**: cut over your application traffic to the target instance.

## Prepare your source instance

You must prepare your self-managed Redis or Valkey instance so that you can
migrate your workloads into a target Memorystore for Valkey instance.

To allow connections from the nodes of the target instance to the nodes of
the source instance, do the following:

- If you enabled **protected-mode** on the source nodes, then deactivate it.
- If you configured the source nodes by using an explicit `bind` directive, then update the nodes to allow incoming connections from the target nodes. The target nodes initiate connections from the IP addresses in the network attachment's subnet.
- Update any firewall rules that might block incoming connections from the target nodes.
- If you enabled authentication and Transport Layer Security (TLS) on the source nodes, then deactivate them.

To let the target nodes establish replication with the source nodes, do the
following:

- Don't rename any Valkey or Redis commands that perform data modification or are used for replication (for example, `PING`, `PSYNC`, and `HSET`).
- If you use access control lists (ACL) for your instance, then allow the following commands for the `default` user so that the target instance can establish replication:
  - `REPLCONF`
  - `SYNC`
  - `PSYNC`
  - `PING`
  - `INFO`
  - `CLUSTER` \| `NODES`
- Ensure that the source instance has enough memory and CPU capacity to manage the additional replication load from the target nodes.

> [!CAUTION]
> **Important**: Make a note of the IP address and port number of the
> source instance. You need this information to start the migration process.
>
> Also, Memorystore for Valkey must be able to communicate with this IP
> address and port throughout the migration process. Memorystore for Valkey uses
> the IP address and port to automatically discover the other nodes in the
> instance's topology.

## Prepare the target instance

To ensure a smooth replication process, you must size your target
Memorystore for Valkey instance appropriately to handle the incoming workload
from your source instance. To do this, determine the exact specifications for
your target instance. These specifications include the compatibility with the
source instance, cluster mode, number of databases, shard count, instance
version, and node type.

To prepare the target instance, use the following guidelines:

- **Compatibility with the source instance**: the source and target instances must reside in the same Google Cloud project and region.
- **Cluster mode**: the cluster mode of the target instance must match the cluster mode of the source instance. If the source instance is Cluster Mode Disabled, then the target instance must also be Cluster Mode Disabled. Otherwise, the target instance must be Cluster Mode Enabled.
- **Number of databases**: if the target instance is Cluster Mode Disabled, then the number of logical databases on the instance must be equal to or greater than the number of databases on the source instance.
- **Shard count**: if the target instance is Cluster Mode Enabled, then the number of shards on the instance must match the number of shards on the source instance. However, the number of replicas on the source and target instances can be different.
- **Instance version** : the version of the target instance must be compatible with the version of the source instance. For more information, see [Version support](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#version-support).
- **Maintenance version** : the maintenance version of the target instance must be `MEMORYSTORE_20260313_01_00` or later. For more information, see [About maintenance](https://docs.cloud.google.com/memorystore/docs/valkey/about-maintenance.md.txt).
- **Node type** : the node type of the target instance must be large enough to handle the data that it receives from source nodes. For more information about the node types that you can select for the target instance and the corresponding keyspace capacity for each node type, see [Node type specification](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#node_type_specification).

> [!CAUTION]
> **Important**: You can't use cross-region replication instances as target instances. Also, verify that Memorystore for Valkey doesn't block any of the commands that you use in the source instance.

## Create the target instance

If you don't have a target instance that meets the requirements to receive the
data that Memorystore for Valkey migrates from the source instance, then you
must create the instance.

To create this instance, use the Google Cloud console, the
[gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt), or the REST API. For more information
about creating the instance, see [Create instances](https://docs.cloud.google.com/memorystore/docs/valkey/create-instances.md.txt).

> [!CAUTION]
> **Important** : Before you create the target instance, review the guidelines to size and configure it appropriately. For more information, see [Prepare the target
> instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads#prepare-target-instance).

## Configure a network attachment

To migrate the workloads of a source instance into a target instance, the
target nodes must connect to the source nodes. To enable this connection, you
must use a network attachment. The target nodes initiate connections from the
subnet in the source instance's VPC network that's linked to the network
attachment.

The following diagram illustrates how a target instance connects to a source
instance in a VPC network by using a network attachment and
Private Service Connect interfaces.

![](https://docs.cloud.google.com/static/memorystore/img/Migration_Architecture_03072026.png)

You can use a network attachment that meets the following requirements:

- It must reside in the same Google Cloud project and region as the target instance.
- Its subnet must be located within the same VPC network as the source instance.
- The subnet for the source instance must have an adequate IP CIDR range that supports a minimum of `N+1` usable IP addresses (where `N` is the number of nodes in the target instance). For example, if a target instance has three shards and one replica, then it has six nodes: three nodes for the primary instance and three nodes for the replica. Therefore, you need at least seven IP addresses.
- The subnet range can't overlap with `10.0.0.0/23` because Memorystore for Valkey reserves this range.

If your network attachment doesn't meet these requirements or you don't have a
network attachment, then you must create one. For more information, see
[Create network attachments](https://docs.cloud.google.com/vpc/docs/create-manage-network-attachments.md.txt#create-network-attachments).

## Start the migration

By starting the migration, the target instance establishes replication with the
source instance. The target instance automatically replicates any data that your
application writes to the source instance. The target instance becomes a read
replica of the source instance.

To start the migration, use the Google Cloud console, the
gcloud CLI, or the REST API.

> [!CAUTION]
> **Important** : Before you start the migration, review the guidelines in [Configure a network attachment](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#configure-network-attachment). Also, after you start the migration, don't conduct slot migration operations on the source instance (such as rebalancing the instance or manually moving hash slots between shards) until after you finish the migration.

### Console

1. In the Google Cloud console, go to the **Memorystore for Valkey**
   page.

   [Memorystore for Valkey](https://console.cloud.google.com/memorystore/valkey/instances)
2. Click the ID of the target instance.

3. On the **Instance at a glance** page, click **Start migration**.

4. In the **Migrate Self Managed Redis and Valkey Instances** window, do the
   following:

5. On the **Prepare** tab, read the information about the prerequisites for
   the source instance and the guidelines for the network attachment. Then,
   click **Continue**.

6. On the **Connect** tab, do the following:

   1. Enter the **IP Address** and **Port** of the source instance. You noted this information in [Prepare your source instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#prepare-source-instance).
   2. Select the network attachment that you want to use to migrate data.
   3. Click **Continue**.
7. On the **Review** tab, review the information that's associated with the
   migration process. This information includes the ID of the target instance,
   the IP address and port of the source instance, and the name of the network
   attachment. After reviewing this information, click **Start migration**.

8. On the **Instance at a glance** page, verify that a **Migrating** status
   appears.

If the target nodes can't connect to the source nodes, or if the source
instance can't replicate data to the target instance, then the migration
fails.

When this occurs, Memorystore for Valkey rolls back the target instance to its
state before you started the migration process. The status of the target
instance reverts to **Ready**, and the instance has both read and write
capabilities again.

After you resolve the issues that caused the migration to fail, you can start
the migration again.

### gcloud

Use the [`gcloud memorystore instances start-migration`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/start-migration.md.txt) command, as follows:

```
gcloud memorystore instances start-migration INSTANCE_ID \
--project=PROJECT_ID \
--location=REGION_ID \
--source-ip=SOURCE_IP_ADDRESS \
--source-port=SOURCE_PORT \
--network-attachment=projects/PROJECT_ID/locations/REGION_ID/networkAttachments/NETWORK_ATTACHMENT_ID
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the target instance.
- <var translate="no">PROJECT_ID</var>: the ID or project number of the Google Cloud project that contains this instance.
- <var translate="no">REGION_ID</var>: the ID of the region where the instance is located.
- <var translate="no">SOURCE_IP_ADDRESS</var>: the IP address of the source instance. You noted this IP address in [Prepare your source instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#prepare-source-instance).
- <var translate="no">SOURCE_PORT</var>: the port number of the source instance. You noted this port in [Prepare your source instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#prepare-source-instance).
- <var translate="no">NETWORK_ATTACHMENT_ID</var>: the ID of the network attachment.

To confirm that the migration has started successfully, use the
[`gcloud memorystore instances describe`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/describe) command, as follows:

```
gcloud memorystore instances describe INSTANCE_ID \
--project=PROJECT_ID \
--location=REGION_ID
```

Verify that a `MIGRATING` status appears next to the `state` parameter.

If the target nodes can't connect to the source nodes, or if the source
instance can't replicate data to the target instance, then the migration
fails.

When this occurs, Memorystore for Valkey rolls back the target instance to its
state before you started the migration process. The status of the target
instance reverts to `ACTIVE`, and the instance has both read and write
capabilities again.

After you resolve the issues that caused the migration to fail, you can start
the migration again.

### REST

To start the migration, use the following REST API command.


Before using any of the request data,
make the following replacements:

- <var translate="no">PROJECT_ID</var>: the ID or project number of the Google Cloud project that contains the target instance.
- <var translate="no">REGION_ID</var>: the ID of the region where this instance is located.
- <var translate="no">INSTANCE_ID</var>: the ID of the instance.
- <var translate="no">SOURCE_IP_ADDRESS</var>: the IP address of the source instance. You noted this IP address in [Prepare your source instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#prepare-source-instance).
- <var translate="no">SOURCE_PORT</var>: the port number of the source instance. You noted this port in [Prepare your source instance](https://docs.cloud.google.com/memorystore/docs/valkey/migrate-workloads.md.txt#prepare-source-instance).
- <var translate="no">NETWORK_ATTACHMENT_ID</var>: the ID of the network attachment.


HTTP method and URL:

```
POST https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:startMigration
```


Request JSON body:

```
{
  "selfManagedSource": {
    "ipAddress": "SOURCE_IP_ADDRESS",
    "port": SOURCE_PORT,
    "networkAttachment": "projects/PROJECT_ID/regions/REGION_ID/networkAttachments/NETWORK_ATTACHMENT_ID"
  }
}
```

To send your request, expand one of these options:

#### curl (Linux, macOS, or Cloud Shell)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Save the request body in a file named `request.json`,
and execute the following command:

```
curl -X POST \
     -H "Authorization: Bearer $(gcloud auth print-access-token)" \
     -H "Content-Type: application/json; charset=utf-8" \
     -d @request.json \
     "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:startMigration"
```

#### PowerShell (Windows)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Save the request body in a file named `request.json`,
and execute the following command:

```
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/json; charset=utf-8" `
    -InFile request.json `
    -Uri "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:startMigration" | Select-Object -Expand Content
```

You should receive a JSON response similar to the following:

```
{
  "name": "projects/PROJECT_ID/locations/REGION_ID/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.memorystore.v1.OperationMetadata",
    "createTime": "2026-10-26T20:00:00.000000000Z",
    "target": "projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID",
    "verb": "startMigration",
    "requestedCancellation": false,
    "apiVersion": "v1"
  },
  "done": false
}
```

<br />

## Monitor the migration

To ensure that the migration progresses without issues, monitor both the source
and target instances.

### Monitor the source instance

On the source instance, verify that the client output buffer usage remains low
on the source nodes. To check the buffer usage, do one of the following:

- Use your existing monitoring dashboards
- Connect to your source instance with your Redis or Valkey client, and then run the `INFO CLIENTS` command to check the output buffer metrics

Sustained low usage indicates a minimal lag and a successful synchronization of
the data from the source instance to the target instance.

### Monitor the target instance

You can monitor the health of the migration from the source instance to
Memorystore for Valkey. To do this, check the **Migration status**
[(`/instance/migration_status`)](https://docs.cloud.google.com/memorystore/docs/valkey/supported-monitoring-metrics.md.txt#cloud-monitoring-metrics) metric for the target
instance to verify that the current status of the instance is **HEALTHY**. This
status indicates that the replication links between the shards of the source and
target instances are active and functioning correctly during the migration
process.

To check the **Migration status** metric for the instance using the
Google Cloud console, do the following:

1. In the Google Cloud console, go to the **Metrics explorer** page.

   [Metrics explorer](https://console.cloud.google.com/monitoring/metrics-explorer)
2. From the **Metric** menu, select the **Migration status** metric. To do this,
   select **Memorystore Instance \> Instance \> Migration status** ,
   and then click **Apply**.

3. From the **Filter** field, add the following filter:
   `instance_id = (equals) INSTANCE_ID`.

   Replace <var translate="no">INSTANCE_ID</var> with the ID of the target instance.
4. In the **Results** section, check the current status of the instance. If a
   **HEALTHY** status appears, then the instance is functioning, and you can finish
   the migration.

   If the **HEALTHY** status doesn't appear, then you can use the
   **Migration status** metric for the primary nodes of the target instance. By
   monitoring these nodes, you can determine whether any specific node isn't
   healthy.

   To use the **Migration status** metric for the instance nodes, do the
   following:
   1. From the **Metric** menu, select the **Migration status** metric. To
      do this, select **Memorystore Instance Node
      \> Instance
      \> Migration status** , and then
      click **Apply**.

   2. From the **Filter** field, add the following filter:
      `role = (equals) primary`.

   3. In the **Results** section, verify that the current status of all primary
      nodes is **HEALTHY** . If the status is **HEALTHY**, then the nodes are
      functioning and you can finish the migration.

## Finish the migration

To finish the migration, use the Google Cloud console, the
gcloud CLI, or the REST API.

> [!CAUTION]
> **Important** : By default, Memorystore for Valkey
> ensures that the target instance is fully caught up to the source instance up to
> the time that you finish the migration. Any writes to the source instance
> *after* you finish the migration might not be replicated.
>
> If you
> want total data consistency between the source and target instances, and no
> data loss, then before you finish the migration, stop all write operations to
> the source instance.

### Console

1. In the Google Cloud console, go to the **Memorystore for Valkey**
   page.

   [Memorystore for Valkey](https://console.cloud.google.com/memorystore/valkey/instances)
2. Click the ID of the target instance.

3. On the **Instance at a glance** page, click **Finish migration**.

4. In the **Finish migration** dialog, do the following:

   1. If you want to ensure that the target instance replicates all data
      from the source instance, then select **Standard**.

      > [!CAUTION]
      > **Caution** : If you want to cut over your application traffic to the target instance immediately, then select **Force (Skip-sync)**. However, if you make this selection, then Memorystore for Valkey might not be able to replicate all data on the source instance into the target instance.

   2. In the **Instance ID** text field, enter the ID of the target
      instance.

   3. Click **Finish migration**.

5. On the **Instance at a glance** page, verify that a **Migrated** status
   appears.

> [!CAUTION]
> **Important**: After you finish the migration, update your application's configuration files to point all traffic to the target instance.

### gcloud

Use the [`gcloud memorystore instances finish-migration`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/finish-migration.md.txt) command, as follows:

```
gcloud memorystore instances finish-migration INSTANCE_ID \
--project=PROJECT_ID \
--location=REGION_ID
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the target instance
- <var translate="no">PROJECT_ID</var>: the ID or project number of the Google Cloud project that contains this instance
- <var translate="no">REGION_ID</var>: the ID of the region where the instance is located

> [!CAUTION]
> **Caution** : If you want to cut over your application traffic to the target instance immediately, then use the `--force` parameter. However, by using this parameter, Memorystore for Valkey might not be able to replicate all data on the source instance into the target instance.

To confirm that the migration finishes successfully, use the
[`gcloud memorystore instances describe`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/describe) command, as follows:

```
gcloud memorystore instances describe INSTANCE_ID \
--project=PROJECT_ID \
--location=REGION_ID
```

Verify that a `MIGRATED` status appears next to the `state` parameter.

> [!CAUTION]
> **Important**: After you finish the migration, update your application's configuration files to point all traffic to the target instance.

### REST

To finish the migration, use the following REST API command.


Before using any of the request data,
make the following replacements:

- <var translate="no">PROJECT_ID</var>: the ID of the Google Cloud project that contains the target instance.
- <var translate="no">REGION_ID</var>: the ID of the region where this instance is located.
- <var translate="no">INSTANCE_ID</var>: the ID of the instance.
- <var translate="no">FORCE_BOOLEAN</var>: optional. This parameter determines whether
  Memorystore for Valkey forces the migration to finish immediately.

  - If you set this parameter to `true`, then Memorystore for Valkey finishes the migration immediately so that you can cut over your application traffic to the target instance. However, Memorystore for Valkey might not be able to replicate all data from the source instance to the target instance.
  - If you set this parameter to `false`, then Memorystore for Valkey replicates all data from the source instance to the target instance up to the time that you finish the migration.


HTTP method and URL:

```
POST https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:finishMigration
```


Request JSON body:

```
{
  "force": FORCE_BOOLEAN
}
```

To send your request, expand one of these options:

#### curl (Linux, macOS, or Cloud Shell)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Save the request body in a file named `request.json`,
and execute the following command:

```
curl -X POST \
     -H "Authorization: Bearer $(gcloud auth print-access-token)" \
     -H "Content-Type: application/json; charset=utf-8" \
     -d @request.json \
     "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:finishMigration"
```

#### PowerShell (Windows)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Save the request body in a file named `request.json`,
and execute the following command:

```
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
    -Method POST `
    -Headers $headers `
    -ContentType: "application/json; charset=utf-8" `
    -InFile request.json `
    -Uri "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID:finishMigration" | Select-Object -Expand Content
```

You should receive a JSON response similar to the following:

```
{
  "name": "projects/PROJECT_ID/locations/REGION_ID/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.memorystore.v1.OperationMetadata",
    "createTime": "2026-10-26T20:00:00.000000000Z",
    "target": "projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID",
    "verb": "finishMigration",
    "requestedCancellation": false,
    "apiVersion": "v1"
  },
  "done": false
}
```

<br />