Oracle Cloud Infrastructure (OCI) Tools for Simple/No-That-Simple Backup/Restore of files in Object Storage


Oracle OCI provides, among other tools, a CLI, see here. OCI CLI download and setup can be found in the documentation or on github

Once you have the tool ready it is very easy to work with it.

TASKS

Create a storage “bucket”:

oci os bucket create --name todaysbackup --compartment-id ocid1.compartment.oc1..aaaaaaaabi3huagfrq3lfmqvwkjoz625otxgrzbqte3et73kro5yqps32aoa

Note: Compartment-id is an internal name you can get from the cloud dashboard user interface as follows:

ocicli01

 

ocicli02

Click the link “Copy” near to the OCID of the compartment name you want to work with.

Upload files to bucket:

oci os object bulk-upload -bn todaysbackup --src-dir .

ocicli03

You have a bunch of options such as overwrite, no overwrite,… See documentation… From here you can build your own custom shell script or even use modern tools such as Terraform, Oracle DevCS and more…

Enjoy 😉

One Comment

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 )

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.