設定您的來源

使用 Rclone,您可以將來源定義為本機檔案系統或其他雲端提供者。本節提供本機檔案系統和數個常用雲端提供者的特定組態範例。

附註:

這不是詳盡清單;如果 Rclone 支援其他提供者,您也可以加以設定。如需支援的雲端提供者完整清單及其組態參數的相關資訊,請參閱 Rclone 網站。

設定本機檔案系統

使用具有 Rclone 的本機檔案系統時不需要特定的配置。您只要選擇本機目錄作為來源即可。

若要這樣做,請將來源路徑匯出為環境變數:
$ export SOURCE=/path/to/source 

設定 Oracle Cloud Infrastructure Object Storage Classic

若要設定 Oracle Cloud Infrastructure Object Storage Classic 的 Rclone,您需要有使用者名稱、密碼、服務執行處理 ID 及認證 URL。

附註:

若要使用 Object Storage Classic 或任何其他與 Swift 相容的來源,您必須使用 Rclone 版本 1.4 或更新版本。
  1. 首先,尋找認證 URL:
    1. 登入 Oracle Cloud「我的服務」應用程式。
    2. 尋找 Oracle Cloud Infrastructure Object Storage Classic。
    3. 從「動作」功能表中選取「檢視詳細資訊」(或者,按一下「儀表板」頁面上的 Oracle Cloud Infrastructure Object Storage Classic 連結)。
    4. 尋找您的真實網址。視您建立帳戶的時間而定,執行下列其中一項作業:
      • 如果您的帳戶是在 2017 年 4 月之後建立,請注意「其他資訊」段落中「認證 V1 端點」欄位中顯示的認證 URL。
        舉例而言:
        https://foo.storage.oraclecloud.com/auth/v1.0
      • 如果您的帳戶是在 2017 年 4 月之前建立,則您必須建構驗證 URL:
        1. 請注意「REST 端點 URL」,此 URL 會顯示在「其他資訊」區段底下的「REST 端點」欄位中。
          舉例而言:
          https://foo.storage.oraclecloud.com/v1/myservice-bar
        2. 刪除 REST 端點 URL 的下列部分:
          v1/myservice-bar 
          編輯的 URL 為:https://foo.storage.oraclecloud.com/
        3. 將下列項目附加至編輯的 URL:
          auth/v1.0
          假設您帳戶的 REST 端點 URL 為 https://foo.storage.oraclecloud.com/v1/myservice-bar,同等的認證 URL 為 https://foo.storage.oraclecloud.com/auth/v1.0
  2. 在 REST 端點 URL 中,尋找服務執行處理 ID。例如,如果您的 REST API 端點 URL 為 https://foo.storage.oraclecloud.com/v1/myservice-bar,則服務執行處理 ID 為 myservice-bar
  3. 請依下列方式設定環境變數以設定 Rclone (將 <italicized_items> 取代為您的特定值):
    $ export RCLONE_CONFIG_OCIC_TYPE=swift
    $ export RCLONE_CONFIG_OCIC_USER=<your_service_instance_ID>:<your_username>
    $ export RCLONE_CONFIG_OCIC_KEY=<your_password>
    $ export RCLONE_CONFIG_OCIC_AUTH=<your_authentication_URL>
    $ export SOURCE=ocic:<your_source_container>
    $ export SOURCE=ocic: <your_source_container> 會將您的來源設為 OCI-C。

設定 Amazon S3

若要設定 Amazon S3 的 Rclone,您需要存取金鑰、秘密金鑰以及儲存桶的區域 (如果適用)。完成之後,您可以從命令行設定環境變數來設定 Rclone:

(以您的特定值取代 <italicize_items> 。)
$ export RCLONE_CONFIG_S3_TYPE=s3
$ export RCLONE_CONFIG_S3_ACCESS_KEY_ID=<your_access_key>
$ export RCLONE_CONFIG_S3_SECRET_ACCESS_KEY=<your_secret_key>
$ export RCLONE_CONFIG_S3_REGION=<region_of_your_bucket>
$ export SOURCE=s3:<your_source_bucket> 
$ export SOURCE=s3:<your_source_bucket> 會將您的來源設為 S3。

設定 Microsoft Azure Blob 儲存體

若要設定 Rclone for Microsoft Azure Blob Storage,您需要儲存帳戶名稱和金鑰。建立 Rclone 之後,您可以透過設定環境變數來設定 Rclone:

(以您的特定值取代 <italicize_items> 。)
$ export RCLONE_CONFIG_AZURE_TYPE=azureblob
$ export RCLONE_CONFIG_AZURE_ACCOUNT=<your_storage_account_name>
$ export RCLONE_CONFIG_AZURE_KEY=<your_key>
$ export SOURCE=azure:<your_source_bucket> 
$ export SOURCE=azure:<your_source_bucket> 將您的來源設定為 Azure。