How to Configure Google Drive as a Backup Additional Destination

This element (ia-generated) isn't supported, or may require an update to be displayed. You can try to refresh the app.

Overview

This document explains how to set up your Google Drive account as an Additional Destination in WHM’s  Backup Configuration  interface (WHM » Home » Backup » Backup Configuration).

Prerequisites

Before you can use Google Drive as a backup destination, you must perform the following steps:
    .1Create a  Google account .
    .2Create a  Google Console project .
    .3Enable the  Google Drive API  from the  Google Console .

Create your account credentials

To set up Google Drive account credentials for backups, perform the following steps:
    .1Navigate to the  Google API Manager  website.
    .2In the left side navigation bar, click Credentials.
    .3Click Create credentials.
    .4Click Help me choose.

Credential Type

In the Credential Type section, perform the following steps:
    .1In the Which API are you using? menu, select Google Drive API.
    .2In the What data will you be accessing? menu, select User Data.
    .3Click NEXT.

OAuth Consent Screen

If this is the first time you have authorized this API, the OAuth Consent Screen section will appear. Perform the following steps:
    .1In the App Information section, enter the information for App Name and select the User Support Email.
    .2In the Developer contact information section, enter your email address.
    .3Click SAVE AND CONTINUE.

Scopes

In the Scopes section, perform the following steps:
    .1Click ADD OR REMOVE SCOPES if you wish to update the scopes for the app. This step is optional.
    .2Click SAVE AND CONTINUE.

OAuth Client ID

In the OAuth Client ID section, perform the following steps:
    .1In the OAuth Client ID menu, select Web application as the Application type you plan to use.
    .2Enter a name for the application in the Name field.
    .3In the Authorized redirect URIs field, add an entry for each server performing backups to this location, where HOSTNAME represents the hostname of a server:
https://HOSTNAME:2087/googledriveauth/callback
    .4Click CREATE. The Your Credentials section will appear.
    .5Click DOWNLOAD to download the newly-created credentials.
NoteYou can also access the credentials in the Credentials interface.
    .6Click DONE.
Copy the client ID and client secret and save them to a secure location. Step 7 of the  Create a Google Drive transport  procedure requires these credentials.

Set up your OAuth consent screen

To set up an OAuth consent screen, perform the following steps:
    .1In the lefthand menu, click OAuth consent screen. A configuration interface will appear.
    .2Under Test Users, click ADD USERS. A sidebar will appear.
    .3Enter the email address(es) you added in the initial  OAuth Consent Screen  section.
    .4Click SAVE.

Create a Google Drive transport

Warning
While you perform these steps, disable any popup blockers in your browser to prevent errors.
To create a Google Drive transport, perform the following steps:
    .1Log in to WHM as a user with root-level privileges.
    .2Navigate to WHM’s  Backup Configuration  interface (WHM » Home » Backup » Backup Configuration) and select the Additional Destinations tab.
    .3In the Destination Type menu, select Google Drive.
    .4Click Create New Destination.
    .5In the Destination Name text box, enter a display name for this backup destination.
    .6In the Folder text box, enter the desired folder in which to store backups.
NoteIf you do not specify a folder, the system will store backups in the top-level folder.
    .7Enter your Client ID and Client secret.
    .8Click Generate Credentials to create the credentials file. A new tab will appear that allows you to authorize access to your Google Drive data.
    .9Follow Google’s directions to authorize access to your Google Drive.
    .10When the message Credentials successfully generated appears, close that browser tab to return to the tab with the WHM interface.
    .11In the Timeout text box, enter the desired timeout duration. This value defaults to 30 seconds.
    .12Click Save Destination.
Note
To validate your remote destination, click Save and Validate Destination.
If you do not authorize access to your Google Drive data, this action will fail.