2 General Syntax of FTM CLI Commands

The following is the general syntax of the commands on the Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI):

java -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options] -P rest_endpoint -U user

If you’ve set the authentication parameters using the environment variables or configuration file, then the simplified syntax of the FTM CLI commands is as follows:

java -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options]
  • For information about rest_endpoint, user, and general_CLI_command_options, see CLI Command Options.

  • For information about command, see General CLI Command Actions.

  • For information about command_specific_options, see the documentation for each command in Managing Containers and Managing Objects.

  • target can be one or a combination of these parameters depending on the command: container, object, file, or directory.

Note:

  • All the commands in this document are illustrated with the simplified syntax. However, use the appropriate syntax based on your choice of the method for setting the authentication parameters. See Authentication.

  • For FTM CLI 2.3 or earlier, use the following general syntax of the commands:

    java -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options] -U user -A auth_url -S service -I identity_domain
    
    • For information about user, auth_url, service, and identity_domain, see CLI Command Options. The options auth_url, service, and identity_domain are deprecated from FTM CLI 2.4. It’s recommended that you use the REST Endpoint URL parameter to obtain authentication to access your storage account and not the deprecated parameters such as authentication URL, service name, and identity domain.

Important:

  • For FTM CLI 2.3 or earlier, if you’re using JRE 9, and if one of the below scenarios is applicable,
    • You’ve used the —save-auth-key parameter in the command to save the password.

    • The command accesses the encrypted password that’s stored in the ftmcliKeystore  file.

    then use the following general command syntax:
    java --add-modules java.xml.bind -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options] -U user -A auth_url -S service -I identity_domain
    or the following simplified command syntax:
    java --add-modules java.xml.bind -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options]
  • If you’re using JRE 8, then for improved performance of FTM CLI 2.4, disable GCM:
    1. Create a file java.security with the following line:
      jdk.tls.disabledAlgorithms=SSLv3,GCM
    2. Start your Java process with the command:
      java -Djava.security.properties=/path/to/my/java.security -jar ftmcli.jar command [command_specific_options] target [general_CLI_command_options] -P rest_endpoint -U user

CLI Command Options

Authentication

The following table describes the Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI) command options that you can use for the authentication.

Option Description Required?

-P rest_endpoint

--rest—endpoint rest_endpoint

The REST Endpoint or the REST Endpoint (Permanent) of your storage account. See REST Endpoint URL.

Required if you choose not to set the FTM_REST_ENDPOINT environment variable OR if you’ve not set the rest-endpoint parameter in the configuration file.

-U user

--user user

If you’re using FTM CLI 2.4, then this is your user name to access your storage account. See Obtaining Account Information.

If you’re using FTM CLI 2.3 or earlier, then this is the user parameter that you constructed using your user name and REST API endpoint URL. See Constructing the user Parameter.

Note:

You must have the appropriate role in Oracle Cloud Infrastructure Classic Console. See Getting Your Required Roles.

Required if you choose not to set the FTM_USER environment variable OR if you’ve not set the user parameter in the configuration file.

-A auth_url

--auth-url auth_url

The authentication URL that you derived from the REST Endpoint URL of your Oracle Cloud Infrastructure Object Storage Classic instance. See REST Endpoint URL.

Required if you choose not to set the FTM_AUTH_URL environment variable OR if you’ve not set the auth-url parameter in the configuration file.

(Deprecated from FTM CLI 2.4)

-S service

--service service

The name of the service on Oracle Cloud. See REST Endpoint URL.

Required if you choose not to set the FTM_SERVICE environment variable OR if you’ve not set the service parameter in the configuration file.

(Deprecated from FTM CLI 2.4)

-I identity_domain

--identity-domain identity_domain

The identity domain of your Oracle Cloud Infrastructure Object Storage Classic instance. To find out the identity domain, see Identity Domain Name, User Name, and Password.

Required if you choose not to set the FTM_IDOMAIN environment variable OR if you’ve not set the identity-domain parameter in the configuration file.

(Deprecated from FTM CLI 2.4)

--save-auth-key

Encrypts the password that you enter, and saves the encrypted password locally in the ftmcliKeystore file.

The next time you run any command, the FTM CLI decrypts the previously stored password and uses it. You’re not prompted to enter the password.

Caution:

- Don't edit, rename, move, or delete the ftmcliKeystore file.

- The key to decrypt your saved password is stored in the ftmcli.properties file, as the auth-key parameter. Don't remove or edit that parameter.

Required only once when using FTM CLI for the first time.

Note:

It’s recommended that you use the REST Endpoint URL parameter to obtain authentication to access your storage account and not the deprecated parameters such as authentication URL, service name, and identity domain.

Examples:

  • If the REST Endpoint for your storage account is similar to https://acme.storage.oraclecloud.com/v1/Storage-acme and you’re using FTM CLI 2.4, then the list command is

    java -jar ftmcli.jar list -P https://acme.storage.oraclecloud.com/v1/Storage-acme -U jack.jones@example.com --save-auth-key
  • If the REST Endpoint for your storage account is similar to https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365 and you’re using FTM CLI 2.4, then the list command is

    java -jar ftmcli.jar list -P https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365 -U jack.jones@example.com --save-auth-key
  • If the REST Endpoint for your storage account is similar to https://acme.storage.oraclecloud.com/v1/Storage-acme and you’re using FTM CLI 2.3 or earlier, then the list command is

    java -jar ftmcli.jar list -U Storage-acme:jack.jones@example.com -A https://acme.storage.oraclecloud.com -S Storage -I acme --save-auth-key

General

The following table describes the general CLI command options.

Option Description

-d

--debug

Indicates that the command must be run in the debug mode. The output in this mode is very verbose. It includes the request and response details of the internal API call for the FTM CLI command. This output may be useful for debugging issues and is available in the ftmcli.trace file.

-i

--silent

Indicates that the command must be run in the nonverbose mode.

-v

--version

Prints the version of the FTM CLI tool.

Example

java -jar ftmcli.jar -v

Sample output

Version 2.3.0

-h

--help

Shows the help message and exits.

Example

java -jar ftmcli.jar -h

--properties-file /full/path/to/the/configuration/file

Specify the full path and name of the configuration file if it’s in a different directory than the FTM CLI client or if it has a name other than ftmcli.properties.

Example

java -jar ftmcli.jar --properties-file /home/jack/temp/ftmcli.prop list

General CLI Command Actions

The following table describes the general actions that you can perform on Oracle Cloud Infrastructure Object Storage Classic by using the FTM CLI commands.

Action Description

copy

Copies an object from the source container to the target container.

create-container

Creates a container.

delete

Deletes a container or an object.

download

Downloads the specified object from a container on the storage account to the local host.

To download the object from an archive container, you must restore it first.

list

Retrieves the list of objects in the specified container or the list of containers in the storage account.

restore

Restores the specified object in an archive container on the storage account.

You can download the archived object to the local host only after it has been restored.

upload

Uploads the specified object from the local host to a standard or an archive container on the storage account. (Archive support not available on Oracle Cloud at Customer)

describe

Retrieves metadata of the account, a container, or an object.

set

Sets metadata for your account, container, or object.

set-crp

Sets the container-level replication policy for a container.