diff --git a/content/de/administration/data/bucket/on-demand-migration.md b/content/de/administration/data/bucket/on-demand-migration.md index ae90c94b..61f058c3 100644 --- a/content/de/administration/data/bucket/on-demand-migration.md +++ b/content/de/administration/data/bucket/on-demand-migration.md @@ -1,15 +1,21 @@ --- -title: "On-demand Migration aus Cloudflare R2" -description: "Hängen Sie einen Cloudflare-R2-Bucket als reine Lesequelle an und ziehen Sie Objekte bei einem Lese-Miss oder per Backfill nach RustFS." +title: "On-demand Migration" +description: "Ziehen Sie fehlende Objekte bei einem Lesevorgang oder per Backfill aus einer externen Quelle in einen RustFS-Bucket, mit Cloudflare R2 als Beispiel." --- -Die On-demand Migration zieht Objekte aus einem externen Bucket in einen RustFS-Bucket, wenn ein Client einen fehlenden Schlüssel liest oder wenn Sie einen Backfill starten. **Dieses Dokument verwendet Cloudflare R2 als Beispiel** von Anfang bis Ende. Die folgenden Schritte folgen einer Console-v1.0.3-Durchführung: Ein R2-Bucket wurde an einen leeren lokalen Bucket gehängt, die Verbindung geprüft und danach drei Abrufe ausgeführt — ein Objekt mit `rc cp`, ein Präfix-Backfill und ein Backfill des gesamten Quell-Namespace mit Testlauf. +Diese Seite erklärt die On-demand Migration, die Voraussetzungen und eine Migrationsdurchführung. Die Durchführung verwendet Cloudflare R2 als Beispiel. -RustFS liest die Quelle. Das Aktivierungsformular sagt, dass RustFS dort weder schreibt noch löscht. Die Migrationsseite sagt, dass RustFS Objekte nur beim Lesen oder beim Backfill zieht, dass neue `PUT`- und `DELETE`-Operationen in RustFS nicht zur Quelle synchronisiert werden und dass spätere Änderungen an der Quelle lokale Kopien nicht aktualisieren. +## 1. Überblick -Die Screenshots dieser Durchführung verwenden Platzhalter für die R2-Konto-ID und den Zugriffsschlüssel. Der Host in der Terminal-Eingabeaufforderung ist `localhost`. +Die On-demand Migration ist ein eingehender Abruf. Wenn ein Client einen Schlüssel liest, der im lokalen Bucket fehlt, liest RustFS das Objekt von der konfigurierten Quelle, liefert es aus und speichert es lokal. Sie können auch einen Backfill starten, um Schlüssel zu ziehen, die noch kein Client angefordert hat. Das Aktivierungsformular sagt, dass RustFS auf der Quelle weder schreibt noch löscht. Die Migrationsseite sagt, dass neue `PUT`- und `DELETE`-Operationen in RustFS nicht zur Quelle synchronisiert werden und dass spätere Änderungen an der Quelle lokale Kopien nicht aktualisieren. Die On-demand Migration ist keine fortlaufende Replikation von der Quelle. -## Quell-Provider +| Ziel | Verwenden | +| --- | --- | +| Objekte aus einem Provider der Liste unten nach RustFS ziehen, bei einem Lese-Miss oder per Backfill | On-demand Migration | +| Objektversionen aus einem RustFS-Bucket in einen anderen Bucket schieben | [Bucket-Replikation](./replication.md) | +| Standortkonfiguration und Identitätsdaten zwischen Bereitstellungen synchronisieren | [Site-Replikation](/de/operations/high-availability/site-replication) | + +Die [Bucket-Replikation](./replication.md) ist eine ausgehende Kopie von Objektversionen und setzt Versionierung auf beiden Buckets voraus. Nachdem ein Schlüssel lokal gespeichert ist, folgt die On-demand Migration der Quelle nicht weiter. **Source connection** → **Provider** listet diese Quellen. Die Namen sind die Console-Beschriftungen. Google Cloud Storage erscheint zweimal: HMAC und Native. @@ -24,29 +30,37 @@ Die Screenshots dieser Durchführung verwenden Platzhalter für die R2-Konto-ID ![Provider-Menü der RustFS-Console für die On-demand Migration mit Amazon S3, S3-compatible storage, MinIO, RustFS, Cloudflare R2, Google Cloud Storage (HMAC), Azure Blob Storage (Native) und Google Cloud Storage (Native)](./images/rustfs-console-on-demand-migration-source-providers.png) -Eine Migration von einem anderen Provider in dieser Liste folgt demselben Ablauf: einen leeren lokalen Bucket erstellen, die On-demand Migration aktivieren, **Provider** wählen, **Test connection** auswählen, **Enable migration** auswählen und danach bei einem GET-Miss oder per Backfill ziehen. Nur Endpunkt, Zugangsdaten und Bucket-Felder unterscheiden sich je nach Provider. Die R2-Durchführung unten füllt diese Felder für Cloudflare R2. +Wenn Sie einen Provider benötigen, der nicht in dieser Liste steht, öffnen Sie einen Pull Request im [RustFS-Repository](https://github.com/rustfs/rustfs) zur offiziellen Prüfung. -## On-demand Migration und Bucket-Replikation +:::warning[Schließen Sie keine Replikationsschleife] -| Ziel | Verwenden | -| --- | --- | -| Objekte aus einem Provider der Liste oben nach RustFS ziehen, bei einem Lese-Miss oder per Backfill | On-demand Migration | -| Objektversionen aus einem RustFS-Bucket in einen anderen Bucket schieben | [Bucket-Replikation](./replication.md) | -| Standortkonfiguration und Identitätsdaten zwischen Bereitstellungen synchronisieren | [Site-Replikation](/operations/high-availability/site-replication) | +Wählen Sie keinen Bucket als Quelle der On-demand Migration, der bereits Replikationsziel dieses lokalen Buckets ist. -Die On-demand Migration ist ein eingehender Abruf. Die [Bucket-Replikation](./replication.md) ist eine ausgehende Kopie von Objektversionen und setzt Versionierung auf beiden Buckets voraus. Nachdem ein Schlüssel lokal gespeichert ist, folgt die On-demand Migration der Quelle nicht weiter. +::: + +:::note[Das Aktivieren der Quelle kopiert keine Daten] + +**Migration active** bedeutet, dass der Bucket an die Quelle gehängt ist. Die Laufzeitzähler bleiben bei null, bis ein Client einen fehlenden Schlüssel liest oder Sie einen Backfill starten. -:::warning[Schließen Sie keine Replikationsschleife] -Wählen Sie keinen Bucket als Quelle der On-demand Migration, der bereits Replikationsziel dieses lokalen Buckets ist. ::: -## Bevor Sie beginnen +## 2. Voraussetzung + +- Eine installierte RustFS-Instanz. Installieren Sie RustFS mit dem [Linux-Schnellstart](/de/installation/linux/quick-start), melden Sie sich an der Console an und erstellen Sie einen Bucket. Diese Durchführung nutzte Console v1.0.3 auf Port `9001`. +- Die RustFS-CLI [`rc`](/de/operations/rc) auf dem Host, der den lokalen Bucket liest. +- Ein [Cloudflare-R2](https://developers.cloudflare.com/r2/)-Bucket für dieses Beispiel. + +## 3. Migration + +Dieser Abschnitt verwendet **Cloudflare R2 als Beispiel**. Eine Migration von einem anderen Provider in der Liste im Überblick folgt demselben Ablauf: einen leeren lokalen Bucket erstellen, die On-demand Migration aktivieren, **Provider** wählen, **Test connection** auswählen, **Enable migration** auswählen und danach bei einem GET-Miss oder per Backfill ziehen. Nur Endpunkt, Zugangsdaten und Bucket-Felder unterscheiden sich je nach Provider. + +Die Screenshots dieser Durchführung verwenden Platzhalter für die R2-Konto-ID und den Zugriffsschlüssel. Der Host in der Terminal-Eingabeaufforderung ist `localhost`. Zugangsdaten und Endpunkt in diesem Abschnitt gelten für das Cloudflare-R2-Beispiel. Für einen anderen Provider tragen Sie Endpunkt, lesende Zugangsdaten und Bucket-Namen dieses Systems in dieselben Console-Felder ein. - Eine RustFS-Console mit **On-demand migration**. Diese Durchführung nutzte Console v1.0.3 auf Port `9001`. - Ein Console-Konto, das die **Settings** des lokalen Buckets öffnen kann. -- Die RustFS-CLI [`rc`](/operations/rc) auf dem Host, der den lokalen Bucket liest. +- Die RustFS-CLI [`rc`](/de/operations/rc) auf dem Host, der den lokalen Bucket liest. - Ein Cloudflare-R2-API-Token, das Objekte im Quell-Bucket lesen kann. Begrenzen Sie das Token nach Möglichkeit auf diesen Bucket. Öffentlicher Zugriff auf den R2-Bucket gehört nicht zu diesem Ablauf. - Der R2-S3-Endpunkt des Quell-Buckets, `https://.r2.cloudflarestorage.com`. Wenn der Bucket eine Jurisdiction nutzt, kopieren Sie den Endpunkt aus dem R2-Dashboard. @@ -59,20 +73,18 @@ rc alias set rustfs http://localhost:9000 -- Der lokale Bucket in dieser Durchführung heißt `migration`. Der R2-Bucket heißt `dl-rustfs`. Für `migration` war die Versionierung aktiviert und Object Lock deaktiviert. Object Lock war zum Aktivieren der On-demand Migration nicht nötig, und die Versionierung war keine Voraussetzung für das Aktivieren. Mit aktivierter Versionierung kann ein lokaler Löschmarker den Quellschlüssel verdecken. :::warning[Verwenden Sie ein lesendes Quell-Token] + Erstellen Sie ein R2-Token, das den Quell-Bucket lesen, dort aber nicht schreiben oder löschen kann. Das Formular sagt, dass RustFS das Geheimnis speichert und es nicht an die Console zurückgibt. -::: -:::note[Das Aktivieren der Quelle kopiert keine Daten] -**Migration active** bedeutet, dass der Bucket an die Quelle gehängt ist. Die Laufzeitzähler bleiben bei null, bis ein Client einen fehlenden Schlüssel liest oder Sie einen Backfill starten. ::: -## 1. Einen leeren lokalen Bucket erstellen +### 1. Einen leeren lokalen Bucket erstellen Öffnen Sie in der Console **Browser** → **Buckets**, erstellen Sie einen Bucket namens `migration` und prüfen Sie, dass er keine Objekte enthält. Öffnen Sie **Settings** dieses Buckets, wenn Sie die Quelle anhängen. ![RustFS-Console-Browser mit dem leeren Bucket migration vor der On-demand Migration](./images/rustfs-console-empty-bucket-before-on-demand-migration.png) -## 2. On-demand Migration öffnen +### 2. On-demand Migration öffnen 1. Öffnen Sie den Bucket `migration` und wählen Sie **Settings**. 2. Wählen Sie **Automation**. @@ -87,7 +99,7 @@ Nachdem die Quelle aktiviert ist, zeigt **Automation** den Status **Migration ac ![Automation-Einstellungen des Buckets migration in der RustFS-Console mit aktiver On-demand Migration](./images/rustfs-console-bucket-automation-on-demand-migration.png) -## 3. Den Bucket auf Cloudflare R2 richten +### 3. Den Bucket auf Cloudflare R2 richten Setzen Sie die Quelle in **Enable on-demand migration** wie folgt. Ersetzen Sie Konto-ID und Schlüssel durch Ihr eigenes R2-Token. Lassen Sie das Sitzungstoken leer, sofern das Token keines verlangt. Lassen Sie **Local prefix** leer, damit der gesamte Quell-Namespace sichtbar ist. Diese Durchführung speicherte kein zusätzliches Präfix (**All keys**, **No added prefix**). @@ -105,7 +117,7 @@ Setzen Sie die Quelle in **Enable on-demand migration** wie folgt. Ersetzen Sie ![Formular Enable on-demand migration für eine Cloudflare-R2-Quelle, Endpunkt und Zugriffsschlüssel durch Platzhalter ersetzt](./images/rustfs-console-on-demand-migration-r2-source-form.png) -## 4. Die Verbindung testen und die Migration aktivieren +### 4. Die Verbindung testen und die Migration aktivieren Wählen Sie **Test connection**. Eine erfolgreiche Prüfung meldet **Connection test passed** und zeigt einen Beispiel-Objektschlüssel aus dem Quell-Bucket. Wählen Sie danach **Enable migration**. @@ -119,7 +131,7 @@ Der Konfigurationsstatus wird **Migration active**. Bis etwas gelesen oder per B ![On-demand Migration für den Bucket migration aktiv, Laufzeitzähler noch bei null](./images/rustfs-console-on-demand-migration-active-zero-runtime.png) -## 5. Ein Objekt mit rc cp abrufen +### 5. Ein Objekt mit rc cp abrufen Lesen Sie den lokalen Bucket mit `rc`. Senden Sie diese Anfrage nicht an den R2-Endpunkt. In dieser Durchführung war der lokale Bucket noch leer, und ein fehlendes Objekt wurde gezogen. Der erste Miss liefert das Objekt an den Client und speichert es lokal. Ein späteres Lesen desselben Schlüssels bedient RustFS. @@ -145,7 +157,7 @@ Nach dem Abruf des einzelnen Objekts zeigt der Console-**Browser** dieses Objekt ![RustFS-Console-Browser mit rustfs-nightly-2026-11-02.deb nach einem Lesevorgang der On-demand Migration](./images/rustfs-console-browser-single-object-on-demand-migration.png) -## 6. Ein Präfix per Backfill übernehmen +### 6. Ein Präfix per Backfill übernehmen **Start backfill** durchsucht die Quelle und zieht Schlüssel, die lokal noch nicht vorhanden sind. Der Dialog in dieser Durchführung verwendete diese Einstellungen: @@ -174,7 +186,7 @@ Während ein Backfill Objekte schreibt, zeigt die Console aufgelistete und gezog ![Dialog Backfill in progress mit aufgelisteten Objekten, gezogenen Objekten und migrierten Daten](./images/rustfs-console-on-demand-migration-backfill-in-progress.png) -## 7. Einen Testlauf ausführen und dann den Quell-Namespace übernehmen +### 7. Einen Testlauf ausführen und dann den Quell-Namespace übernehmen Lassen Sie **Source listing prefix** leer, um den konfigurierten Quell-Namespace zu durchsuchen. Führen Sie zuerst **Dry run** aus und prüfen Sie die aufgelistete Menge. Schalten Sie **Dry run** danach aus und starten Sie den Backfill. @@ -194,7 +206,7 @@ Der anschließende vollständige Backfill mit leerem Präfix endete so: ![Background backfill für den Quell-Namespace abgeschlossen, 127 Objekte gezogen und keine fehlgeschlagenen Objekte](./images/rustfs-console-on-demand-migration-backfill-completed.png) -## 8. Den Bucket prüfen +### 8. Den Bucket prüfen Prüfen Sie auf der Seite der On-demand Migration: @@ -211,11 +223,13 @@ Die Bucket-Liste nach der Durchführung zeigt `migration` mit 128 Objekten und 8 ![RustFS-Console-Bucket-Liste mit dem Bucket migration nach der On-demand Migration](./images/rustfs-console-bucket-list-after-on-demand-migration.png) :::warning[Die lokale Kopie folgt der Quelle nicht] + Eine spätere Änderung desselben Schlüssels in R2 wird nicht über das lokale Objekt gezogen. Ein lokales `PUT` dieses Schlüssels wird nicht zur Quelle zurückgeschrieben und bleibt vor dem Quellschlüssel. Die On-demand Migration ist keine fortlaufende Replikation von der Quelle. + ::: -## Nächste Schritte +### Nächste Schritte - [Bucket-Replikation konfigurieren](./replication.md), wenn Sie eine ausgehende Kopie brauchen -- [rc installieren und verwenden](/operations/rc) -- [Site-Replikation konfigurieren](/operations/high-availability/site-replication) für Standortkonfiguration und Identitätsdaten +- [rc installieren und verwenden](/de/operations/rc) +- [Site-Replikation konfigurieren](/de/operations/high-availability/site-replication) für Standortkonfiguration und Identitätsdaten diff --git a/content/en/administration/data/bucket/on-demand-migration.md b/content/en/administration/data/bucket/on-demand-migration.md index f75d2bd8..5cc0cc2a 100644 --- a/content/en/administration/data/bucket/on-demand-migration.md +++ b/content/en/administration/data/bucket/on-demand-migration.md @@ -1,15 +1,21 @@ --- -title: "On-demand Migration from Cloudflare R2" -description: "Attach a Cloudflare R2 bucket as a read-only source and pull objects into RustFS on a read miss or with a backfill." +title: "On-demand migration" +description: "Pull missing objects into a RustFS bucket from an external source on a read or a backfill, with Cloudflare R2 as the worked example." --- -On-demand migration pulls objects from an external bucket into a RustFS bucket when a client reads a missing key, or when you start a backfill. **This document uses Cloudflare R2 as the example** end to end. The steps below follow a Console v1.0.3 walkthrough that attached an R2 bucket to an empty local bucket, tested the connection, and then ran three pulls: one object with `rc cp`, a prefix backfill, and a full-namespace backfill with a dry run. +This page explains on-demand migration, what you need before you start, and a migration walkthrough. The walkthrough uses Cloudflare R2 as the worked example. -RustFS reads the source. The enable form states that RustFS never writes or deletes objects there. The migration page states that RustFS pulls objects only when they are read or backfilled, that new `PUT` and `DELETE` operations in RustFS are not synchronized to the source, and that later source changes do not update local copies. +## 1. Overview -Screenshots in this walkthrough use placeholders for the R2 account id and access key. The terminal prompt host is `localhost`. +On-demand migration is an inbound pull. When a client reads a key that is not in the local bucket, RustFS reads that object from the configured source, returns it, and stores it locally. You can also start a backfill to pull keys that no client has requested yet. The enable form states that RustFS never writes or deletes objects on the source. The migration page states that new `PUT` and `DELETE` operations in RustFS are not synchronized to the source, and that later source changes do not update local copies. On-demand migration is not continuous replication from the source. -## Source providers +| Goal | Use | +| --- | --- | +| Pull objects into RustFS from a provider in the list below, on a read miss or by backfill | On-demand migration | +| Push object versions from a RustFS bucket to another bucket | [Bucket replication](./replication.md) | +| Synchronize site configuration and identity data across deployments | [Site replication](/en/operations/high-availability/site-replication) | + +[Bucket replication](./replication.md) is an outbound copy of object versions and requires versioning on both buckets. After a key is stored locally, on-demand migration does not keep following the source. **Source connection** → **Provider** lists these sources. The names below are the Console labels. Google Cloud Storage is two entries, HMAC and Native. @@ -24,29 +30,37 @@ Screenshots in this walkthrough use placeholders for the R2 account id and acces ![RustFS Console Provider menu for on-demand migration, listing Amazon S3, S3-compatible storage, MinIO, RustFS, Cloudflare R2, Google Cloud Storage (HMAC), Azure Blob Storage (Native), and Google Cloud Storage (Native)](./images/rustfs-console-on-demand-migration-source-providers.png) -A migration from any other provider in that list uses the same flow: create an empty local bucket, enable on-demand migration, choose **Provider**, select **Test connection**, select **Enable migration**, then pull on a GET miss or with a backfill. Only the endpoint, credential, and bucket fields differ by provider. The R2 walkthrough below fills those fields for Cloudflare R2. +If you need a provider that is not in this list, open a pull request in the [RustFS repository](https://github.com/rustfs/rustfs) for official review. -## On-demand migration and bucket replication +:::warning[Do not close a replication loop] -| Goal | Use | -| --- | --- | -| Pull objects into RustFS from a provider in the list above, on a read miss or by backfill | On-demand migration | -| Push object versions from a RustFS bucket to another bucket | [Bucket replication](./replication.md) | -| Synchronize site configuration and identity data across deployments | [Site replication](/operations/high-availability/site-replication) | +Do not select a bucket that is already a replication target of this local bucket as the on-demand migration source. -On-demand migration is an inbound pull. [Bucket replication](./replication.md) is an outbound copy of object versions and requires versioning on both buckets. After a key is stored locally, on-demand migration does not keep following the source. +::: + +:::note[Enabling the source does not copy data] + +**Migration active** means the bucket is attached to the source. Runtime counters stay at zero until a client reads a missing key or you start a backfill. -:::warning[Do not close a replication loop] -Do not select a bucket that is already a replication target of this local bucket as the on-demand migration source. ::: -## Before you begin +## 2. Requirement + +- An installed RustFS instance. Use the [Linux quick start](/en/installation/linux/quick-start) to install RustFS, sign in to the Console, and create a bucket. This walkthrough used Console v1.0.3 on port `9001`. +- The RustFS CLI, [`rc`](/en/operations/rc), on the host that will read the local bucket. +- A [Cloudflare R2](https://developers.cloudflare.com/r2/) bucket for this example. + +## 3. Migration + +This section uses **Cloudflare R2 as the example**. A migration from any other provider in the Overview list follows the same flow: create an empty local bucket, enable on-demand migration, choose **Provider**, select **Test connection**, select **Enable migration**, then pull on a GET miss or with a backfill. Only the endpoint, credential, and bucket fields differ by provider. + +Screenshots in this walkthrough use placeholders for the R2 account id and access key. The terminal prompt host is `localhost`. The credential and endpoint here are for the Cloudflare R2 example. For another provider, enter that system's endpoint, read credential, and bucket name in the same Console fields. - A RustFS Console that includes **On-demand migration**. This walkthrough used Console v1.0.3, on port `9001`. - A Console account that can open the local bucket's **Settings**. -- The RustFS CLI, [`rc`](/operations/rc), on the host that will read the local bucket. +- The RustFS CLI, [`rc`](/en/operations/rc), on the host that will read the local bucket. - A Cloudflare R2 API token that can read objects in the source bucket. Prefer a token scoped to that bucket. Public access on the R2 bucket is not part of this flow. - The R2 S3 endpoint for the source bucket, `https://.r2.cloudflarestorage.com`. If the bucket uses a jurisdiction, copy the endpoint from the R2 dashboard. @@ -59,20 +73,18 @@ rc alias set rustfs http://localhost:9000 -- The local bucket in this walkthrough is `migration`. The R2 bucket is `dl-rustfs`. Versioning was enabled on `migration`, and Object Lock was disabled. The walkthrough did not need Object Lock to enable on-demand migration, and it did not treat versioning as a requirement for enabling it. With versioning enabled, a local delete marker can hide the source key. :::warning[Use a read-only source token] + Create an R2 token that can read the source bucket and cannot write or delete there. The form states that RustFS stores the secret and does not return it to the Console. -::: -:::note[Enabling the source does not copy data] -**Migration active** means the bucket is attached to the source. Runtime counters stay at zero until a client reads a missing key or you start a backfill. ::: -## 1. Create an empty local bucket +### 1. Create an empty local bucket In the Console, open **Browser** → **Buckets**, create a bucket named `migration`, and confirm that it has no objects. Open **Settings** from that bucket when you are ready to attach the source. ![RustFS Console Browser showing the empty migration bucket before on-demand migration](./images/rustfs-console-empty-bucket-before-on-demand-migration.png) -## 2. Open on-demand migration +### 2. Open on-demand migration 1. Open bucket `migration` and select **Settings**. 2. Select **Automation**. @@ -87,7 +99,7 @@ After the source is enabled, **Automation** shows **Migration active** and **Man ![RustFS Console bucket Automation settings with on-demand migration active for the migration bucket](./images/rustfs-console-bucket-automation-on-demand-migration.png) -## 3. Point the bucket at Cloudflare R2 +### 3. Point the bucket at Cloudflare R2 In **Enable on-demand migration**, set the source as follows. Replace the account id and keys with your own R2 token. Leave the session token empty unless the token requires one. Leave **Local prefix** empty to expose the whole source namespace. This walkthrough saved no extra prefix (**All keys**, **No added prefix**). @@ -105,7 +117,7 @@ In **Enable on-demand migration**, set the source as follows. Replace the accoun ![Enable on-demand migration form for a Cloudflare R2 source, with the endpoint and access key replaced by placeholders](./images/rustfs-console-on-demand-migration-r2-source-form.png) -## 4. Test the connection and enable migration +### 4. Test the connection and enable migration Select **Test connection**. A successful check reports **Connection test passed** and shows a sample object key from the source bucket. Then select **Enable migration**. @@ -119,7 +131,7 @@ The configuration status becomes **Migration active**. Until something is read o ![On-demand migration active for bucket migration, with runtime counters still at zero](./images/rustfs-console-on-demand-migration-active-zero-runtime.png) -## 5. Pull one object with rc cp +### 5. Pull one object with rc cp Read the local bucket with `rc`. Do not send this request to the R2 endpoint. In this walkthrough the local bucket was still empty, and one missing object was pulled. The first miss returns the object to the client and stores it locally. A later read of the same key is served from RustFS. @@ -145,7 +157,7 @@ After the single-object pull, the Console **Browser** shows that object in the l ![RustFS Console Browser showing rustfs-nightly-2026-11-02.deb after an on-demand migration read](./images/rustfs-console-browser-single-object-on-demand-migration.png) -## 6. Backfill a prefix +### 6. Backfill a prefix **Start backfill** scans the source and pulls keys that are not already local. The dialog in this walkthrough used these settings: @@ -174,7 +186,7 @@ While a backfill is writing objects, the Console shows listed and pulled counts. ![Backfill in progress dialog with objects listed, objects pulled, and migrated data](./images/rustfs-console-on-demand-migration-backfill-in-progress.png) -## 7. Run a dry run, then backfill the source namespace +### 7. Run a dry run, then backfill the source namespace Leave **Source listing prefix** empty to scan the configured source namespace. Run **Dry run** first and confirm the listed set. Then turn **Dry run** off and start the backfill. @@ -194,7 +206,7 @@ The full backfill that followed, with an empty prefix, finished as follows: ![Background backfill completed for the source namespace, with 127 objects pulled and no failed objects](./images/rustfs-console-on-demand-migration-backfill-completed.png) -## 8. Verify the bucket +### 8. Verify the bucket On the on-demand migration page, check: @@ -211,11 +223,13 @@ The bucket list after the walkthrough shows `migration` with 128 objects and 8.1 ![RustFS Console bucket list with the migration bucket after on-demand migration](./images/rustfs-console-bucket-list-after-on-demand-migration.png) :::warning[The local copy does not track the source] + A later change to the same key on R2 is not pulled over the local object. A local `PUT` of that key is not written back to the source, and it stays in front of the source key. On-demand migration is not continuous replication from the source. + ::: -## Next steps +### Next steps - [Configure bucket replication](./replication.md) when you need an outbound copy -- [Install and use rc](/operations/rc) -- [Configure site replication](/operations/high-availability/site-replication) for site configuration and identity data +- [Install and use rc](/en/operations/rc) +- [Configure site replication](/en/operations/high-availability/site-replication) for site configuration and identity data diff --git a/content/fr/administration/data/bucket/on-demand-migration.md b/content/fr/administration/data/bucket/on-demand-migration.md index 215bae61..26c777f5 100644 --- a/content/fr/administration/data/bucket/on-demand-migration.md +++ b/content/fr/administration/data/bucket/on-demand-migration.md @@ -1,17 +1,23 @@ --- -title: "Migration à la demande depuis Cloudflare R2" -description: "Attachez un compartiment Cloudflare R2 en lecture seule et importez les objets dans RustFS lors d’une lecture manquante ou par un backfill." +title: "Migration à la demande" +description: "Importez les objets manquants dans un compartiment RustFS depuis une source externe lors d’une lecture ou d’un backfill, avec Cloudflare R2 comme exemple." --- -La migration à la demande importe des objets d’un compartiment externe vers un compartiment RustFS lorsqu’un client lit une clé absente, ou lorsque vous lancez un backfill. **Ce document utilise Cloudflare R2 comme exemple** de bout en bout. Les étapes suivent un parcours sur la Console v1.0.3 : un compartiment R2 a été attaché à un compartiment local vide, la connexion a été testée, puis trois imports ont été exécutés — un objet avec `rc cp`, un backfill de préfixe, et un backfill de tout le namespace source avec un dry run. +Cette page explique la migration à la demande, les prérequis et un parcours de migration. Le parcours utilise Cloudflare R2 comme exemple. -RustFS lit la source. Le formulaire d’activation indique que RustFS n’y écrit ni n’y supprime jamais d’objets. La page de migration indique que RustFS n’importe des objets que lorsqu’ils sont lus ou remplis par un backfill, que les nouvelles opérations `PUT` et `DELETE` dans RustFS ne sont pas synchronisées vers la source, et que les modifications ultérieures de la source ne mettent pas à jour les copies locales. +## 1. Vue d’ensemble -Les captures de ce parcours utilisent des marqueurs pour l’identifiant de compte R2 et la clé d’accès. L’hôte de l’invite du terminal est `localhost`. +La migration à la demande est un import entrant. Lorsqu’un client lit une clé absente du compartiment local, RustFS lit cet objet depuis la source configurée, le renvoie et le stocke localement. Vous pouvez aussi lancer un backfill pour importer des clés qu’aucun client n’a encore demandées. Le formulaire d’activation indique que RustFS n’écrit ni ne supprime jamais d’objets sur la source. La page de migration indique que les nouvelles opérations `PUT` et `DELETE` dans RustFS ne sont pas synchronisées vers la source, et que les modifications ultérieures de la source ne mettent pas à jour les copies locales. La migration à la demande n’est pas une réplication continue depuis la source. -## Fournisseurs source +| Objectif | Utiliser | +| --- | --- | +| Importer des objets dans RustFS depuis un fournisseur de la liste ci-dessous, lors d’une lecture manquante ou par backfill | Migration à la demande | +| Pousser des versions d’objets d’un compartiment RustFS vers un autre compartiment | [Réplication de compartiment](./replication.md) | +| Synchroniser la configuration de site et les données d’identité entre des déploiements | [Réplication de site](/fr/operations/high-availability/site-replication) | -**Source connection** → **Provider** liste ces sources. Les noms sont les libellés exacts de la Console. Google Cloud Storage apparaît deux fois : HMAC et Native. +La [réplication de compartiment](./replication.md) est une copie sortante des versions d’objets et exige la gestion des versions sur les deux compartiments. Une fois une clé stockée localement, la migration à la demande ne suit plus la source. + +**Source connection** → **Provider** liste ces sources. Les noms sont les libellés exacts de la Console. Google Cloud Storage apparaît deux fois : HMAC et Native. 1. Amazon S3 2. S3-compatible storage @@ -24,29 +30,37 @@ Les captures de ce parcours utilisent des marqueurs pour l’identifiant de comp ![Menu Provider de la Console RustFS pour la migration à la demande, avec Amazon S3, S3-compatible storage, MinIO, RustFS, Cloudflare R2, Google Cloud Storage (HMAC), Azure Blob Storage (Native) et Google Cloud Storage (Native)](./images/rustfs-console-on-demand-migration-source-providers.png) -Une migration depuis un autre fournisseur de cette liste suit le même flux : créer un compartiment local vide, activer la migration à la demande, choisir **Provider**, sélectionner **Test connection**, sélectionner **Enable migration**, puis importer lors d’un GET manquant ou par un backfill. Seuls les champs de point de terminaison, d’identifiants et de compartiment changent selon le fournisseur. Le parcours R2 ci-dessous remplit ces champs pour Cloudflare R2. +Si vous avez besoin d’un fournisseur qui n’est pas dans cette liste, ouvrez une pull request dans le [dépôt RustFS](https://github.com/rustfs/rustfs) pour un examen officiel. -## Migration à la demande et réplication de compartiment +:::warning[Ne fermez pas une boucle de réplication] -| Objectif | Utiliser | -| --- | --- | -| Importer des objets dans RustFS depuis un fournisseur de la liste ci-dessus, lors d’une lecture manquante ou par backfill | Migration à la demande | -| Pousser des versions d’objets d’un compartiment RustFS vers un autre compartiment | [Réplication de compartiment](./replication.md) | -| Synchroniser la configuration de site et les données d’identité entre des déploiements | [Réplication de site](/operations/high-availability/site-replication) | +Ne choisissez pas comme source de la migration à la demande un compartiment qui est déjà la cible de réplication de ce compartiment local. -La migration à la demande est un import entrant. La [réplication de compartiment](./replication.md) est une copie sortante des versions d’objets et exige la gestion des versions sur les deux compartiments. Une fois une clé stockée localement, la migration à la demande ne suit plus la source. +::: + +:::note[Activer la source ne copie pas les données] + +**Migration active** signifie que le compartiment est attaché à la source. Les compteurs d’exécution restent à zéro tant qu’un client ne lit pas une clé absente ou que vous ne lancez pas un backfill. -:::warning[Ne fermez pas une boucle de réplication] -Ne choisissez pas comme source de la migration à la demande un compartiment qui est déjà la cible de réplication de ce compartiment local. ::: -## Avant de commencer +## 2. Prérequis + +- Une instance RustFS installée. Suivez le [démarrage rapide Linux](/fr/installation/linux/quick-start) pour installer RustFS, vous connecter à la Console et créer un compartiment. Ce parcours utilisait la Console v1.0.3, sur le port `9001`. +- La CLI RustFS [`rc`](/fr/operations/rc) sur l’hôte qui lit le compartiment local. +- Un compartiment [Cloudflare R2](https://developers.cloudflare.com/r2/) pour cet exemple. + +## 3. Migration + +Cette section utilise **Cloudflare R2 comme exemple**. Une migration depuis un autre fournisseur de la liste de la vue d’ensemble suit le même flux : créer un compartiment local vide, activer la migration à la demande, choisir **Provider**, sélectionner **Test connection**, sélectionner **Enable migration**, puis importer lors d’un GET manquant ou par un backfill. Seuls les champs de point de terminaison, d’identifiants et de compartiment changent selon le fournisseur. + +Les captures de ce parcours utilisent des marqueurs pour l’identifiant de compte R2 et la clé d’accès. L’hôte de l’invite du terminal est `localhost`. Les identifiants et le point de terminaison de cette section concernent l’exemple Cloudflare R2. Pour un autre fournisseur, saisissez le point de terminaison, l’identifiant de lecture et le nom de compartiment de ce système dans les mêmes champs de la Console. - Une Console RustFS qui contient **On-demand migration**. Ce parcours utilisait la Console v1.0.3, sur le port `9001`. - Un compte de Console autorisé à ouvrir **Settings** du compartiment local. -- La CLI RustFS [`rc`](/operations/rc) sur l’hôte qui lit le compartiment local. +- La CLI RustFS [`rc`](/fr/operations/rc) sur l’hôte qui lit le compartiment local. - Un jeton d’API Cloudflare R2 capable de lire les objets du compartiment source. Limitez de préférence le jeton à ce compartiment. L’accès public du compartiment R2 ne fait pas partie de ce parcours. - Le point de terminaison S3 R2 du compartiment source, `https://.r2.cloudflarestorage.com`. Si le compartiment utilise une juridiction, copiez le point de terminaison depuis le tableau de bord R2. @@ -59,20 +73,18 @@ rc alias set rustfs http://localhost:9000 -- Le compartiment local de ce parcours est `migration`. Le compartiment R2 est `dl-rustfs`. La gestion des versions était activée sur `migration`, et le verrouillage d’objet était désactivé. Le verrouillage d’objet n’était pas nécessaire pour activer la migration à la demande, et la gestion des versions n’en était pas un prérequis. Lorsque la gestion des versions est activée, un marqueur de suppression local peut masquer la clé source. :::warning[Utilisez un jeton source en lecture seule] + Créez un jeton R2 qui peut lire le compartiment source et ne peut ni y écrire ni y supprimer. Le formulaire indique que RustFS conserve le secret et ne le renvoie pas à la Console. -::: -:::note[Activer la source ne copie pas les données] -**Migration active** signifie que le compartiment est attaché à la source. Les compteurs d’exécution restent à zéro tant qu’un client ne lit pas une clé absente ou que vous ne lancez pas un backfill. ::: -## 1. Créer un compartiment local vide +### 1. Créer un compartiment local vide Dans la Console, ouvrez **Browser** → **Buckets**, créez un compartiment nommé `migration` et vérifiez qu’il ne contient aucun objet. Ouvrez **Settings** de ce compartiment lorsque vous êtes prêt à attacher la source. ![Navigateur de la Console RustFS affichant le compartiment migration vide avant la migration à la demande](./images/rustfs-console-empty-bucket-before-on-demand-migration.png) -## 2. Ouvrir la migration à la demande +### 2. Ouvrir la migration à la demande 1. Ouvrez le compartiment `migration` et sélectionnez **Settings**. 2. Sélectionnez **Automation**. @@ -87,7 +99,7 @@ Une fois la source activée, **Automation** affiche **Migration active** et **Ma ![Paramètres Automation du compartiment migration dans la Console RustFS, avec la migration à la demande active](./images/rustfs-console-bucket-automation-on-demand-migration.png) -## 3. Pointer le compartiment vers Cloudflare R2 +### 3. Pointer le compartiment vers Cloudflare R2 Dans **Enable on-demand migration**, renseignez la source comme suit. Remplacez l’identifiant de compte et les clés par votre propre jeton R2. Laissez le jeton de session vide, sauf si le jeton l’exige. Laissez **Local prefix** vide pour exposer tout le namespace source. Ce parcours n’a enregistré aucun préfixe supplémentaire (**All keys**, **No added prefix**). @@ -105,7 +117,7 @@ Dans **Enable on-demand migration**, renseignez la source comme suit. Remplacez ![Formulaire Enable on-demand migration pour une source Cloudflare R2, le point de terminaison et la clé d’accès étant remplacés par des marqueurs](./images/rustfs-console-on-demand-migration-r2-source-form.png) -## 4. Tester la connexion et activer la migration +### 4. Tester la connexion et activer la migration Sélectionnez **Test connection**. Un contrôle réussi affiche **Connection test passed** et une clé d’objet d’exemple issue du compartiment source. Sélectionnez ensuite **Enable migration**. @@ -119,7 +131,7 @@ L’état de configuration devient **Migration active**. Tant qu’aucune lectur ![Migration à la demande active pour le compartiment migration, les compteurs d’exécution étant encore à zéro](./images/rustfs-console-on-demand-migration-active-zero-runtime.png) -## 5. Récupérer un objet avec rc cp +### 5. Récupérer un objet avec rc cp Lisez le compartiment local avec `rc`. N’envoyez pas cette requête au point de terminaison R2. Dans ce parcours, le compartiment local était encore vide et un objet absent a été importé. Le premier échec de lecture renvoie l’objet au client et le stocke localement. Une lecture ultérieure de la même clé est servie par RustFS. @@ -145,7 +157,7 @@ Après l’import de l’objet unique, le **Browser** de la Console affiche cet ![Browser de la Console RustFS affichant rustfs-nightly-2026-11-02.deb après une lecture de migration à la demande](./images/rustfs-console-browser-single-object-on-demand-migration.png) -## 6. Lancer un backfill sur un préfixe +### 6. Lancer un backfill sur un préfixe **Start backfill** parcourt la source et importe les clés qui ne sont pas déjà locales. La boîte de dialogue de ce parcours utilisait ces réglages : @@ -174,7 +186,7 @@ Pendant qu’un backfill écrit des objets, la Console affiche les nombres list ![Boîte de dialogue Backfill in progress avec les objets listés, les objets importés et les données migrées](./images/rustfs-console-on-demand-migration-backfill-in-progress.png) -## 7. Lancer un dry run, puis le backfill du namespace source +### 7. Lancer un dry run, puis le backfill du namespace source Laissez **Source listing prefix** vide pour parcourir le namespace source configuré. Lancez d’abord **Dry run** et vérifiez l’ensemble listé. Désactivez ensuite **Dry run** et démarrez le backfill. @@ -194,7 +206,7 @@ Le backfill complet qui a suivi, avec un préfixe vide, s’est terminé ainsi ![Background backfill terminé pour le namespace source, avec 127 objets importés et aucun objet en échec](./images/rustfs-console-on-demand-migration-backfill-completed.png) -## 8. Vérifier le compartiment +### 8. Vérifier le compartiment Sur la page de migration à la demande, vérifiez : @@ -211,11 +223,13 @@ La liste des compartiments après le parcours montre `migration` avec 128 objets ![Liste des compartiments de la Console RustFS avec le compartiment migration après la migration à la demande](./images/rustfs-console-bucket-list-after-on-demand-migration.png) :::warning[La copie locale ne suit pas la source] + Une modification ultérieure de la même clé sur R2 n’est pas importée par-dessus l’objet local. Un `PUT` local de cette clé n’est pas réécrit vers la source et reste devant la clé source. La migration à la demande n’est pas une réplication continue depuis la source. + ::: -## Étapes suivantes +### Étapes suivantes - [Configurer la réplication de compartiment](./replication.md) lorsque vous avez besoin d’une copie sortante -- [Installer et utiliser rc](/operations/rc) -- [Configurer la réplication de site](/operations/high-availability/site-replication) pour la configuration de site et les données d’identité +- [Installer et utiliser rc](/fr/operations/rc) +- [Configurer la réplication de site](/fr/operations/high-availability/site-replication) pour la configuration de site et les données d’identité diff --git a/content/ja/administration/data/bucket/on-demand-migration.md b/content/ja/administration/data/bucket/on-demand-migration.md index 650b0fca..55a8ea9a 100644 --- a/content/ja/administration/data/bucket/on-demand-migration.md +++ b/content/ja/administration/data/bucket/on-demand-migration.md @@ -1,15 +1,21 @@ --- -title: "Cloudflare R2 からのオンデマンド移行" -description: "Cloudflare R2 バケットを読み取り専用のソースとして接続し、読み取りミスまたはバックフィルでオブジェクトを RustFS に取り込みます。" +title: "オンデマンド移行" +description: "読み取りまたはバックフィルで、外部ソースの欠落オブジェクトを RustFS バケットへ取り込みます。手順の例は Cloudflare R2 です。" --- -オンデマンド移行は、クライアントが存在しないキーを読み取るとき、またはバックフィルを開始したときに、外部バケットのオブジェクトを RustFS バケットへ取り込みます。**この文書は Cloudflare R2 を最初から最後までの例として使います。** 以降の手順は Console v1.0.3 で行った作業です。空のローカルバケットへ R2 バケットを接続し、接続を確認したあと、3 種類の取り込みを実行しました。`rc cp` による単一オブジェクト、プレフィックスのバックフィル、そしてドライランを含むソース名前空間全体のバックフィルです。 +このページでは、オンデマンド移行、開始前の要件、移行手順を説明します。手順の例は Cloudflare R2 です。 -RustFS はソースを読み取ります。有効化フォームには、RustFS がソースへ書き込まず、削除もしないと書かれています。移行ページには、読み取りまたはバックフィルのときにだけオブジェクトを取り込むこと、RustFS 上の新しい `PUT` と `DELETE` はソースへ同期されないこと、ソース側のその後の変更はローカルコピーを更新しないことが書かれています。 +## 1. 概要 -この手順のスクリーンショットでは、R2 のアカウント ID とアクセスキーをプレースホルダーに置き換えています。端末プロンプトのホストは `localhost` です。 +オンデマンド移行は受信方向の取り込みです。クライアントがローカルバケットにないキーを読むと、RustFS は設定済みソースからそのオブジェクトを読み、クライアントへ返し、ローカルへ保存します。まだクライアントが要求していないキーを取り込むバックフィルも開始できます。有効化フォームには、RustFS がソースへ書き込まず、削除もしないと書かれています。移行ページには、RustFS 上の新しい `PUT` と `DELETE` はソースへ同期されないこと、ソース側のその後の変更はローカルコピーを更新しないことが書かれています。オンデマンド移行は、ソースからの継続的なレプリケーションではありません。 -## ソースプロバイダー +| 目的 | 使う機能 | +| --- | --- | +| 下の一覧のプロバイダーから、読み取りミスまたはバックフィルでオブジェクトを RustFS へ取り込む | オンデマンド移行 | +| RustFS バケットのオブジェクトバージョンを別のバケットへ送る | [バケットレプリケーション](./replication.md) | +| デプロイ間でサイト設定と ID データを同期する | [サイトレプリケーション](/ja/operations/high-availability/site-replication) | + +[バケットレプリケーション](./replication.md)はオブジェクトバージョンの送信方向のコピーであり、両方のバケットでバージョニングが必要です。キーがローカルに保存されたあと、オンデマンド移行はソースの変更を追い続けません。 **Source connection** → **Provider** には次のソースが表示されます。名称は Console のラベルそのものです。Google Cloud Storage は HMAC と Native の 2 項目です。 @@ -24,29 +30,37 @@ RustFS はソースを読み取ります。有効化フォームには、RustFS ![オンデマンド移行の RustFS Console Provider メニュー。Amazon S3、S3-compatible storage、MinIO、RustFS、Cloudflare R2、Google Cloud Storage (HMAC)、Azure Blob Storage (Native)、Google Cloud Storage (Native) を表示](./images/rustfs-console-on-demand-migration-source-providers.png) -この一覧の他のプロバイダーからの移行も、同じ流れです。空のローカルバケットを作成し、オンデマンド移行を有効にし、**Provider** を選び、**Test connection** を選び、**Enable migration** を選び、その後 GET ミスまたはバックフィルで取り込みます。プロバイダーごとに変わるのは、エンドポイント、認証情報、バケットのフィールドだけです。以下の R2 手順では、これらのフィールドを Cloudflare R2 用に入力します。 +この一覧にないプロバイダーが必要な場合は、公式の確認のため [RustFS リポジトリ](https://github.com/rustfs/rustfs) にプルリクエストを開いてください。 -## オンデマンド移行とバケットレプリケーション +:::warning[レプリケーションの循環を作らない] -| 目的 | 使う機能 | -| --- | --- | -| 上の一覧のプロバイダーから、読み取りミスまたはバックフィルでオブジェクトを RustFS へ取り込む | オンデマンド移行 | -| RustFS バケットのオブジェクトバージョンを別のバケットへ送る | [バケットレプリケーション](./replication.md) | -| デプロイ間でサイト設定と ID データを同期する | [サイトレプリケーション](/operations/high-availability/site-replication) | +このローカルバケットのレプリケーションターゲットになっているバケットを、オンデマンド移行のソースに選ばないでください。 -オンデマンド移行は受信方向の取り込みです。[バケットレプリケーション](./replication.md)はオブジェクトバージョンの送信方向のコピーであり、両方のバケットでバージョニングが必要です。キーがローカルに保存されたあと、オンデマンド移行はソースの変更を追い続けません。 +::: + +:::note[ソースを有効にしてもデータはコピーされない] + +**Migration active** は、バケットがソースに接続された状態です。クライアントが欠落キーを読むか、バックフィルを開始するまで、ランタイムのカウンタは 0 のままです。 -:::warning[レプリケーションの循環を作らない] -このローカルバケットのレプリケーションターゲットになっているバケットを、オンデマンド移行のソースに選ばないでください。 ::: -## 開始する前に +## 2. 要件 + +- インストール済みの RustFS インスタンス。[Linux クイックスタート](/ja/installation/linux/quick-start) に従って RustFS をインストールし、Console にサインインしてバケットを作成します。この手順ではポート `9001` の Console v1.0.3 を使いました。 +- ローカルバケットを読み取るホスト上の RustFS CLI [`rc`](/ja/operations/rc)。 +- この例で使う [Cloudflare R2](https://developers.cloudflare.com/r2/) バケット。 + +## 3. 移行 + +この節は **Cloudflare R2 を例**にします。概要の一覧にある他のプロバイダーからの移行も、同じ流れです。空のローカルバケットを作成し、オンデマンド移行を有効にし、**Provider** を選び、**Test connection** を選び、**Enable migration** を選び、その後 GET ミスまたはバックフィルで取り込みます。プロバイダーごとに変わるのは、エンドポイント、認証情報、バケットのフィールドだけです。 + +この手順のスクリーンショットでは、R2 のアカウント ID とアクセスキーをプレースホルダーに置き換えています。端末プロンプトのホストは `localhost` です。 この節の認証情報とエンドポイントは、Cloudflare R2 の例です。他のプロバイダーでは、同じ Console フィールドに、そのシステムのエンドポイント、読み取り用の認証情報、バケット名を入力します。 - **On-demand migration** がある RustFS Console。この手順ではポート `9001` の Console v1.0.3 を使いました。 - ローカルバケットの **Settings** を開ける Console アカウント。 -- ローカルバケットを読み取るホスト上の RustFS CLI [`rc`](/operations/rc)。 +- ローカルバケットを読み取るホスト上の RustFS CLI [`rc`](/ja/operations/rc)。 - ソースバケットのオブジェクトを読める Cloudflare R2 API トークン。トークンは可能ならそのバケットに限定します。R2 バケットのパブリックアクセスはこの手順では使いません。 - ソースバケットの R2 S3 エンドポイント `https://.r2.cloudflarestorage.com`。バケットが管轄区域にある場合は、R2 ダッシュボードに表示されるエンドポイントをコピーします。 @@ -59,20 +73,18 @@ rc alias set rustfs http://localhost:9000 -- この手順のローカルバケットは `migration`、R2 バケットは `dl-rustfs` です。`migration` ではバージョニングが有効、オブジェクトロックは無効でした。オンデマンド移行の有効化にオブジェクトロックは不要で、バージョニングも有効化の前提ではありませんでした。バージョニングが有効なとき、ローカルの削除マーカーでソースキーを隠せます。 :::warning[読み取り専用のソーストークンを使う] + ソースバケットを読めて、そこへ書き込みや削除ができない R2 トークンを作ります。フォームには、RustFS がシークレットを保存し、Console へは返さないと書かれています。 -::: -:::note[ソースを有効にしてもデータはコピーされない] -**Migration active** は、バケットがソースに接続された状態です。クライアントが欠落キーを読むか、バックフィルを開始するまで、ランタイムのカウンタは 0 のままです。 ::: -## 1. 空のローカルバケットを作成する +### 1. 空のローカルバケットを作成する Console で **Browser** → **Buckets** を開き、`migration` というバケットを作成して、オブジェクトがないことを確認します。ソースを接続する準備ができたら、そのバケットの **Settings** を開きます。 ![オンデマンド移行の前に空になっている migration バケットを示す RustFS Console の Browser](./images/rustfs-console-empty-bucket-before-on-demand-migration.png) -## 2. オンデマンド移行を開く +### 2. オンデマンド移行を開く 1. バケット `migration` を開き、**Settings** を選びます。 2. **Automation** を選びます。 @@ -87,7 +99,7 @@ Console で **Browser** → **Buckets** を開き、`migration` というバケ ![オンデマンド移行が有効な migration バケットの RustFS Console Automation 設定](./images/rustfs-console-bucket-automation-on-demand-migration.png) -## 3. バケットを Cloudflare R2 に向ける +### 3. バケットを Cloudflare R2 に向ける **Enable on-demand migration** でソースを次のように設定します。アカウント ID とキーは自分の R2 トークンに置き換えます。トークンがセッショントークンを要求しない場合、セッショントークンは空にします。ソース名前空間全体を対象にするには **Local prefix** を空にします。この手順では追加のプレフィックスを保存していません(**All keys**、**No added prefix**)。 @@ -105,7 +117,7 @@ Console で **Browser** → **Buckets** を開き、`migration` というバケ ![Cloudflare R2 ソース向けの Enable on-demand migration フォーム。エンドポイントとアクセスキーはプレースホルダー](./images/rustfs-console-on-demand-migration-r2-source-form.png) -## 4. 接続をテストして移行を有効にする +### 4. 接続をテストして移行を有効にする **Test connection** を選びます。成功すると **Connection test passed** と、ソースバケットのサンプルオブジェクトキーが表示されます。その後 **Enable migration** を選びます。 @@ -119,7 +131,7 @@ Console で **Browser** → **Buckets** を開き、`migration` というバケ ![migration バケットでオンデマンド移行が有効、ランタイムカウンタはまだ 0](./images/rustfs-console-on-demand-migration-active-zero-runtime.png) -## 5. rc cp でオブジェクトを 1 つ取得する +### 5. rc cp でオブジェクトを 1 つ取得する `rc` でローカルバケットを読みます。このリクエストを R2 エンドポイントへ送らないでください。この手順ではローカルバケットがまだ空で、欠落していたオブジェクトを 1 つ取り込みました。最初のミスはオブジェクトをクライアントへ返し、ローカルへ保存します。同じキーの次の読み取りは RustFS が返します。 @@ -145,7 +157,7 @@ Cloudflare ダッシュボードに表示されていた、ソース側の同じ ![オンデマンド移行の読み取り後、RustFS Console の Browser に表示された rustfs-nightly-2026-11-02.deb](./images/rustfs-console-browser-single-object-on-demand-migration.png) -## 6. プレフィックスをバックフィルする +### 6. プレフィックスをバックフィルする **Start backfill** はソースを走査し、まだローカルにないキーを取り込みます。この手順のダイアログでは次の設定を使いました。 @@ -174,7 +186,7 @@ Cloudflare ダッシュボードに表示されていた、ソース側の同じ ![一覧済みオブジェクト、取り込み済みオブジェクト、移行データを示す Backfill in progress ダイアログ](./images/rustfs-console-on-demand-migration-backfill-in-progress.png) -## 7. ドライランのあと、ソース名前空間をバックフィルする +### 7. ドライランのあと、ソース名前空間をバックフィルする 設定済みのソース名前空間を走査するには、**Source listing prefix** を空にします。先に **Dry run** を実行して一覧を確認します。その後 **Dry run** をオフにしてバックフィルを開始します。 @@ -194,7 +206,7 @@ Cloudflare ダッシュボードに表示されていた、ソース側の同じ ![ソース名前空間のバックグラウンドバックフィル完了。127 件を取り込み、失敗オブジェクトは 0](./images/rustfs-console-on-demand-migration-backfill-completed.png) -## 8. バケットを確認する +### 8. バケットを確認する オンデマンド移行のページで確認します。 @@ -211,11 +223,13 @@ Cloudflare ダッシュボードに表示されていた、ソース側の同じ ![オンデマンド移行後の RustFS Console バケット一覧に表示された migration バケット](./images/rustfs-console-bucket-list-after-on-demand-migration.png) :::warning[ローカルコピーはソースを追従しない] + R2 上の同じキーを後から変更しても、ローカルオブジェクトの上には取り込まれません。そのキーへのローカル `PUT` はソースへ書き戻されず、ソースキーより前に残ります。オンデマンド移行は、ソースからの継続的なレプリケーションではありません。 + ::: -## 次のステップ +### 次のステップ - 送信方向のコピーが必要なときは、[バケットレプリケーションを設定する](./replication.md) -- [rc をインストールして使う](/operations/rc) -- サイト設定と ID データには、[サイトレプリケーションを設定する](/operations/high-availability/site-replication) +- [rc をインストールして使う](/ja/operations/rc) +- サイト設定と ID データには、[サイトレプリケーションを設定する](/ja/operations/high-availability/site-replication) diff --git a/content/zh/administration/data/bucket/on-demand-migration.md b/content/zh/administration/data/bucket/on-demand-migration.md index cd69883c..bd7d3dfe 100644 --- a/content/zh/administration/data/bucket/on-demand-migration.md +++ b/content/zh/administration/data/bucket/on-demand-migration.md @@ -1,15 +1,21 @@ --- -title: "从 Cloudflare R2 按需迁移" -description: "将 Cloudflare R2 存储桶配置为只读源,并在读取未命中或回填时把对象拉入 RustFS。" +title: "按需迁移" +description: "在读取未命中或回填时把外部源上的缺失对象拉入 RustFS 存储桶,并以 Cloudflare R2 作为实操示例。" --- -按需迁移在客户端读取本地缺失的对象键时,或在你启动回填时,把外部存储桶中的对象拉入 RustFS 存储桶。**本文以 Cloudflare R2 作为贯穿全文的示例。** 下面的步骤按 Console v1.0.3 的一次实操编写:把 R2 存储桶挂到空的本地存储桶上,测试连接并启用,然后做三次拉取——用 `rc cp` 拉单个对象、按前缀回填,以及对整个源命名空间先试运行再全量回填。 +本页介绍按需迁移、开始前需要准备的内容,以及一次迁移实操。实操以 Cloudflare R2 作为示例。 -RustFS 只读源。启用表单写明,RustFS 不会在源上写入或删除对象。迁移页写明,只有在对象被读取或被回填时才会拉取;RustFS 中新的 `PUT` 和 `DELETE` 不会同步回源,源上之后的变更也不会更新已落本地的副本。 +## 1. 概述 -本页截图中的 R2 账户 ID 和访问密钥均已换成占位符。终端提示符中的主机是 `localhost`。 +按需迁移是入站拉取。客户端读取本地存储桶中不存在的对象键时,RustFS 从已配置的源读取该对象,返回给客户端,并写入本地。你也可以启动回填,拉取还没有客户端请求过的键。启用表单写明,RustFS 不会在源上写入或删除对象。迁移页写明,RustFS 中新的 `PUT` 和 `DELETE` 不会同步回源,源上之后的变更也不会更新已落本地的副本。按需迁移不是从源持续复制。 -## 源提供方 +| 目标 | 使用 | +| --- | --- | +| 从下面列出的提供方把对象拉入 RustFS,在读取未命中时拉取,或通过回填拉取 | 按需迁移 | +| 把 RustFS 存储桶中的对象版本推到另一个存储桶 | [存储桶复制](./replication.md) | +| 在部署之间同步站点配置和身份数据 | [站点复制](/zh/operations/high-availability/site-replication) | + +[存储桶复制](./replication.md)是对象版本的出站复制,并且要求源存储桶和目标存储桶都启用版本控制。对象键写入本地之后,按需迁移不会继续跟随源。 **Source connection** → **Provider** 列出这些源。下面的名称是控制台原文。Google Cloud Storage 有两项:HMAC 和 Native。 @@ -24,29 +30,37 @@ RustFS 只读源。启用表单写明,RustFS 不会在源上写入或删除对 ![RustFS 控制台按需迁移的 Provider 菜单,列出 Amazon S3、S3-compatible storage、MinIO、RustFS、Cloudflare R2、Google Cloud Storage (HMAC)、Azure Blob Storage (Native) 和 Google Cloud Storage (Native)](./images/rustfs-console-on-demand-migration-source-providers.png) -从该列表中的其他提供方迁移时,流程相同:创建空的本地存储桶,启用按需迁移,选择 **Provider**,选择 **Test connection**,选择 **Enable migration**,然后在 GET 未命中时拉取,或通过回填拉取。随提供方变化的只有端点、凭证和存储桶字段。下面的 R2 实操为 Cloudflare R2 填写这些字段。 +如果需要列表之外的提供方,请向 [RustFS 仓库](https://github.com/rustfs/rustfs) 提交拉取请求,以便官方审核。 -## 按需迁移与存储桶复制 +:::warning[不要形成复制环路] -| 目标 | 使用 | -| --- | --- | -| 从上面列出的提供方把对象拉入 RustFS,在读取未命中时拉取,或通过回填拉取 | 按需迁移 | -| 把 RustFS 存储桶中的对象版本推到另一个存储桶 | [存储桶复制](./replication.md) | -| 在部署之间同步站点配置和身份数据 | [站点复制](/operations/high-availability/site-replication) | +不要把已经是此本地存储桶复制目标的存储桶,再选成按需迁移的源。 -按需迁移是入站拉取。[存储桶复制](./replication.md)是对象版本的出站复制,并且要求源存储桶和目标存储桶都启用版本控制。对象键写入本地之后,按需迁移不会继续跟随源。 +::: + +:::note[启用源不会开始搬数据] + +**Migration active** 只表示存储桶已经挂上源。在客户端读到缺失的键,或你启动回填之前,运行时计数保持为 0。 -:::warning[不要形成复制环路] -不要把已经是此本地存储桶复制目标的存储桶,再选成按需迁移的源。 ::: -## 开始之前 +## 2. 要求 + +- 已安装的 RustFS 实例。按 [Linux 快速开始](/zh/installation/linux/quick-start) 安装 RustFS、登录控制台并创建存储桶。本次实操使用 Console v1.0.3,端口为 `9001`。 +- 读取本地存储桶的主机上已安装 RustFS CLI [`rc`](/zh/operations/rc)。 +- 一个用于本示例的 [Cloudflare R2](https://developers.cloudflare.com/r2/) 存储桶。 + +## 3. 迁移 + +本节以 **Cloudflare R2 作为示例**。从概述列表中的其他提供方迁移时,流程相同:创建空的本地存储桶,启用按需迁移,选择 **Provider**,选择 **Test connection**,选择 **Enable migration**,然后在 GET 未命中时拉取,或通过回填拉取。随提供方变化的只有端点、凭证和存储桶字段。 + +本页截图中的 R2 账户 ID 和访问密钥均已换成占位符。终端提示符中的主机是 `localhost`。 这里的凭证和端点属于 Cloudflare R2 示例。如果使用列表中的其他提供方,在同样的控制台字段中填写该系统的端点、只读凭证和存储桶名称。 - 控制台中有 **On-demand migration(按需迁移)**。本次实操使用 Console v1.0.3,端口为 `9001`。 - 控制台账号可以打开本地存储桶的 **Settings**。 -- 读取本地存储桶的主机上已安装 RustFS CLI [`rc`](/operations/rc)。 +- 读取本地存储桶的主机上已安装 RustFS CLI [`rc`](/zh/operations/rc)。 - 一个可以读取源存储桶对象的 Cloudflare R2 API 令牌。建议把令牌限制在该存储桶。此流程不使用 R2 存储桶的公共访问。 - 源存储桶的 R2 S3 端点 `https://.r2.cloudflarestorage.com`。存储桶若使用管辖区,请从 R2 控制台复制端点。 @@ -59,20 +73,18 @@ rc alias set rustfs http://localhost:9000 -- 本次实操的本地存储桶是 `migration`,R2 存储桶是 `dl-rustfs`。`migration` 已启用版本控制,对象锁定为关闭。启用按需迁移不需要对象锁定,这次也没有把版本控制当作启用条件。启用版本控制后,本地删除标记可以挡住源上的同名键。 :::warning[使用只读的源令牌] + 创建只能读取源存储桶、不能在源上写入或删除的 R2 令牌。表单写明,RustFS 会保存秘密密钥,并且不会把它返回到控制台。 -::: -:::note[启用源不会开始搬数据] -**Migration active** 只表示存储桶已经挂上源。在客户端读到缺失的键,或你启动回填之前,运行时计数保持为 0。 ::: -## 1. 创建空的本地存储桶 +### 1. 创建空的本地存储桶 在控制台打开 **Browser** → **Buckets**,创建名为 `migration` 的存储桶,并确认其中没有对象。准备挂源时,从该存储桶进入 **Settings**。 ![RustFS 控制台 Browser 中,按需迁移前为空的 migration 存储桶](./images/rustfs-console-empty-bucket-before-on-demand-migration.png) -## 2. 打开按需迁移 +### 2. 打开按需迁移 1. 打开存储桶 `migration`,选择 **Settings**。 2. 选择 **Automation**。 @@ -87,7 +99,7 @@ rc alias set rustfs http://localhost:9000 -- ![RustFS 控制台中 migration 存储桶的 Automation 设置,按需迁移已处于活动状态](./images/rustfs-console-bucket-automation-on-demand-migration.png) -## 3. 把存储桶指向 Cloudflare R2 +### 3. 把存储桶指向 Cloudflare R2 在 **Enable on-demand migration** 中按下面填写。把账户 ID 和密钥换成你自己的 R2 令牌。令牌不需要会话令牌时,会话令牌留空。**Local prefix** 留空即可暴露整个源命名空间。本次保存的配置没有额外前缀(**All keys**,**No added prefix**)。 @@ -105,7 +117,7 @@ rc alias set rustfs http://localhost:9000 -- ![为 Cloudflare R2 源填写的启用按需迁移表单,端点和访问密钥已换成占位符](./images/rustfs-console-on-demand-migration-r2-source-form.png) -## 4. 测试连接并启用迁移 +### 4. 测试连接并启用迁移 选择 **Test connection**。检查通过时显示 **Connection test passed**,并给出源存储桶中的一个样例对象键。然后选择 **Enable migration**。 @@ -119,7 +131,7 @@ rc alias set rustfs http://localhost:9000 -- ![migration 存储桶的按需迁移已启用,运行时计数仍为 0](./images/rustfs-console-on-demand-migration-active-zero-runtime.png) -## 5. 用 rc cp 拉取单个对象 +### 5. 用 rc cp 拉取单个对象 用 `rc` 读取本地存储桶。不要把这个请求发到 R2 端点。本次实操开始时本地存储桶仍为空,并拉取了一个缺失对象。第一次未命中会把对象返回给客户端,并写入本地。之后再读同一个键,由 RustFS 本地提供。 @@ -145,7 +157,7 @@ Cloudflare 控制台中,作为源的同一个 nightly 前缀: ![按需迁移读取之后,RustFS 控制台 Browser 中的 rustfs-nightly-2026-11-02.deb](./images/rustfs-console-browser-single-object-on-demand-migration.png) -## 6. 按前缀回填 +### 6. 按前缀回填 **Start backfill** 会扫描源,并拉取本地还没有的键。本次对话框使用了这些设置: @@ -174,7 +186,7 @@ Cloudflare 控制台中,作为源的同一个 nightly 前缀: ![回填进行中对话框,显示已列出对象、已拉取对象和已迁移数据](./images/rustfs-console-on-demand-migration-backfill-in-progress.png) -## 7. 先试运行,再回填源命名空间 +### 7. 先试运行,再回填源命名空间 **Source listing prefix** 留空,即扫描已配置的源命名空间。先做 **Dry run**,确认列出的范围,再关闭 **Dry run** 并启动回填。 @@ -194,7 +206,7 @@ Cloudflare 控制台中,作为源的同一个 nightly 前缀: ![源命名空间的后台回填已完成,拉取 127 个对象,失败对象为 0](./images/rustfs-console-on-demand-migration-backfill-completed.png) -## 8. 验证存储桶 +### 8. 验证存储桶 在按需迁移页面检查: @@ -211,11 +223,13 @@ Cloudflare 控制台中,作为源的同一个 nightly 前缀: ![按需迁移之后,RustFS 控制台存储桶列表中的 migration 存储桶](./images/rustfs-console-bucket-list-after-on-demand-migration.png) :::warning[本地副本不会跟随源] + R2 上同名键之后的变更不会覆盖本地对象。对该键的本地 `PUT` 不会写回源,并且会挡在源键前面。按需迁移不是从源持续复制。 + ::: -## 后续步骤 +### 后续步骤 - 需要出站副本时,[配置存储桶复制](./replication.md) -- [安装并使用 rc](/operations/rc) -- 需要同步站点配置和身份数据时,[配置站点复制](/operations/high-availability/site-replication) +- [安装并使用 rc](/zh/operations/rc) +- 需要同步站点配置和身份数据时,[配置站点复制](/zh/operations/high-availability/site-replication)