Monday, August 1, 2022

How to install OCI CLI in windows and push backup to object storage

 How to install OCI CLI in windows and push backup to object storage

Documentation link :

OCI provides CLI to mange your cloud account. You can do almost all the task which you are doing using console can be done using CLI.

Here, we are going to install CLI on a windows 2019 server and push the backup files to Object Storage.

Login to your windows VM

Right click on “Windows PowerShell” and open as administrator.

Issue the following commands

Set-ExecutionPolicy RemoteSigned

Invoke-WebRequest -OutFile install.ps1

iex ((New-Object System.Net.WebClient).DownloadString(''))

This will install Python automatically. OCI CLI is build on Python

Now you can see the oci cli installation is good. 

# oci --version will return the cli version.

Next step is to setup the cli configuration. We need to authorise the configuration to perform actions. This is based on the user permissions.

# oci setup config

Enter the location of your config [C:\Users\opc\.config] :

Enter user OCID : 


Tenancy OCID :

Chose your DC Region :

Do you want to generate API key : Y

Enter directory for your keys to created [C:\Users\opc\.oci]

Enter a name for your key [oci_api_key] :

Passphrase :

Now we need to upload your public key

After this step, you should able to interact with your oracle cloud account using oci cli.

For testing, issue this command

# oci os ns get ( This will return back the namespace of our account)

This means we are good !

How to copy backup files from this windows VM to object storage.

# oci os object put [options]

-bn = bucket name
--file = filename

# oci os object put -bn my-upload-bucket --file mssql-july31.sql

In this example, the backup file is mssql-july31.sql and this should be in the path or you need to add the full path and the bucket name is my-upload-bucket.

Tuesday, June 28, 2022

NFS command to start when server boots up

 OS is Ubuntu20.

I tried to find /etc/rc.local and /etc/rc.d/rc.local but didn't find any.

So i edited crontab -e

@reboot sudo mount

Restart crond

It works

Wednesday, June 22, 2022

How to create Oracle Cloud FREE Trial Account

 How to create Oracle Cloud FREE Trial Account 

Here is the step by step process.

Open a browser and hit ORACLE CLOUD

You will be presented with a registration page.

Input the above details.

Once you have entered a valid email address, select the Verify my email button.

Go to your email. You will see an account validation email from Oracle in your inbox. The email will be similar to the following


Select the link (if possible) or copy and paste the link into your browser.

Enter the following information to create your Oracle Cloud Free Tier account.

Choose a Password
Enter your Company Name

Your Cloud Account Name will generate automatically based on your inputs. You can change that name by entering a new value. Remember what you wrote. You'll need this name later to sign in.

Choose a Home Region. Your Home Region cannot be changed once you sign-up. Note: Based on the current design of the workshop and resource availability, it is

recommended not to use the London region for this workshop at this time. Click Continue 

Enter your Address information. Click Continue.

Choose your country and enter a mobile number for verification. Click the Text me a code button.

Once you receive your code, enter it and click Verify My Code.

Click the Add payment verification method button.

Choose the verification method. In this case, click the Credit Card button. Enter your information and payment details.

Note: This is a free credit promotion account. You will not be charged unless you elect to upgrade the account. 

Once your payment verification is complete, review and accept the agreement by clicking the check box. Click the Start my free trial button.

Your account is provisioning and should be available soon! You might want to log out as you wait for your account to be provisioned. You'll receive two emails from Oracle. One email will be the initial notification that provisioning is underway. The other email will be a notification that provisioning is complete. Here is a copy of the final notification:






Wednesday, June 15, 2022

How to setup OCI load balancer

 How to setup OCI load balancer

Here we have 2 webservers. In front of this webservers we will have this OCI LB. Configuration of LB is Weighted Round Robin.

Domain or IP : 1

Domain or IP : 2

Login to your to your OCI dashboard. Under Netowking, Load balancer, Create a LB

Now access your LB IP. Each request will go to each web server.