1. Home
  2. Docs
  3. DB Backup In Drive
  4. How Does the App Work?
Download PDF

How Does the App Work?

Steps to access google drive api

Step 1:-  Go to Google Developer Console

Step 2:- Then create new project

Step 3:- After that switch to the created project

Step 4:- then enable Google Drive api by clicking on library tab and search for google drive api and click on the api and click enable option.

Step 5:- After enabling the api, you will be redirected to overview of the project.

Step 6:- Then click on the credential tab on the left side of the navigation bar.

Step 7:- Now click on the “configure consent screen” link.

Step 8 :- Now select the user type as External and click on the create button.

Step 9:- Then you will be redirected to oauth consent screen’s second page where you have to fill app name, user support email and developer information email and after filling these fields, click on save and continue button.

Step 10:- Now you will be redirected to scopes page where you have to click on “Add or remove scopes button”.

Step 11:- There will on a slider where you have to select the scopes which are as follows:

  • /auth/drive
  • /auth/drive.file

Then click on update buttonStep 12:- Now click on continue and save button.

Step 13 :- After that again click on continue and save button on test users page.

Step 14:- Now click on the back to dashboard button on the summary page.

Step 15:- You will be redirected to the main page of the oauth consent screen page.

Step 16:- Now click on the publish app link and confirm.

Step 17:- Now Go to the  credentials page and click on create credentials and select oauth client id.

Step 18:- select application type as web application

Step 19:- Now Click on ADD URI button under section “Authorized redirect uri”.

Step 20:- and add  “https://developers.google.com/oauthplayground” uri and click on the create button.

Step 21:- you will get client id and client secret of google drive api.

Step 22:- Now Go to the playground api :-  https://developers.google.com/oauthplayground

Step 23:- click on settings button and make use of your own credentials option checked and enter your client id and client secret you got from step 21.

Step 24:- then select the scopes mentioned in the steps 11 under drive api v3 section. I.e.

And click on authorize apis.

Step 25:- Now an gmail signup form will open. Select your gmail account(same account from where you have created a project in google developer console) and approve and give permission to these apis with your google gmail account.

Step 26:- Now click on “Exchange authorization code for tokens” button in oauth playground page.

Step 27:- Now click on the “Exchange authorization code for tokens” step and get your refresh token.

 Configuration Auto Backup in Odoo  : 

  • Go to the Settings ->Activate the Developer mode.
  • Go to Technical ->Backups->Backup Configuration.
  • Add Host name, database name,port number, backup type,backup directory, refresh token, client id ,client secret  and Gdrive folder id and save it 
  • After configuration of database backup ; Now set the scheduler.
  • Go to Technical ->Automation ->Scheduled Action.
  • Activate the scheduler action of database backup.
  • Set the scheduler time according to requirement 
  • Activate the scheduler 

Download Guide
Was this article helpful to you? Yes No

How can we help?