OCI CLI create_backup_from_onprem script error

oci cli commands examples
oci compute instance list
oracle cloud shell
oci tools
oci-cli rpm
oci api
oci console
which service is not supported by oracle cloud infrastructure cli?

I am an encountered an issue while creating database backup using create_backup_from_onprem script in OCI CLI. i noticed that object storage namespace is not correct while executing backup script.

[oracle@oracledev oci-cli-scripts]$ ./create_backup_from_onprem --config-file /home/oracle/.oci/config --display-name testimport01 --availability-domain $AD --edition STANDARD_EDITION --opc-installer-dir /home/oracle/migrate --tmp-dir /home/oracle/migrate/onprem_upload --compartment-id $C --rman-password *****

oci._vendor.requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://swiftobjectstorage.ap-mumbai-1.oraclecloud.com/v1/dbbackupbom/iF0ydees7V0yWxyuAYtF/parameter.log

and parameter.log

Either the bucket named 'iF0ydees7V0yWxyuAYtF' does not exist in the namespace 'dbbackupbom' or you are not authorized to access it

My correct namespace is bmnoo8fd7ute

[oracle@oracledev oci-cli-scripts]$ oci os ns get
"data": "bmnoo8fd7ute"

Not sure how to correct object storage namespace in CLI. could you please any help me on this?

Adding cross reference to GitHub issue in OCI CLI in case the OCI database team can answer -- https://github.com/oracle/oci-cli/issues/201.

oracle/oci-cli, i noticed object storage namespace is not correct while executing backup script. Getting error while running create_backup_from_onprem. oci. key_file= -> the location of the certificate you created when you initially configured OCI CLI. Usually, this directory does not change. Reminder of OCI CLI setup instructions located within here. tenancy= -> the OCID of the tenancy you are accessing. region= -> the OCI region of the tenancy you are accessing.

You have to change the tenant ocid in oci config file, for which the default location is ~/.oci/config. You might do it manually or using the oci setup config command. You can overwrite the current values, or you can create a new profile, which you can refer to in oci calls. For more information please see the CLI config file doc.

In case the oci config file is already contains the correct value, you need to reinstall the oci_install specifying the right tenant ocid for -tOCID. (in this case OCID of bmnoo8fd7ute)

java -jar oci_install.jar -host swiftobjectstorage.ap-mumbai-1.oraclecloud.com -pvtKeyFile oci_private_key -pubFingerPrint oci_public_fingerprint -uOCID user_ocid -tOCID tenancy_ocid -walletDir /wallet_directory -libDir /library_directory

Update: As the dbbackupbom is an internal resource ID, you can't change that with the reinstallation of oci_install. Rather this should be an authorization issue. Please check if you have the right policies in place. If not, create a policy like this: Name of the policy: ObjectStorageAccess Add below statements: Allow group ObjectAdmins to manage buckets in tenancy Allow group ObjectAdmins to manage objects in tenancy

Finally add your user to ObjectAdmins, or use a different group which you are already part of.

create_backup_from_onprem error "IOError: [Errno , [OCI]:Migration On-premise DB To OCI Using Backup Python script "​create_backup_from_onprem" failing with below errors File "/home/oracle/​migrate/lib/oracle-cli/lib/python2.7/site-packages/click/core.py", line 722,  oci_cli_key.pem oci_installer opc_installer.zip readme.txt oci_cli_key_public.pem opc_installer opc_install.jar As root, install the CLI using the following command, but first, remember to use python 3 if on an OL6 system :

Finally I got found correct answer and resolution for this issue.

Cause: Error occurred due to newly launched region having some internal bug. i used Mumbai region which was recently launched.

Resolution : Choose another stable region. Ashburn region works for me.

bash -c "$(curl -L, Bash script to install the Oracle Cloud Infrastructure CLI # Example "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" # # Use e.g. to run dbaas script 'create_backup_from_onprem', users need to install echo "$usage" exit 0 ;; *) # unknown option echo "Failed to run install script. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. “No such file or directory” when installing OCI

Getting started with the OCI Command Line Interface (CLI), The OCI Command Line Interface (CLI) is a toolkit developed in Python that is Mac, and Windows, making it easy to write BASH or PowerShell scripts that NOTE: If 'Service limit' error is displayed choose a different shape such as VM. One of the customer's requests is a script to start and stop instances in OCI. To accomplish this OCI-CLI could be used to provide this automation. To demonstrate how this works I build a simple environment as the image below. Two Virtual Machines to test script and one to install OCI-CLI. OCI-CLI could be installed on Windows, Linux or MAC.

Easy Database Migration to Oracle Cloud Infrastructure OCI by , drwxr-xr-x 2 oracle oinstall 39 Nov 1 09:34 oci-cli-scripts. -rw------- 1 create_backup_from_onprem --config-file /home/oracle/.oci/config --display-​name testimport01 --availability-domain $AD --edition CLI Error Messages. Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud. Note This topic is not applicable to Exadata DB systems.. You can migrate an on-premises database to Oracle Cloud Infrastructure by creating a backup of your on-premises database in Oracle Cloud Infrastructure 's Database service.

[PDF] Hitachi Solution for Databases using Oracle Cloud , CLI script “create_backup_from_onprem” fails with the following error as shown in Figure 3. oci.exceptions.ServiceError: {'status': 401, 'message':  If you wish to replace this with the tab completion script included in this version of the CLI, please remove any lines containing 'OciTabExpansion.ps1' from {profile_file_path} and then run 'oci setup autocomplete'"