Configure Your Source

With Rclone, you can define your source as a local file system or a different cloud provider. This section provides specific configuration examples for a local file system and several popular cloud providers.

Note:

This is not an exhaustive list; you can also configure other providers if they are supported by Rclone. For a full list of supported cloud providers and information about their configuration parameters, see the Rclone website.

Configure a Local File System

No specific configuration is required for using a local file system with Rclone. You can simply choose a local directory as your source.

To do so, export your source path as an environment variable:
$ export SOURCE=/path/to/source 

Configure Oracle Cloud Infrastructure Object Storage Classic

To configure Rclone for Oracle Cloud Infrastructure Object Storage Classic, you need your username, password, service instance ID, and the authentication URL.

Note:

To use Object Storage Classic or any other Swift-compatible source, you need to use Rclone version 1.4 or later.
  1. First, find the authentication URL:
    1. Sign in to the Oracle Cloud My Services application.
    2. Look for Oracle Cloud Infrastructure Object Storage Classic.
    3. Select View Details from the Actions menu (alternately, click the Oracle Cloud Infrastructure Object Storage Classic link on the Dashboard page).
    4. Find you authentic URL. Depending on when you created your account, do one of the following:
      • If your account was created after April 2017, note the authentication URL displayed in the Auth V1 Endpoint field, in the Additional Information section.
        For example:
        https://foo.storage.oraclecloud.com/auth/v1.0
      • If your account was created before April 2017, then you must construct the authentication URL:
        1. Note the REST Endpoint URL, which is displayed in the REST Endpoint field under the Additional Information section.
          For example:
          https://foo.storage.oraclecloud.com/v1/myservice-bar
        2. Delete the following portion of the REST Endpoint URL:
          v1/myservice-bar 
          The edited URL is: https://foo.storage.oraclecloud.com/.
        3. Append the following to the edited URL:
          auth/v1.0
          Assuming that the REST endpoint URL for your account is https://foo.storage.oraclecloud.com/v1/myservice-bar, the equivalent authentication URL would be https://foo.storage.oraclecloud.com/auth/v1.0.
  2. In the REST endpoint URL, find the service instance ID. For example, if your REST API endpoint URL is https://foo.storage.oraclecloud.com/v1/myservice-bar, then your service instance ID is myservice-bar.
  3. Configure Rclone by setting the environment variables as follows (replacing italicized_items with your specific values):
    $ 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> sets your source as OCI-C.

Configure Amazon S3

To configure Rclone for Amazon S3, you need the access key, the secret key, and the region of your bucket (if applicable). After you have them, you can configure Rclone by setting the environment variables from the command line:

(Replace italicize_items with your specific values.)
$ 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 sets your source as S3.

Configure Microsoft Azure Blob Storage

To configure Rclone for Microsoft Azure Blob Storage, you need the storage account name and key. After you have them, you can configure Rclone by setting the environment variables:

(Replace italicize_items with your specific values.)
$ 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 sets your source as Azure.

Configure Google Cloud Storage

Set up Google Cloud Storage with Rclone by using Application Default Credentials (ADC). See "Set up Application Default Credentials", accessible from "Explore More", elsewhere in this playbook, for more information.

  1. Install Google Cloud CLI and then initialize it by running the following command:
    gcloud init
  2. Next, create local authentication credentials for your user account:
    gcloud auth application-default login
    • The file will be in $HOME/.config/gcloud/application_default_credentials.json
    • Review the file to obtain the client_id , client_secret, and quota_project_id.
  3. Finally, configure Rclone by setting the following environmental variables using the information from the application_default_credentials.json file:
    export RCLONE_CONFIG_TARGETS3_TYPE=gcs
    export RCLONE_CONFIG_TARGETS3_PROJECT_NUMBER=your quota_project_id 
    export RCLONE_CONFIG_TARGETS3_CLIENT_ID=your client_id
    export RCLONE_CONFIG_TARGETS3_CLIENT_SECRET=your client_secret
    export RCLONE SOURCE=gcp:your_source_bucket