OCI CLI Installation

Installation Oracle Cloud Infrastructure Command Line Interface

OCI - CLI

sudo yum install python36-oci-cli
pip install cryptography==3.2.1
oci -version

Starte Setup

oci setup config

Eingaben:

Enter a location for your config [/home/oracle/.oci/config]:
Enter a user OCID: **ocid1.user.oc1..abcedekdpeokpadpoaea**
Enter a tenancy OCID: **ocid1.tenancy.oc1..abcedekdpeokpadpoaea**
Enter a region by index or name(e.g.
1: af-johannesburg-1, 2: ap-chiyoda-1, 3: ap-chuncheon-1, 4: ap-dcc-canberra-1, 5: ap-hyderabad-1,
6: ap-ibaraki-1, 7: ap-melbourne-1, 8: ap-mumbai-1, 9: ap-osaka-1, 10: ap-seoul-1,
11: ap-singapore-1, 12: ap-sydney-1, 13: ap-tokyo-1, 14: ca-montreal-1, 15: ca-toronto-1,
16: eu-amsterdam-1, 17: eu-dcc-milan-1, 18: eu-frankfurt-1, 19: eu-madrid-1, 20: eu-marseille-1,
21: eu-milan-1, 22: eu-paris-1, 23: eu-stockholm-1, 24: eu-zurich-1, 25: il-jerusalem-1,
26: me-abudhabi-1, 27: me-dcc-muscat-1, 28: me-dubai-1, 29: me-jeddah-1, 30: mx-queretaro-1,
31: sa-santiago-1, 32: sa-saopaulo-1, 33: sa-vinhedo-1, 34: uk-cardiff-1, 35: uk-gov-cardiff-1,
36: uk-gov-london-1, 37: uk-london-1, 38: us-ashburn-1, 39: us-gov-ashburn-1, 40: us-gov-chicago-1,
41: us-gov-phoenix-1, 42: us-langley-1, 43: us-luke-1, 44: us-phoenix-1, 45: us-sanjose-1): **18**
Do you want to generate a new API Signing RSA key pair? (If you decline you will be asked to supply the path to an existing key.) [Y/n]: Y
Enter a directory for your keys to be created [/home/oracle/.oci]: **ENTER**
Enter a name for your key [oci_api_key]: **ENTER**
Public key written to: /home/oracle/.oci/oci_api_key_public.pem
Enter a passphrase for your private key (empty for no passphrase):
Private key written to: /home/oracle/.oci/oci_api_key.pem
Fingerprint: 5b:29:7f:.....
Config written to /home/oracle/.oci/config
vi /home/oracle/.oci/oci_api_key_public.pem

kopiere den Inhalt in apisigningkey section der Oracle Cloud

'How to upload the public key': docs.cloud.oracle.com/Content/API/Concepts/..

Dann: Teste ob es funktioniert:

oci os ns get

Lade ein File in den Object Storage:

oci os object put -ns fijdeidje -bn bucketfiles --file /home/oracle/backup/kiadb-24-11-2022/backup.zip

Was bringt es? Z.b. Kann ich nun meine lokalen Backups via cronjob in den Object Store laden.