Introduction:
There is a new option introduced in cPanel backup section to set up our server backup remotely on Google Drive. This feature is available from version 66 and later. So you need to make sure that your server has the latest version of cPanel software.
The procedure of configuring Google Drive for your cPanel Account using WHM Backup may broadly be enumerated under 3 subheadings:
- Setting up the Google Drive API for your Google Account
- Creating your account credentials
- Creating a Google Drive Transport
Setting up the Google Drive API for your Google Account:
- Go to the Google API Manager website.
- Click Library in the navigation menu.
- Click Drive API under Google Apps APIs.
- Click Create Project then click Create. A new menu will appear.
In case the menu does not display, the following steps need to be performed, before proceeding to Step 5:
- Click Credentials in the left navigation bar.
- Click Create.
- Enter your new project name and click Create.
- Click Enable.
Create your account credentials
To set up your account credentials for backups, perform the following steps:
- Click Credentials in the side navigation bar.
- Click Create credentials.
If Google Drive account credentials have already been created, click Create credentials and then click Help me choose.
- Select Google Drive API from the Which API are you using? Menu.
- Select Web Server from the Where will you be calling the API from? Menu.
- Select User Data from the What data will you be accessing? Menu.
- Click What credentials do I need?
- Enter a name of your choice In the Create an OAuth 2.0 client ID. text box.
- In the Authorized redirect URIs text box, enter the https://hostname:2087/googledriveauth/callback link, where host name means server’s host name.
- Click Create. The interface will display your new client ID and client secret.
- Click Done.
Creating a Google Drive Transport
To create a Google Drive transport, perform the following steps:
- Log in to WHM as a root-enabled user.
- Navigate to WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration) and scroll to the Additional Destinations section.
- Select Google Drive from the Destination Type menu.
- Click Create new destination.
- Enter a destination name of your choice.
- Enter the folder for storing backups.
- Enter your client ID and client secret.
- Click Generate Credentials to generate the credentials file. A new tab will open to allow you to authorize access to your Google Drive data.
- In the Timeout text box, enter the desired timeout duration.
- Click Save Destination.
To validate your remote destination, click Save and Validate Destination.