diff --git a/content/de/developer/integration/backup/images/restic-console.png b/content/de/developer/integration/backup/images/restic-console.png new file mode 100644 index 00000000..67997cbc Binary files /dev/null and b/content/de/developer/integration/backup/images/restic-console.png differ diff --git a/content/de/developer/integration/backup/index.md b/content/de/developer/integration/backup/index.md new file mode 100644 index 00000000..eabb9aad --- /dev/null +++ b/content/de/developer/integration/backup/index.md @@ -0,0 +1,12 @@ +--- +title: "Backup" +description: "Verbinden Sie Backup-Tools über S3-kompatible Objektspeicher-Schnittstellen mit RustFS." +--- + +Verwenden Sie **RustFS** als Objektspeicher-Backend für Backup-Tools, die Repository-Daten in einem S3-kompatiblen Dienst ablegen. + +## Systeme + +- [Restic](./restic.md) + +Halten Sie Backup-Jobs in einem eigenen Bucket und Präfix und verwenden Sie Anmeldedaten, die auf die erforderlichen Bucket-Operationen beschränkt sind. \ No newline at end of file diff --git a/content/de/developer/integration/backup/meta.json b/content/de/developer/integration/backup/meta.json new file mode 100644 index 00000000..9de69ffa --- /dev/null +++ b/content/de/developer/integration/backup/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Backup", + "pages": [ + "restic" + ] +} \ No newline at end of file diff --git a/content/de/developer/integration/backup/restic.md b/content/de/developer/integration/backup/restic.md new file mode 100644 index 00000000..252f89f5 --- /dev/null +++ b/content/de/developer/integration/backup/restic.md @@ -0,0 +1,91 @@ +--- +title: "Restic" +description: "Sichern Sie lokale Daten mit Restic in RustFS und stellen Sie Snapshots aus einem S3-kompatiblen Repository wieder her." +--- + +Restic ist ein Kommandozeilen-Backup-Tool, das Snapshots in einem Repository speichert. Diese Anleitung zeigt, wie Sie Restic auf RustFS ausrichten, ein lokales Verzeichnis sichern, einen Snapshot wiederherstellen und die gespeicherten Objekte in RustFS prüfen. + +Sie benötigen eine laufende RustFS-Instanz, einen Bucket wie `my-bucket`, eine installierte Restic-Version, Zugriffsschlüssel für den Bucket und ein Passwort für das Restic-Repository. + +:::note[Pfadbasierte Adressierung] + +Die S3-Backend-Konfiguration von Restic sollte für RustFS pfadbasierte Adressierung verwenden. Diese Anleitung setzt `-o s3.bucket-lookup=path` und verwendet den Bucket-Namen in der Repository-URL. + +::: + +## Architektur + +```mermaid +flowchart LR + Files["Local files"] --> Restic["Restic"] + Restic -->|S3 API| RustFS["RustFS"] + RustFS --> Bucket["my-bucket/restic"] +``` + +Restic schreibt Repository-Metadaten und Sicherungssnapshots über die S3 API in RustFS. Das Repository-Präfix in dieser Anleitung lautet `restic`, der Bucket `my-bucket`. + +## 1. Bucket vorbereiten + +Öffnen Sie die RustFS Console unter `http://localhost:9001` und erstellen Sie `my-bucket`, oder wählen Sie einen vorhandenen Bucket, der ausschließlich für Backups verwendet wird. + +![RustFS Console mit der Bucket-Liste und dem ausgewählten Backup-Bucket `my-bucket`](./images/restic-console.png) + +Verwenden Sie für jeden Backup-Job einen eigenen Bucket. Der Screenshot zeigt die Console in englischer Sprache und im hellen Design. + +## 2. Restic-Repository initialisieren + +Setzen Sie die Anmeldedaten, die Region, das Repository-Passwort und den Repository-Pfad: + +```bash +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_DEFAULT_REGION=us-east-1 +export RESTIC_PASSWORD= +export RESTIC_REPOSITORY=s3:http://localhost:9000/my-bucket/restic +``` + +Führen Sie `restic init` mit pfadbasierter Bucket-Auswahl aus: + +```bash +restic -o s3.bucket-lookup=path init +``` + +Das Repository-Passwort schützt die Snapshot-Daten. Bewahren Sie es getrennt von den RustFS-Zugriffsschlüsseln auf. + +## 3. Daten sichern + +Erstellen Sie ein kleines Testverzeichnis und sichern Sie es: + +```bash +mkdir -p ~/Documents/restic-demo +printf 'hello from RustFS\n' > ~/Documents/restic-demo/hello.txt +restic -o s3.bucket-lookup=path backup ~/Documents/restic-demo +``` + +Restic gibt nach Abschluss des Backups eine Snapshot-ID aus. Führen Sie den Befehl nach einer Dateianpassung erneut aus, um einen zweiten Snapshot zu erzeugen. + +## 4. Snapshot wiederherstellen + +Stellen Sie den neuesten Snapshot in ein separates Verzeichnis wieder her: + +```bash +mkdir -p ~/Documents/restic-restore +restic -o s3.bucket-lookup=path restore latest --target ~/Documents/restic-restore +``` + +Sie können auch eine bestimmte Snapshot-ID wiederherstellen, wenn Sie eine ältere Version benötigen. + +## 5. Repository in RustFS prüfen + +Öffnen Sie `my-bucket` in der RustFS Console und prüfen Sie, ob Restic Repository-Objekte unter dem Präfix `restic/` erstellt hat. + +Sie können zusätzlich die Repository-Prüfung ausführen: + +```bash +restic -o s3.bucket-lookup=path check +``` + +## Nächste Schritte + +- [CLI Client (rc)](/operations/rc) zum Erstellen von Buckets und Prüfen von Objekten über die Kommandozeile. +- [TLS Configuration](/integration/tls-configured), wenn Sie RustFS außerhalb eines vertrauenswürdigen Netzwerks bereitstellen. \ No newline at end of file diff --git a/content/de/developer/integration/index.md b/content/de/developer/integration/index.md index 36086197..0c618e63 100644 --- a/content/de/developer/integration/index.md +++ b/content/de/developer/integration/index.md @@ -1,6 +1,6 @@ --- title: "Integration" -description: "Integrate RustFS with reverse proxies and big data systems." +description: "Integrate RustFS with reverse proxies, backup tools, and big data systems." --- Use this section to connect **RustFS** to infrastructure and application platforms through its S3-compatible API. @@ -8,6 +8,7 @@ Use this section to connect **RustFS** to infrastructure and application platfor ## Integration categories - [Reverse Proxy](./reverse-proxy/index.md) covers Nginx, Traefik, Caddy, and HAProxy. +- [Backup](./backup/index.md) covers Restic. - [Big Data](./big-data/index.md) covers Iceberg. Each guide identifies the RustFS endpoint and addressing requirements to use when configuring the integrating system. \ No newline at end of file diff --git a/content/de/developer/integration/meta.json b/content/de/developer/integration/meta.json index 96a0425f..45c75669 100644 --- a/content/de/developer/integration/meta.json +++ b/content/de/developer/integration/meta.json @@ -2,6 +2,7 @@ "title": "Integration", "pages": [ "reverse-proxy", + "backup", "big-data" ] } \ No newline at end of file diff --git a/content/en/developer/integration/backup/images/restic-console.png b/content/en/developer/integration/backup/images/restic-console.png new file mode 100644 index 00000000..67997cbc Binary files /dev/null and b/content/en/developer/integration/backup/images/restic-console.png differ diff --git a/content/en/developer/integration/backup/index.md b/content/en/developer/integration/backup/index.md new file mode 100644 index 00000000..b0c30303 --- /dev/null +++ b/content/en/developer/integration/backup/index.md @@ -0,0 +1,12 @@ +--- +title: "Backup" +description: "Connect backup tools to RustFS through S3-compatible object storage interfaces." +--- + +Use **RustFS** as the object storage backend for backup tools that store repository data in an S3-compatible service. + +## Systems + +- [Restic](./restic.md) + +Keep backup jobs in a dedicated bucket and prefix, and use credentials scoped to the required bucket operations. \ No newline at end of file diff --git a/content/en/developer/integration/backup/meta.json b/content/en/developer/integration/backup/meta.json new file mode 100644 index 00000000..9de69ffa --- /dev/null +++ b/content/en/developer/integration/backup/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Backup", + "pages": [ + "restic" + ] +} \ No newline at end of file diff --git a/content/en/developer/integration/backup/restic.md b/content/en/developer/integration/backup/restic.md new file mode 100644 index 00000000..eb3e638c --- /dev/null +++ b/content/en/developer/integration/backup/restic.md @@ -0,0 +1,91 @@ +--- +title: "Restic" +description: "Back up local data to RustFS with Restic and restore snapshots from an S3-compatible repository." +--- + +Restic is a command-line backup tool that stores snapshots in a repository. This guide shows how to point Restic at RustFS, back up a local directory, restore a snapshot, and verify the stored objects in RustFS. + +You need a running RustFS instance, a bucket such as `my-bucket`, Restic installed, access keys for the bucket, and a password for the Restic repository. + +:::note[Path-style access] + +Restic's S3 backend should use path-style access for RustFS. This guide sets `-o s3.bucket-lookup=path` and uses the bucket name in the repository URL. + +::: + +## Architecture + +```mermaid +flowchart LR + Files["Local files"] --> Restic["Restic"] + Restic -->|S3 API| RustFS["RustFS"] + RustFS --> Bucket["my-bucket/restic"] +``` + +Restic writes repository metadata and backup snapshots into RustFS through the S3 API. The repository prefix in this guide is `restic`, and the bucket is `my-bucket`. + +## 1. Prepare the bucket + +Open the RustFS Console at `http://localhost:9001` and create `my-bucket`, or choose an existing bucket that is dedicated to backups. + +![RustFS Console bucket list with the `my-bucket` backup bucket selected](./images/restic-console.png) + +Use a dedicated bucket for each backup job. The example screenshot shows the Console in English and light theme. + +## 2. Initialize the Restic repository + +Set the credentials, region, repository password, and repository location: + +```bash +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_DEFAULT_REGION=us-east-1 +export RESTIC_PASSWORD= +export RESTIC_REPOSITORY=s3:http://localhost:9000/my-bucket/restic +``` + +Run `restic init` with path-style bucket lookup: + +```bash +restic -o s3.bucket-lookup=path init +``` + +The repository password protects the snapshot data. Keep it separate from the RustFS access keys. + +## 3. Back up data + +Create a small test directory and back it up: + +```bash +mkdir -p ~/Documents/restic-demo +printf 'hello from RustFS\n' > ~/Documents/restic-demo/hello.txt +restic -o s3.bucket-lookup=path backup ~/Documents/restic-demo +``` + +Restic prints a snapshot ID after the backup completes. Run the command again after changing a file to create a second snapshot. + +## 4. Restore a snapshot + +Restore the latest snapshot to a separate directory: + +```bash +mkdir -p ~/Documents/restic-restore +restic -o s3.bucket-lookup=path restore latest --target ~/Documents/restic-restore +``` + +You can also restore a specific snapshot ID if you want to recover an earlier version. + +## 5. Verify the repository in RustFS + +Open `my-bucket` in the RustFS Console and confirm that Restic created repository objects under the `restic/` prefix. + +You can also run a repository check: + +```bash +restic -o s3.bucket-lookup=path check +``` + +## Next steps + +- [CLI Client (rc)](/operations/rc) to create buckets and inspect objects from the command line. +- [TLS Configuration](/integration/tls-configured) if you expose RustFS outside a trusted network. \ No newline at end of file diff --git a/content/en/developer/integration/index.md b/content/en/developer/integration/index.md index 36086197..0c618e63 100644 --- a/content/en/developer/integration/index.md +++ b/content/en/developer/integration/index.md @@ -1,6 +1,6 @@ --- title: "Integration" -description: "Integrate RustFS with reverse proxies and big data systems." +description: "Integrate RustFS with reverse proxies, backup tools, and big data systems." --- Use this section to connect **RustFS** to infrastructure and application platforms through its S3-compatible API. @@ -8,6 +8,7 @@ Use this section to connect **RustFS** to infrastructure and application platfor ## Integration categories - [Reverse Proxy](./reverse-proxy/index.md) covers Nginx, Traefik, Caddy, and HAProxy. +- [Backup](./backup/index.md) covers Restic. - [Big Data](./big-data/index.md) covers Iceberg. Each guide identifies the RustFS endpoint and addressing requirements to use when configuring the integrating system. \ No newline at end of file diff --git a/content/en/developer/integration/meta.json b/content/en/developer/integration/meta.json index 96a0425f..45c75669 100644 --- a/content/en/developer/integration/meta.json +++ b/content/en/developer/integration/meta.json @@ -2,6 +2,7 @@ "title": "Integration", "pages": [ "reverse-proxy", + "backup", "big-data" ] } \ No newline at end of file diff --git a/content/fr/developer/integration/backup/images/restic-console.png b/content/fr/developer/integration/backup/images/restic-console.png new file mode 100644 index 00000000..67997cbc Binary files /dev/null and b/content/fr/developer/integration/backup/images/restic-console.png differ diff --git a/content/fr/developer/integration/backup/index.md b/content/fr/developer/integration/backup/index.md new file mode 100644 index 00000000..19e82d4c --- /dev/null +++ b/content/fr/developer/integration/backup/index.md @@ -0,0 +1,12 @@ +--- +title: "Sauvegarde" +description: "Connectez des outils de sauvegarde à RustFS via des interfaces de stockage objet compatibles S3." +--- + +Utilisez **RustFS** comme backend de stockage objet pour les outils de sauvegarde qui stockent les données de dépôt dans un service compatible S3. + +## Systèmes + +- [Restic](./restic.md) + +Conservez les tâches de sauvegarde dans un compartiment et un préfixe dédiés, et utilisez des identifiants limités aux opérations de compartiment nécessaires. \ No newline at end of file diff --git a/content/fr/developer/integration/backup/meta.json b/content/fr/developer/integration/backup/meta.json new file mode 100644 index 00000000..01ed058d --- /dev/null +++ b/content/fr/developer/integration/backup/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Sauvegarde", + "pages": [ + "restic" + ] +} \ No newline at end of file diff --git a/content/fr/developer/integration/backup/restic.md b/content/fr/developer/integration/backup/restic.md new file mode 100644 index 00000000..c70ac3d2 --- /dev/null +++ b/content/fr/developer/integration/backup/restic.md @@ -0,0 +1,91 @@ +--- +title: "Restic" +description: "Sauvegardez des données locales vers RustFS avec Restic et restaurez des snapshots depuis un dépôt compatible S3." +--- + +Restic est un outil de sauvegarde en ligne de commande qui stocke les snapshots dans un dépôt. Cette page montre comment pointer Restic vers RustFS, sauvegarder un répertoire local, restaurer un snapshot et vérifier les objets stockés dans RustFS. + +Vous avez besoin d'une instance RustFS en cours d'exécution, d'un compartiment comme `my-bucket`, de Restic installé, de clés d'accès pour le compartiment et d'un mot de passe pour le dépôt Restic. + +:::note[Adressage de type chemin] + +Le backend S3 de Restic doit utiliser l'adressage de type chemin avec RustFS. Cette page définit `-o s3.bucket-lookup=path` et utilise le nom du compartiment dans l'URL du dépôt. + +::: + +## Architecture + +```mermaid +flowchart LR + Files["Local files"] --> Restic["Restic"] + Restic -->|S3 API| RustFS["RustFS"] + RustFS --> Bucket["my-bucket/restic"] +``` + +Restic écrit les métadonnées du dépôt et les snapshots de sauvegarde dans RustFS via l'API S3. Le préfixe du dépôt dans cette page est `restic`, et le compartiment est `my-bucket`. + +## 1. Préparer le compartiment + +Ouvrez la Console RustFS à l'adresse `http://localhost:9001` et créez `my-bucket`, ou choisissez un compartiment existant dédié aux sauvegardes. + +![Console RustFS affichant la liste des compartiments avec le compartiment de sauvegarde `my-bucket` sélectionné](./images/restic-console.png) + +Utilisez un compartiment dédié pour chaque tâche de sauvegarde. La capture d'écran montre la Console en anglais et en thème clair. + +## 2. Initialiser le dépôt Restic + +Définissez les identifiants, la région, le mot de passe du dépôt et l'emplacement du dépôt : + +```bash +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_DEFAULT_REGION=us-east-1 +export RESTIC_PASSWORD= +export RESTIC_REPOSITORY=s3:http://localhost:9000/my-bucket/restic +``` + +Exécutez `restic init` avec la sélection de compartiment en mode chemin : + +```bash +restic -o s3.bucket-lookup=path init +``` + +Le mot de passe du dépôt protège les données des snapshots. Conservez-le séparément des clés d'accès RustFS. + +## 3. Sauvegarder des données + +Créez un petit répertoire de test et sauvegardez-le : + +```bash +mkdir -p ~/Documents/restic-demo +printf 'hello from RustFS\n' > ~/Documents/restic-demo/hello.txt +restic -o s3.bucket-lookup=path backup ~/Documents/restic-demo +``` + +Restic affiche l'ID du snapshot une fois la sauvegarde terminée. Relancez la commande après avoir modifié un fichier pour créer un second snapshot. + +## 4. Restaurer un snapshot + +Restaurez le snapshot le plus récent dans un répertoire séparé : + +```bash +mkdir -p ~/Documents/restic-restore +restic -o s3.bucket-lookup=path restore latest --target ~/Documents/restic-restore +``` + +Vous pouvez aussi restaurer un ID de snapshot précis si vous devez récupérer une version antérieure. + +## 5. Vérifier le dépôt dans RustFS + +Ouvrez `my-bucket` dans la Console RustFS et vérifiez que Restic a créé des objets de dépôt sous le préfixe `restic/`. + +Vous pouvez aussi lancer une vérification du dépôt : + +```bash +restic -o s3.bucket-lookup=path check +``` + +## Étapes suivantes + +- [CLI Client (rc)](/operations/rc) pour créer des compartiments et inspecter les objets depuis la ligne de commande. +- [Configuration TLS](/integration/tls-configured) si vous exposez RustFS hors d'un réseau de confiance. \ No newline at end of file diff --git a/content/fr/developer/integration/index.md b/content/fr/developer/integration/index.md index 36086197..135664c8 100644 --- a/content/fr/developer/integration/index.md +++ b/content/fr/developer/integration/index.md @@ -1,13 +1,14 @@ --- title: "Integration" -description: "Integrate RustFS with reverse proxies and big data systems." +description: "Intégrez RustFS avec des reverse proxies, des outils de sauvegarde et des systèmes de big data." --- -Use this section to connect **RustFS** to infrastructure and application platforms through its S3-compatible API. +Utilisez cette section pour connecter **RustFS** à des plateformes d'infrastructure et d'applications via son API compatible S3. ## Integration categories -- [Reverse Proxy](./reverse-proxy/index.md) covers Nginx, Traefik, Caddy, and HAProxy. -- [Big Data](./big-data/index.md) covers Iceberg. +- [Reverse Proxy](./reverse-proxy/index.md) couvre Nginx, Traefik, Caddy et HAProxy. +- [Backup](./backup/index.md) couvre Restic. +- [Big Data](./big-data/index.md) couvre Iceberg. -Each guide identifies the RustFS endpoint and addressing requirements to use when configuring the integrating system. \ No newline at end of file +Chaque guide indique le point de terminaison RustFS et les exigences d'adressage à utiliser lors de la configuration du système intégré. \ No newline at end of file diff --git a/content/fr/developer/integration/meta.json b/content/fr/developer/integration/meta.json index 775b3260..07bb287c 100644 --- a/content/fr/developer/integration/meta.json +++ b/content/fr/developer/integration/meta.json @@ -2,6 +2,7 @@ "title": "Intégration", "pages": [ "reverse-proxy", + "backup", "big-data" ] } \ No newline at end of file diff --git a/content/ja/developer/integration/backup/images/restic-console.png b/content/ja/developer/integration/backup/images/restic-console.png new file mode 100644 index 00000000..67997cbc Binary files /dev/null and b/content/ja/developer/integration/backup/images/restic-console.png differ diff --git a/content/ja/developer/integration/backup/index.md b/content/ja/developer/integration/backup/index.md new file mode 100644 index 00000000..37cd3e8f --- /dev/null +++ b/content/ja/developer/integration/backup/index.md @@ -0,0 +1,12 @@ +--- +title: "バックアップ" +description: "S3 互換のオブジェクトストレージ経由でバックアップツールを RustFS に接続します。" +--- + +**RustFS** を、Repository データを S3 互換サービスに保存するバックアップツールのオブジェクトストレージ backend として使用します。 + +## システム + +- [Restic](./restic.md) + +バックアップジョブは専用のバケットとプレフィックスにまとめ、必要なバケット操作だけに絞った認証情報を使用します。 \ No newline at end of file diff --git a/content/ja/developer/integration/backup/meta.json b/content/ja/developer/integration/backup/meta.json new file mode 100644 index 00000000..123f4744 --- /dev/null +++ b/content/ja/developer/integration/backup/meta.json @@ -0,0 +1,6 @@ +{ + "title": "バックアップ", + "pages": [ + "restic" + ] +} \ No newline at end of file diff --git a/content/ja/developer/integration/backup/restic.md b/content/ja/developer/integration/backup/restic.md new file mode 100644 index 00000000..b16a51f8 --- /dev/null +++ b/content/ja/developer/integration/backup/restic.md @@ -0,0 +1,91 @@ +--- +title: "Restic" +description: "Restic でローカルデータを RustFS にバックアップし、S3 互換リポジトリからスナップショットを復元します。" +--- + +Restic は、スナップショットをリポジトリに保存するコマンドラインのバックアップツールです。このページでは、Restic を RustFS に向け、ローカルディレクトリをバックアップし、スナップショットを復元し、RustFS 内の保存オブジェクトを確認します。 + +実行中の RustFS インスタンス、`my-bucket` のようなバケット、インストール済みの Restic、バケット用のアクセスキー、Restic リポジトリ用のパスワードが必要です。 + +:::note[パス形式のアドレス指定] + +Restic の S3 backend では、RustFS に対してパス形式のアドレス指定を使用します。このページでは `-o s3.bucket-lookup=path` を設定し、リポジトリ URL にバケット名を含めます。 + +::: + +## アーキテクチャ + +```mermaid +flowchart LR + Files["Local files"] --> Restic["Restic"] + Restic -->|S3 API| RustFS["RustFS"] + RustFS --> Bucket["my-bucket/restic"] +``` + +Restic は S3 API を通じて、リポジトリのメタデータとバックアップスナップショットを RustFS に書き込みます。このページのリポジトリのプレフィックスは `restic`、バケットは `my-bucket` です。 + +## 1. バケットを準備する + +RustFS Console を `http://localhost:9001` で開き、`my-bucket` を作成するか、バックアップ専用の既存バケットを選択します。 + +![RustFS Console でバックアップ用バケット `my-bucket` が選択されたバケット一覧](./images/restic-console.png) + +バックアップジョブごとに専用バケットを使います。スクリーンショットは英語表示のライトテーマです。 + +## 2. Restic リポジトリを初期化する + +認証情報、リージョン、リポジトリのパスワード、リポジトリの場所を設定します。 + +```bash +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_DEFAULT_REGION=us-east-1 +export RESTIC_PASSWORD= +export RESTIC_REPOSITORY=s3:http://localhost:9000/my-bucket/restic +``` + +`restic init` をパス形式のバケット参照で実行します。 + +```bash +restic -o s3.bucket-lookup=path init +``` + +リポジトリのパスワードはスナップショットデータを保護します。RustFS のアクセスキーとは分けて保管してください。 + +## 3. データをバックアップする + +小さなテストディレクトリを作成してバックアップします。 + +```bash +mkdir -p ~/Documents/restic-demo +printf 'hello from RustFS\n' > ~/Documents/restic-demo/hello.txt +restic -o s3.bucket-lookup=path backup ~/Documents/restic-demo +``` + +バックアップが完了すると、Restic がスナップショット ID を表示します。ファイルを変更してから同じコマンドを再実行すると、2 つ目のスナップショットが作成されます。 + +## 4. スナップショットを復元する + +最新のスナップショットを別のディレクトリに復元します。 + +```bash +mkdir -p ~/Documents/restic-restore +restic -o s3.bucket-lookup=path restore latest --target ~/Documents/restic-restore +``` + +必要に応じて、特定のスナップショット ID を復元して以前の版を戻せます。 + +## 5. RustFS でリポジトリを確認する + +RustFS Console で `my-bucket` を開き、Restic が `restic/` プレフィックス配下にリポジトリオブジェクトを作成したことを確認します。 + +リポジトリチェックも実行できます。 + +```bash +restic -o s3.bucket-lookup=path check +``` + +## 次の手順 + +- [CLI Client (rc)](/operations/rc) でバケットを作成し、コマンドラインからオブジェクトを確認します。 +- RustFS を信頼できないネットワークの外に公開する場合は [TLS Configuration](/integration/tls-configured) を確認します。 \ No newline at end of file diff --git a/content/ja/developer/integration/index.md b/content/ja/developer/integration/index.md index 36086197..111fe1ba 100644 --- a/content/ja/developer/integration/index.md +++ b/content/ja/developer/integration/index.md @@ -1,13 +1,14 @@ --- title: "Integration" -description: "Integrate RustFS with reverse proxies and big data systems." +description: "RustFS をリバースプロキシ、バックアップツール、ビッグデータシステムと連携させます。" --- -Use this section to connect **RustFS** to infrastructure and application platforms through its S3-compatible API. +このセクションでは、**RustFS** を S3 互換 API 経由でインフラストラクチャとアプリケーションプラットフォームに接続します。 ## Integration categories -- [Reverse Proxy](./reverse-proxy/index.md) covers Nginx, Traefik, Caddy, and HAProxy. -- [Big Data](./big-data/index.md) covers Iceberg. +- [Reverse Proxy](./reverse-proxy/index.md) は Nginx、Traefik、Caddy、HAProxy を扱います。 +- [Backup](./backup/index.md) は Restic を扱います。 +- [Big Data](./big-data/index.md) は Iceberg を扱います。 -Each guide identifies the RustFS endpoint and addressing requirements to use when configuring the integrating system. \ No newline at end of file +各ガイドでは、連携先システムを設定する際に使用する RustFS のエンドポイントとアドレス指定の要件を示します。 \ No newline at end of file diff --git a/content/ja/developer/integration/meta.json b/content/ja/developer/integration/meta.json index 57175799..fa774738 100644 --- a/content/ja/developer/integration/meta.json +++ b/content/ja/developer/integration/meta.json @@ -2,6 +2,7 @@ "title": "連携", "pages": [ "reverse-proxy", + "backup", "big-data" ] } \ No newline at end of file diff --git a/content/zh/developer/integration/backup/images/restic-console.png b/content/zh/developer/integration/backup/images/restic-console.png new file mode 100644 index 00000000..67997cbc Binary files /dev/null and b/content/zh/developer/integration/backup/images/restic-console.png differ diff --git a/content/zh/developer/integration/backup/index.md b/content/zh/developer/integration/backup/index.md new file mode 100644 index 00000000..14e98539 --- /dev/null +++ b/content/zh/developer/integration/backup/index.md @@ -0,0 +1,12 @@ +--- +title: "备份" +description: "通过兼容 S3 的对象存储接口将备份工具连接到 RustFS。" +--- + +将 **RustFS** 用作备份工具的对象存储后端,这些工具会把仓库数据保存到兼容 S3 的服务中。 + +## 系统 + +- [Restic](./restic.md) + +请将备份作业放在专用的存储桶和前缀中,并使用仅限所需存储桶操作的凭据。 \ No newline at end of file diff --git a/content/zh/developer/integration/backup/meta.json b/content/zh/developer/integration/backup/meta.json new file mode 100644 index 00000000..51649688 --- /dev/null +++ b/content/zh/developer/integration/backup/meta.json @@ -0,0 +1,6 @@ +{ + "title": "备份", + "pages": [ + "restic" + ] +} \ No newline at end of file diff --git a/content/zh/developer/integration/backup/restic.md b/content/zh/developer/integration/backup/restic.md new file mode 100644 index 00000000..f26248da --- /dev/null +++ b/content/zh/developer/integration/backup/restic.md @@ -0,0 +1,91 @@ +--- +title: "Restic" +description: "使用 Restic 将本地数据备份到 RustFS,并从兼容 S3 的仓库中恢复快照。" +--- + +Restic 是一个命令行备份工具,会把快照存储到仓库中。本页演示如何将 Restic 指向 RustFS、备份本地目录、恢复快照,并验证 RustFS 中保存的对象。 + +你需要一个正在运行的 RustFS 实例、一个类似 `my-bucket` 的存储桶、已安装的 Restic、该存储桶的访问密钥,以及 Restic 仓库密码。 + +:::note[路径式寻址] + +Restic 的 S3 backend 应在 RustFS 上使用路径式寻址。本页将设置 `-o s3.bucket-lookup=path`,并在仓库 URL 中使用存储桶名称。 + +::: + +## 架构 + +```mermaid +flowchart LR + Files["Local files"] --> Restic["Restic"] + Restic -->|S3 API| RustFS["RustFS"] + RustFS --> Bucket["my-bucket/restic"] +``` + +Restic 通过 S3 API 将仓库元数据和备份快照写入 RustFS。本页中的仓库前缀是 `restic`,存储桶是 `my-bucket`。 + +## 1. 准备存储桶 + +打开 RustFS Console,地址为 `http://localhost:9001`,创建 `my-bucket`,或者选择一个专门用于备份的现有存储桶。 + +![RustFS Console 中选中的备份存储桶 `my-bucket` 的存储桶列表](./images/restic-console.png) + +每个备份作业都应使用独立的存储桶。截图显示的是英文界面和浅色主题。 + +## 2. 初始化 Restic 仓库 + +设置凭据、区域、仓库密码和仓库位置: + +```bash +export AWS_ACCESS_KEY_ID= +export AWS_SECRET_ACCESS_KEY= +export AWS_DEFAULT_REGION=us-east-1 +export RESTIC_PASSWORD= +export RESTIC_REPOSITORY=s3:http://localhost:9000/my-bucket/restic +``` + +使用路径式存储桶查找运行 `restic init`: + +```bash +restic -o s3.bucket-lookup=path init +``` + +仓库密码用于保护快照数据。请将其与 RustFS 访问密钥分开保存。 + +## 3. 备份数据 + +创建一个小型测试目录并进行备份: + +```bash +mkdir -p ~/Documents/restic-demo +printf 'hello from RustFS\n' > ~/Documents/restic-demo/hello.txt +restic -o s3.bucket-lookup=path backup ~/Documents/restic-demo +``` + +备份完成后,Restic 会输出一个快照 ID。修改文件后再次运行命令,可以创建第二个快照。 + +## 4. 恢复快照 + +将最新快照恢复到单独目录: + +```bash +mkdir -p ~/Documents/restic-restore +restic -o s3.bucket-lookup=path restore latest --target ~/Documents/restic-restore +``` + +如果你需要恢复较早版本,也可以指定某个快照 ID。 + +## 5. 在 RustFS 中验证仓库 + +打开 RustFS Console 中的 `my-bucket`,确认 Restic 已在 `restic/` 前缀下创建仓库对象。 + +你也可以运行仓库检查: + +```bash +restic -o s3.bucket-lookup=path check +``` + +## 下一步 + +- [CLI Client (rc)](/operations/rc) 用于从命令行创建存储桶并检查对象。 +- 如果你要将 RustFS 暴露到不受信任的网络之外,请查看 [TLS Configuration](/integration/tls-configured)。 \ No newline at end of file diff --git a/content/zh/developer/integration/index.md b/content/zh/developer/integration/index.md index ccb6b1b5..b7602a1d 100644 --- a/content/zh/developer/integration/index.md +++ b/content/zh/developer/integration/index.md @@ -1,6 +1,6 @@ --- title: "集成" -description: "将 RustFS 与反向代理和大数据系统集成。" +description: "将 RustFS 与反向代理、备份工具和大数据系统集成。" --- 通过 S3 兼容 API 将 **RustFS** 连接到基础设施和应用平台。 @@ -8,6 +8,7 @@ description: "将 RustFS 与反向代理和大数据系统集成。" ## 集成类别 - [反向代理](./reverse-proxy/index.md)涵盖 Nginx、Traefik、Caddy 和 HAProxy。 +- [备份](./backup/index.md)涵盖 Restic。 - [大数据](./big-data/index.md)涵盖 Iceberg。 每篇指南都会说明配置集成系统时需要使用的 RustFS 端点和寻址要求。 \ No newline at end of file diff --git a/content/zh/developer/integration/meta.json b/content/zh/developer/integration/meta.json index 7fd42061..3f44d0cc 100644 --- a/content/zh/developer/integration/meta.json +++ b/content/zh/developer/integration/meta.json @@ -2,6 +2,7 @@ "title": "集成", "pages": [ "reverse-proxy", + "backup", "big-data" ] } \ No newline at end of file