Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Folgen Sie der Anleitung auf dieser Seite, um eine RDB-Sicherung in Ihre Memorystore for Redis-Instanz zu importieren.
Durch das Importieren einer Redis-Sicherung können Sie Daten aus einer anderen Instanz migrieren oder Instanzdaten aus einer vorherigen RDB-Sicherung wiederherstellen. Weitere Informationen zu Importen, Exporten und Best Practices finden Sie unter Übersicht: Import und Export.
Hinweis
Sie benötigen einen Cloud Storage-Bucket, der die zu importierende RDB-Sicherungsdatei enthält. Wir empfehlen, dass Sie die Importe aus einem Bucket in derselben Region wie Ihre Memorystore-Instanz ausführen.
Informationen zum Erstellen eines Cloud Storage-Buckets finden Sie unter Buckets erstellen.
Importieren einer RDB-Sicherungsdatei in eine Redis-Instanz
Console
Rufen Sie in der Google Cloud Console die Seite Memorystore for Redis auf.
Memorystore for Redis
Klicken Sie auf Ihre Instanz-ID, um die Seite "Instanzdetails" aufzurufen.
Klicken Sie in der oberen Leiste auf die Schaltfläche Import.
Klicken Sie auf die Schaltfläche Durchsuchen und gehen Sie zu dem Cloud Storage-Bucket, in dem die RDB-Datei gespeichert ist, die Sie importieren möchten.
Klicken Sie auf die RDB-Datei und dann auf die Schaltfläche Auswählen.
Klicken Sie auf Importieren.
Bestätigen Sie, dass der Import erfolgen soll und klicken Sie auf die Schaltfläche Importieren.
gcloud
Importieren Sie die RDB-Datei aus dem Cloud Storage-Bucket, auf den in Schritt 1 der Anleitung Vorbereitung verwiesen wurde. Führen Sie dazu den folgenden Befehl aus:
Instanzverfügbarkeit und -verhalten beim Importieren
Beim Importieren werden alle aktuellen Instanzdaten überschrieben. Stellen Sie daher sicher, dass Ihre Daten überschrieben werden können, bevor Sie einen Import starten.
Die Redis-Instanz ist während des Importvorgangs nicht verfügbar. Sie können erst dann auf Instanzdaten zugreifen oder die Instanz ändern, wenn der Import abgeschlossen ist.
Der Import kann zwischen einigen Minuten und wenigen Stunden dauern. Wenn Sie beispielsweise eine RDB-Datei mit 8 GB in eine Instanz mit 10 GB importieren, kann der Import 5 Minuten dauern. Wenn Sie eine RDB-Datei mit 100 GB in eine 120-GB-Instanz importieren, kann der Import 1 Stunde dauern. Den Fortschritt des Imports können Sie auf der Seite mit den Instanzdetails prüfen. Dort wird der Status des Vorgangs angezeigt.
Eine Instanz kann nur Sicherungen aus älteren Redis-Versionen importieren. Eine Instanz mit Redis 5.0 kann eine aus Redis 4.0 exportierte RDB importieren, eine Instanz mit Redis 4.0 jedoch keine RDB aus Redis 5.0.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[],[],null,["# Import data to a Redis instance\n\n| **Note:** You should only run an import operation if you are willing to overwrite all current instance data. If the operation fails, you could lose all current instance data.\n\nFollow the instructions on this page to import an RDB backup into your\nMemorystore for Redis instance.\n\nImporting a Redis backup allows you to migrate data from another instance or\nrestore your instance data from a previous RDB backup. For additional\ninformation about imports, exports, and best practices, see [Import and export overview](/memorystore/docs/redis/import-export-overview).\n\nBefore you begin\n----------------\n\n1. Have a Cloud Storage bucket that contains the RDB backup file that you\n want to import. We recommend that you import from a bucket in the same region\n as your Memorystore instance.\n\n To create a Cloud Storage bucket, see [Create buckets](/storage/docs/creating-buckets#storage-create-bucket-cli).\n\n To upload a file into a Cloud Storage bucket, see [Exporting data from a Redis instance](/memorystore/docs/redis/export-data) or [Upload objects from a filesystem](/storage/docs/uploading-objects).\n2. Have [sufficient permissions](/memorystore/docs/redis/import-export-restricted-permissions)\n to perform the import.\n\nImport an RDB backup file into a Redis instance\n-----------------------------------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n\n2. Click your instance ID to view the instance details page.\n\n3. Click the **Import** button in the top bar.\n\n4. Click the **Browse** button and navigate to the Cloud Storage\n bucket that stores the RDB file you want to import.\n\n5. Click the RDB file and then click the **Select** button.\n\n6. Click the **Import** button.\n\n7. Confirm that you want to import, and click the **Import** button.\n\n### Gcloud\n\n1. Import the RDB file from the Cloud Storage bucket referred to in step one of [Before you begin](/memorystore/docs/redis/import-data#before_you_begin) by executing the following command: \n\n ```\n gcloud redis instances import gs://[BUCKET_NAME]/[FILE_NAME].rdb [INSTANCE_ID] --region=[REGION] --project=[PROJECT_ID]\n ```\n\nStop an ongoing import operation\n--------------------------------\n\n### Console\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n\n2. Click the Instance ID to view its information.\n\n3. Click the **Stop import** button.\n\n### Gcloud\n\n\nTo stop an import operation, first you need to find the operation ID by\nrunning the following command: \n\n```\ngcloud redis operations list --region=[REGION] -project=[PROJECT]\n```\n\nOnce you have the operation ID, run the following command: \n\n```\ngcloud redis operations cancel [OPERATION_ID] --region=[REGION] --project=[PROJECT]\n```\n\nInstance availability and behavior while importing\n--------------------------------------------------\n\n- Importing overwrites all current instance data, so make sure that you are okay\n with your data being overwritten before you start an import.\n\n- Your Redis instance is unavailable during the import process. You cannot\n access instance data or modify the instance until the import is complete.\n\n- The import can take anywhere from a few minutes to a few hours. For example,\n if you import an 8 GB RDB file into a 10GB instance, the import can take 5\n minutes, and if you import a 100GB RDB file into a 120GB instance, the import\n can take an hour. To monitor the progress of the import, check the instance\n details page, which displays the status of the operation.\n\n- An instance can only import backups from older Redis versions. An instance\n running Redis 5.0 can import an RDB exported from Redis 4.0, but an instance\n running Redis 4.0 cannot import an RDB from Redis 5.0.\n\nWhat's next\n-----------\n\n- Learn about import and export feature behavior and best practices with [Import and export overview](/memorystore/docs/redis/import-export-overview)."]]