Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to initiate a manual failover for a standard tier Memorystore for Redis instance. The manual failover feature allows you to test how normal failovers affect your application.
The limited-data-loss mode minimizes data loss by verifying that the
difference in data between the primary and replica is below 30 MB before
initiating the failover. The offset on the primary is incremented for each byte
of data that must be synchronized to its replicas. In the limited-data-loss
mode, the failover will abort if the greatest offset delta between the primary
and each replica is 30MB or greater. If you can tolerate more data loss and want
to aggressively execute the failover, try setting the data protection mode to
force-data-loss.
The force-data-loss mode employs a chain of failover strategies to
aggressively execute the failover. It does not check the offset delta between
the primary and replicas before initiating the failover; you can potentially
lose more than 30MB of data changes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Initiate a manual failover\n\n| **Note:** You can only initiate a manual failover using the gcloud CLI tool.\n\nThis page describes how to initiate a **manual failover** for a standard tier Memorystore for Redis instance. The manual failover feature allows you to test how normal failovers affect your application.\n\nFor an overview of this feature, see [Manual failover](/memorystore/docs/redis/manual-failover-overview).\n\nInitiating a failover\n---------------------\n\n| **Warning:** Using the `--data-protection-mode=force-data-loss` mode may cause significant data loss. See [Manual failover](/memorystore/docs/redis/manual-failover-overview) to learn the appropriate scenarios for using the `force-data-loss` mode.\n\n1. Open a terminal window\n\n2. Use the `gcloud config` command to set your default project:\n\n\n ```\n gcloud config set core/project PROJECT_ID\n ```\n\n \u003cbr /\u003e\n\n3. Use the following command to initiate a failover:\n\n\n ```\n gcloud redis instances failover INSTANCE_NAME\n ```\n\n \u003cbr /\u003e\n\nOptional data protection mode\n-----------------------------\n\nThe two available data protection modes are:\n\n- `limited-data-loss` mode (default).\n- `force-data-loss` mode.\n\nTo set the data protection mode, use one of the following commands: \n\n gcloud redis instances failover INSTANCE_NAME --data-protection-mode=limited-data-loss\n\nor \n\n gcloud redis instances failover INSTANCE_NAME --data-protection-mode=force-data-loss\n\nHow data protection modes work\n------------------------------\n\nThe `limited-data-loss` mode minimizes data loss by verifying that the\ndifference in data between the primary and replica is below 30 MB before\ninitiating the failover. The offset on the primary is incremented for each byte\nof data that must be synchronized to its replicas. In the `limited-data-loss`\nmode, the failover will abort if the greatest offset delta between the primary\nand each replica is 30MB or greater. If you can tolerate more data loss and want\nto aggressively execute the failover, try setting the data protection mode to\n`force-data-loss`.\n\nThe `force-data-loss` mode employs a chain of failover strategies to\naggressively execute the failover. It does not check the offset delta between\nthe primary and replicas before initiating the failover; you can potentially\nlose more than 30MB of data changes.\n\nSee [Manual failover](/memorystore/docs/redis/manual-failover-overview)\nfor additional information."]]