Configure rclone for Object Storage

To configure rclone for Oracle Cloud Infrastructure Object Storage, you must use the Amazon S3 Compatibility API. First, you need to obtain proper credentials and the API endpoint and then set the correct environment variables. Use the following instructions.

Obtain Security Credentials and API Endpoint

You must obtain the secret key, access key, region API endpoint, and namespace for configuration.

  1. First, create a secret key and access key pair:
    1. View the user's details.
      • If you're creating a Customer Secret key for yourself, open the Profile menu (User menu icon) and click User Settings.
      • If you're an administrator creating a Customer Secret key for another user, in the Console, click Identity and then click Users. Locate the user in the list, and then click the user's name to view the details.
    2. On the left side of the page, click Customer Secret Keys.

      A Customer Secret key consists of an Access Key/Secret key pair. Oracle automatically generates the Access Key when you or your administrator generates the Secret Key to create the Customer Secret key.

    3. Click Generate Secret Key.
    4. Enter a friendly description for the key and click Generate Secret Key.

      The generated Secret Key is displayed in the Generate Secret Key dialog box. At the same time, Oracle generates the Access Key that is paired with the Secret Key. The newly generated Customer Secret key is added to the list of Customer Secret Keys.

    5. Copy the Secret Key immediately, because you can't retrieve the Secret Key again after closing the dialog box for security reasons.

      If you're an administrator creating a Secret Key for another user, you need to securely deliver it to the user by providing it verbally, printing it out, or sending it through a secure email service.

    6. Click Close.
    7. To show or copy the Access Key, click the Show or Copy action to the left of the Name of a particular Customer Secret key.
  2. In the API endpoint, which takes the following form:
     https://<your_namespace>.compat.objectstorage.<your_region_identifier>.oraclecloud.com 
    replace <your_namespace> with your namespace, and replace <your_region_identifier> with the region in where you created your account.

    Note:

    You can identify your namespace either from the Console or by using a command-line tool:
    • From the Console, open the Profile menu (User menu icon) and click Tenancy: <your_tenancy_name>. Your namespace string is listed under Object Storage Settings.
    • From the command line, enter:
      oci os ns get
      The namespace will appear in the response:
      {
          "data": "MyNamespace"
      }		

Set Environment Variables

After you have your secret key, access key, API endpoint, and region identifier, configure rclone by setting the environment variables in the rclone configuration file.

To set the environment variables,

  1. Open the rclone configuration file and add these commands (replace <bracketed italicized values> with your specific values):
    $ export RCLONE_CONFIG_OCI_TYPE=s3
    $ export RCLONE_CONFIG_OCI_ACCESS_KEY_ID=<your_access_key>
    $ export RCLONE_CONFIG_OCI_SECRET_ACCESS_KEY=<your_secret_key>
    $ export RCLONE_CONFIG_OCI_REGION=<your_region_identifier>
    $ export RCLONE_CONFIG_OCI_ENDPOINT=
    https://<your_namespace>.compat.objectstorage.<your_region_identifier>.oraclecloud.com
  2. From the command line, verify that rclone recognizes the configuration through the environment variables:
    $ rclone listremotes
    oci:
    $