Setting up Google Drive Backup Issues

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hi @jp4mc


It sounds like you didn't create the oauth credentials. You did this whole section?

Code:
Create your account credentials
To set up your account credentials for backups, perform the following steps:

In the side navigation bar, click Credentials.

Click Create credentials.

Note:

If you already possess Google Drive account credentials, click Create credentials and then click Help me choose.

From the Which API are you using? menu, select Google Drive API.
From the Where will you be calling the API from? menu, select Web Server.
From the What data will you be accessing? menu, select User Data.
Click What credentials do I need?.
In the Create an OAuth 2.0 client ID. text box, enter your desired name.
In the Authorized redirect URIs text box, enter the https://hostname:2087/googledriveauth/callback link, where hostname represents your server's hostname.

Note:

To locate your server's hostname, perform either of the following actions:

Run the hostname command as the root user.
Navigate to WHM's Change Hostname interface (WHM >> Home >> Networking Setup >> Change Hostname). The server's hostname appear's under the Current Hostname heading.
Click Create. The interface will display your new client ID and client secret.

We strongly recommend that you save these credentials in a secure location. Step 7 of the Create a Google Drive transport procedure requires these credentials.

You can also download a JSON file with your client ID and client secret, or access them in the Credentials section.

Click Done.
If you did and you're sure you've generated this on the Google side of things please go ahead and open a ticket using the link in my signature so that we can take a closer look. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

jp4mc

Member
Aug 22, 2018
11
4
3
Birmingham, AL USA
cPanel Access Level
Root Administrator
Hi @jp4mc


It sounds like you didn't create the oauth credentials. You did this whole section?

Code:
Create your account credentials
To set up your account credentials for backups, perform the following steps:

In the side navigation bar, click Credentials.

Click Create credentials.

Note:

If you already possess Google Drive account credentials, click Create credentials and then click Help me choose.

From the Which API are you using? menu, select Google Drive API.
From the Where will you be calling the API from? menu, select Web Server.
From the What data will you be accessing? menu, select User Data.
Click What credentials do I need?.
In the Create an OAuth 2.0 client ID. text box, enter your desired name.
In the Authorized redirect URIs text box, enter the https://hostname:2087/googledriveauth/callback link, where hostname represents your server's hostname.

Note:

To locate your server's hostname, perform either of the following actions:

Run the hostname command as the root user.
Navigate to WHM's Change Hostname interface (WHM >> Home >> Networking Setup >> Change Hostname). The server's hostname appear's under the Current Hostname heading.
Click Create. The interface will display your new client ID and client secret.

We strongly recommend that you save these credentials in a secure location. Step 7 of the Create a Google Drive transport procedure requires these credentials.

You can also download a JSON file with your client ID and client secret, or access them in the Credentials section.

Click Done.
If you did and you're sure you've generated this on the Google side of things please go ahead and open a ticket using the link in my signature so that we can take a closer look. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!

I did. That's what's so weird. Opening ticket now.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
I did. That's what's so weird. Opening ticket now.
I agree - do you by chance have multiple projects on the google side? The one thing that is so difficult for us to troubleshoot these configuration issues is that we can't access your google drive account so we can't check the configuration there. What we can do is check our side and make sure it's not something cPanel is doing. Once you get the ticket open I'll watch it and update here with the outcome.
Thanks!
 

jp4mc

Member
Aug 22, 2018
11
4
3
Birmingham, AL USA
cPanel Access Level
Root Administrator
There was only one other so am hoping that didn't have anything to do with this. I'm on my own today at work in my department so am trying to get the ticket in as well as all this other going on too. :) My timing is impeccable as usual!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
There was only one other so am hoping that didn't have anything to do with this. I'm on my own today at work in my department so am trying to get the ticket in as well as all this other going on too. :) My timing is impeccable as usual!
No worries! There's always folks working the tickets day or night so whenever you're able to will be fine :)
 

jp4mc

Member
Aug 22, 2018
11
4
3
Birmingham, AL USA
cPanel Access Level
Root Administrator
Ok, got it configured finally. I'll update the ticket in the morning but for anyone who may be having issues setting this up, I went back and started over. From scratch.

I followed the instructions to the letter and when it came to entering the ClientID and Client Secret...do not, I repeat, do not use the quotation marks [""] as this will cause the authorization to fail.

Also make sure that your popup blocker is disabled or is set to allow them for this exercise. If you are using Google Chrome, it too has a builtin popup blocker so watch for the little icon in the far right of the address bar. It's easy to miss. Firefox never gave me any issues with that part.

My biggest mistake in all this was the quotation marks and missing the popup icon in Chrome while I was at work.

Kudos to cPanelLauren though for her patience and knowledge!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
I followed the instructions to the letter and when it came to entering the ClientID and Client Secret...do not, I repeat, do not use the quotation marks [""] as this will cause the authorization to fail.
I am so glad you noted this in the ticket as soon as I saw that this morning I had figured out exactly what was going on, I jumped over to this thread to let you know but was really glad you found it too! That popup is tricky too, that's one of the most common things we run into with this setup. The unfortunate part is some of this is out of our control because it happens on the google side of things.

We've opened cases previously with our developers to see if there's anything they can do about the popup blockers but because it's google side of things we're kinda stuck.

Kudos to cPanelLauren though for her patience and knowledge!
You're most welcome, I'm just really happy you were able to find the issue and you've got it set up and working :)
 

jp4mc

Member
Aug 22, 2018
11
4
3
Birmingham, AL USA
cPanel Access Level
Root Administrator
As a followup to this, I found that when you give a name to the folder in Google Drive as the place to store your backups, don't bother creating it ahead of time. When WHM runs the backup cron and sends them to Drive, it creates a new folder by that name anyway.
 

Attachments

angelleye

Active Member
Nov 25, 2011
39
3
58
Kansas City, MO
cPanel Access Level
Root Administrator
Twitter
I got stuck here again trying to set this up on a new server since the docs are outdated.

From the Google Cloud APIs & Services -> Oauth consent screen page, you can "publish" your app so that it moves to production mode instead of testing. Only after I did that would this work.
 
  • Like
Reactions: cPRex