1 Preparing to Use the FTM CLI
You must install Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI) first, and depending on your choice of authentication method, you might have to set up configuration files, or some environment variables.
System Requirements and Supported Platforms
Supported Platforms
-
Oracle Linux 6.3 or later
-
Oracle Linux 7.0 or later
-
Microsoft Windows 7
-
Microsoft Windows 10
-
Microsoft Windows Server 2012
-
Ubuntu 14.04 LTS
-
Ubuntu 16.04 LTS
-
Mac OS X 10.7 or later
-
Mac OS 10.12 or later
JRE Requirements
Ensure that one of the following JREs is installed:-
JRE 7
-
JRE 8
-
JRE 9
-
OpenJDK 7
-
OpenJDK 8
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.
or the following simplified 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
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:
-
Create a file
java.security
with the following line:jdk.tls.disabledAlgorithms=SSLv3,GCM
-
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
-
Obtaining Account Information
Identity Domain Name, User Name, and Password
After Oracle creates your account, you'll receive a Welcome email that contains your user name, and password for your Oracle Cloud Infrastructure Object Storage Classic account. Additionally, if your account type is Traditional Account, then the Welcome email also contains the identity domain. To know your account type, see About REST URLs for Oracle Cloud Infrastructure Object Storage Classic Resources in Using Oracle Cloud Infrastructure Object Storage Classic.
If you can't find this email or didn't receive it, then contact your service administrator.
REST Endpoint URL
To find the REST Endpoint URL for your storage account and to know your account type, see About REST URLs for Oracle Cloud Infrastructure Object Storage Classic Resources in Using Oracle Cloud Infrastructure Object Storage Classic.
REST Endpoint: https://acme.storage.oraclecloud.com/v1/Storage-acme
REST Endpoint (Permanent): https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365
To decide if you must use REST Endpoint or REST Endpoint (Permanent) in the FTM CLI for your use-case, see Finding the REST Endpoint URL for Your Cloud Account in Using Oracle Cloud Infrastructure Object Storage Classic.
Note:
-
In the above examples,
Storage
is the service name. -
In FTM CLI 2.3 or earlier, for the authentication URL parameter, use only the part of the REST Endpoint URL that you see before the API version
/v1
. That is, usehttps://acme.storage.oraclecloud.com
from the REST Endpoint orhttps://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com
from the REST Endpoint (Permanent) from the above examples for the authentication URL parameter.
Constructing the user
Parameter
If you’re using FTM CLI 2.3 or earlier, then to obtain authentication to access Oracle Cloud Infrastructure Object Storage Classic, you must construct the user parameter using the user name and the REST API endpoint URL.
-
Obtain the part of the REST Endpoint URL after the API version
v1/
.For example, select
Storage-acme
if your REST Endpoint URL is similar tohttps://acme.storage.oraclecloud.com/v1/Storage-acme
. SelectStorage-7b16fede61e1417ab83eb52e06f0e365
if your REST Endpoint URL is similar tohttps://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365
. -
To construct the
user
parameter, insert a colon (:
) after the selected part of the REST Endpoint URL and append the user name to it.If your user name isjack.jones@examples.com
, and your REST Endpoint URL is similar tohttps://acme.storage.oraclecloud.com/v1/Storage-acme
, then theuser
parameter isuser=Storage-acme:jack.jones@example.com
If your REST Endpoint URL is similar to
https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365
, then theuser
parameter isuser=Storage-7b16fede61e1417ab83eb52e06f0e365:jack.jones@example.com
Getting Your Required Roles
-
To create, update, and delete the Oracle Cloud Infrastructure Object Storage Classic containers, you must have the
Storage_Administrator
role. -
To create, update, and delete the Oracle Cloud Infrastructure Object Storage Classic objects, you must have the
Storage_ReadWriteGroup
role. -
To view or retrieve details of the objects or containers, you must have the
Storage_ReadGroup
role.
For more information, see About Oracle Cloud Infrastructure Object Storage Classic Roles and Users in Using Oracle Cloud Infrastructure Object Storage Classic.
If the required role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Obtaining the FTM CLI
To start using the CLI for the Oracle Cloud Infrastructure Object Storage Classic, download the CLI client and store it at an appropriate location on the host.
- Download the FTM CLI client ftmcli.jar file from http://www.oracle.com/technetwork/topics/cloud/downloads/index.html.
- Save the file at an appropriate location on the local host, for example,
/home/jack/FTM_CLI/ftmcli.jar
. Note that when you create the configuration file, you must store it at the same location. The CLI creates theftmcli.log
andftmcli.trace
files at the same location. You can view the contents of these files to debug issues. - Provide
Execute
permission to theftmcli.jar
file with thechmod
command.
Setting Up Configuration Files
To avoid entering the authentication information with every command, setting the environment variables at the start of every session, or updating the configuration file with new set of parameters, you can store combinations of parameters permanently in multiple configuration files. You can also set the default values of some of the parameters associated with the Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI) operation in the configuration file. By using the --properties-file
command option on the command-line, you can specify the service instance against which the command must run or the CLI parameters that the command must use by specifying the appropriate configuration file. To create a configuration file on the local host on which you downloaded the FTM CLI client:
Setting Up the Required Environment Variables
To avoid entering the authentication URL, service name, and identity domain name with every command, you can store them in the environment variables once at the beginning of the session. The values of the environment variables are lost when the session ends.
The CLI gives higher priority to the environment variables than to the configuration file. The values set in the configuration file get picked up by the Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI) client if the environment variables haven't been set for the session.
To set the required environment variables on the host on which you downloaded the FTM CLI client:
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.