Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Multipart Upload on OCI Bucket / Object Storage using OCI-CLI in Windows or Linux

Rumi, May 10, 2023May 10, 2023

Oracle OCI-CLI requires Python packages v 3.6 or higher. During installation it is auto installed on windows server/OS, however on Linux, there might be preinstalled Python package installed, that might need to be updated manually before running the installer. (In few cases, the installation failed and the package needed to be be updated seperately)

Installation on Linux

bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"

For CentOS-7 few additional steops might needed-

sudo yum groupinstall 'Development Tools'
sudo yum install centos-release-scl
sudo yum install rh-python36
scl enable rh-python36 bash
yum -y install python-pip

afterwards, run the installer command mentioned above.

Installation on Windows

powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))"

The instllation is pretty straight forward. Once installed, check the software versioning-

python --version
oci --version

Configuring OCI-CLI setup:

Run the following command:

oci setup config

It will prompt for several inputs to deliver-

  1. User OCID. You can find the user OCID from your oracle cloud console- profile > user information > OCID
    (sample- ocid1.user.oc1..aaaaaaaagw4ezrtj7wxmosqf3phqhdnv4i4jvhq4r6klz4j4u6w6587hielxa)
  2. Tenancy OCID. You can find it from- Hamburger menu > Governence & Administration > Tenancies > Click and expand tenancy name > Tenancy OCID
    (sample- ocid1.tenancy.oc1..aaaaaaaak2d5y4fmatd37zmetmvczzenxrhx4m6fn5yruiweyihfi6d7ittppb2a)
  3. Your Region to select: In my case it was, ap-mumbai-1
  4. Generate Key pair while the prompt asks, and use N/A while password promts appears.
  5. In my case my key pairs were generated in my windows path like- C:\Users\Rumi\.oci\oci_api_key_public.pem
  6. Open the oci_api_key_public.pem using notepad and copy the texts
  7. Now move to OCI cloud console and go Profile > OCIDProfile or alternatively from Hamburger menu > > Identity > Users > User Details > API Keys > Add API Keys
  8. Select Paste Puiblic Key, and paste the values copied in step 6

Configure your Object Storage

  1. Hamburger > Storage > Bucket > Click 3 dots at right side of your bucket > Select Pre Authenticated Request (PAR) > Select Bucket > Permit Object Reads

Run command in your powershell-

oci os ns get

A following sample reposne (namedspace) will generate

{
"data": "bmaHK;ftwtcdx"
}

Read and Write on bucjet using oci-cli:

Read Bucket Files with Name-size-date modified

oci os object list -bn <your-bucket-name> --query 'data[*].["name", "size", \"time-modified\"]' --output table

Read Bucket in json format:

oci os object list -bn <your-bucket-name>

Upload File to Bucket

oci os object put -bn <your-bucket-name> --file D:\<your-file> -ns "bmaHK;ftwtcdx"

Ref:
https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/usingmultipartuploads.htm
https://github.com/oracle/oci-cli

OCI

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes