This approach allows you copy files from your Oracle PaaS or IaaS machines to object storage or vice versa. It is useful for backing up or restoring whatever stuff which is not backed up by the PaaS tools.

Install  swiftclient

sudo yum install python-setuptools
sudo easy_install pip
sudo pip install --upgrade setuptools
sudo pip install python-swiftclient

Issues with pip on Linux? follow this link

Set environment variables

Locate your Auth V1 Endpoint in the details page of your Oracle Cloud Infrastructure Object Storage Classic Service

export ST_USER=Storage-<identitydomaingoeshere>:<usergoeshere>

export ST_AUTH=https://<identitydomaingoeshere>.storage.oraclecloud.com/auth/v1.0

export ST_KEY=<userpasswordgoeshere>

Execute commands

$ swift stat

$ swift stat PRUEBAS

$ echo "hola mundo" > holamundo.txt

$ swift upload PRUEBAS holamundo.txt

$ swift list PRUEBAS

holamundo.txt

Help resources

Blog entry for Solaris

swiftclient on github

Enjoy 😉

Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.