Upload To Object Storage On OCI (Oracle Cloud Infrastructure) Using CLI (Command Line Interface)
Upload To Object Storage On OCI (Oracle Cloud Infrastructure) Using CLI (Command Line Interface)
In this example I will demonstrate the use of CLI with Object Storage.
Overview : The command line interface (CLI) is a tool that enables you to work
with Oracle Cloud Infrastructure objects and services. The CLI provides much the
same functionality as the Console and includes additional advanced commands.
Some of these commands, such as the ability to run scripts, extend the Console's
functionality.
The following Oracle Cloud Infrastructure services are supported with CLI.
Audit
Core Services (Networking, Compute, Block Volume)
Database
IAM
Object Storage
Load Balancing
DNS
LikeZone Management
Comment Share 80 · 9 Comments
There are different way to upload files to Object Storage and its documented here.
In this blog I demonstrate a working example to use OCI CLI to upload files to
Object Storage.
Install OCI CLI (Automatically Installing CLI & Dependencies with CLI installer)
1. To install the CLI using oracle OS user, I had to add oracle OS use to the
sudoer.
vi /etc/sudoers
##
2. Login as oracle OS user and run the below command to install OCI cli.
Before using the CLI, you have to create a config file that contains the required
credentials for working with Oracle Cloud Infrastructure. Login as oracle OS user and
run the below command and follow the prompts.
Fingerprint: 1f:36:24:d2:1e:c7:1e:8a:de:7a:af:75:7d:5a:50:38
[oracle@finqa ~]$
How to get the OCID for User & OCID for Tenancy
User OCID Click on User at top Right --> User Settings --> User Information --
> OCID
In the previous step the Public Key that’s generated should be upload to OCI.
/home/oracle/.oci/oci_api_key_public.pem
2. On top Right click on User Name --> User Settings --> API Keys --> Add
Public Key
"data": "gsebmcs00026"
[oracle@finqa ~]$
I have already created a bucket named ADWC. So let’s upload to this bucket.
--name is the name of the file that you would like to see in object storage
[oracle@finqa tmp]$ oci os object put -ns gsebmcs00026 -bn ADWC --name
PRODUCTS_DATA_TABLE.dsv --file /tmp/PRODUCTS_DATA_TABLE.dsv
"etag": "610A8776E3E3AC24E053824711AC86EC",
"opc-content-md5": "y+rUMMEDFOtRt1wSMnttOg=="
[oracle@finqa tmp]$
Like · Reply
Like · Reply
Like · Reply
Dhiraj Goundgave 2y
Senior QA Engineer at Quick Heal Technologies
Bhoodev Sharma 4y
Leader Digital Transformation & Cloud Security
2GB
Like · Reply
See more comments
Is Running Count(*) The Only Active Everywhere REST API to scale up/d
Expensive on Cassandra? Database for Hybrid Cloud. the Autonomous Data
Feb 4, 2020 Apr 8, 2019 Jul 16, 2018
See all
Others also viewed
Oracle Fusion Cloud to Data Warehouse-Exporting large volume of data out of
Oracle Cloud using BI Cloud Connector
Prateek Parasar · 3y
Use Data Pump on OCI Cloud Console to Move Data Between Autonomous
Databases
Kurt Liu · 8mo
How to Sync AWS S3 Buckets with Local Folders Let see the steps below
AMIT KUMAR · 1y
How to import data to Oracle Autonomous database using SQL developer (data
pump)
Bilegt Bat-Ochir · 4y
5 Disruptive Fintech Initiatives in Pakistan
Future Fest · 1mo
Explore topics
Marketing
Public Administration
Healthcare
Engineering
IT Services
Sustainability
Business Administration
See All
© 2023 About
Language