From e65e776a3c597d6ee584a24c2327d8cf4ee0aa18 Mon Sep 17 00:00:00 2001 From: Damiano Albani Date: Sat, 24 Jun 2023 17:03:58 +0200 Subject: [PATCH] Updated Cloud Tier (markdown) --- Cloud-Tier.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Cloud-Tier.md b/Cloud-Tier.md index 87e9c7a..b45b1a6 100644 --- a/Cloud-Tier.md +++ b/Cloud-Tier.md @@ -89,6 +89,7 @@ Here's an example of a configuration for an Rclone storage backend: [storage.backend.rclone.default] enabled = true remote_name = "my-onedrive" + key_template = "SeaweedFS/{{ slice . 0 2 }}/{{ slice . 2 4 }}/{{ slice . 4 }}" # optional ``` Where `my-remote` must correspond to what's configured in `~/.config/rclone/rclone.conf`: @@ -98,6 +99,16 @@ type = onedrive ... ``` +The optional `key_template` property makes it possible to choose how the individual volume files are eventually named in the storage backend. +The template has to follow the [text/template](https://pkg.go.dev/text/template) syntax, where `.` is a UUID string representing the volume ID. +In this example, files would be named as such in OneDrive: +``` +SeaweedFS/ + 5f/ + e5/ + 03d8-0aba-4e42-b1c8-6116bf862f71 +``` + ### Configuration After changing the master config, you need to **restart the volume servers** so that they pull the updated configuration