cPanel

How to Configure Google Drive as a Backup Additional Destination


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

  • Create a Google account.
  • Create a Google Console project.
  • Enable 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:

  1. Navigate to the Google API Manager website.
  2. In the left side navigation bar, click Credentials.
  3. Click Create credentials.
  4. Click Help me choose.
  5. From the Which API are you using? menu, select Google Drive API.
  6. From the What data will you be accessing? menu, select User Data.
    Note:
    The steps beyond this point may vary if you have already signed up or have authorized this API.
  7. In the App Information section, enter the information for App Name and User Support Email.
  8. In the Developer Information section, enter the email address for the developer.
    Note:

    The Set up OAuth consent screen may appear. Google allows users to complete the form after they set up the OAuth consent screen.

  9. The fields in the Scopes section are optional.
  10. In the OAuth Client ID. menu, select Web application as the Application Type you plan to use.
    Note:
    There may be additional fields to fill out based on the application you have chosen.
  11. In the Authorized URLs 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
  12. Click Create. The Credentials interface will appear.
  13. Click the edit icon for the newly-created credentials. A credentials details interface will appear with your client ID and client secret.
  14. 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.

To set up an OAuth consent screen, perform the following steps:

  1. Click APIs & Services.
  2. Click OAuth consent screen. The Oauth consent screen configuration interface will appear.
  3. Under Test Users, click Add Users. A sidebar will appear.
  4. Enter the email addresses from steps 7 and 8 from the previous procedure.
  5. Click Save.
    Note:
    After you validate the backup destination, you can go back to this interface and click Publish to publish the application.
  6. Set Google’s Queries per 100 seconds per user setting to 10000. For more information, read Google’s Limits and Quotas on API Requests documentation.

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:

  1. Log in to WHM as a root-enabled user.
  2. Navigate to WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration) and scroll to the Additional Destinations section.
  3. From the Destination Type menu, select Google Drive™.
  4. Click Create new destination.
  5. In the Destination Name text box, enter a display name for this backup destination.
  6. In the Folder text box, enter the desired folder in which to store backups.
    Note:
    If you do not specify a folder, the system will store backups in the top-level folder.
  7. Enter your Client ID and Client secret.
  8. Click Generate Credentials to create the credentials file. A new tab will appear that allows you to authorize access to your Google Drive data.
  9. Follow Google’s directions to authorize access to your Google Drive.
  10. When the message Credentials successfully generated appears, close that browser tab to return to the tab with the WHM interface.
  11. In the Timeout text box, enter the desired timeout duration. This value defaults to 30 seconds.
  12. Click 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.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *