Setting up Google Drive Backup Issues
I'm trying to follow this guide for setting up my Google Drive as a remote location for my WHM Backup tool. I was able to create the Google Drive API credentials just fine, and everything there seems good.
Now I'm trying to follow the section for "Create a Google Drive transport" where I would setup Google Drive as my remote location to transfer the backups. Step 8 of the documentation says:
Click Generate Credentials to generate the credentials file. A new tab will appear that allows you to authorize access to your Google Drive data.
However, when I click that button I get a message that says:
You have already generated credentials for this transport. You do not need to do so again.
It does not show many any tab or give me any sort of a Google authentication that I would expect here, and then of course the validation fails.
I have never gone through this process before, so I'm not sure why it's telling me I've already generated the credentials. Any information about how to get this resolved would be greatly appreciated.
Thanks!
-
Hi @angelleye If you run the following via SSH what is the output? grep -r google /var/cpanel/backups/
0 -
@cPanelLauren, I get "nothing" as the result. It just falls to the next line in the terminal ready for me to make a new command. 0 -
Hi @angelleye If you did have something set up already I would expect an output - I definitely get a return on my server. Could you open a ticket using the link in my signature so that we can take a closer look? We won't be able to set it up for you but we'd at least be able to test the configuration of the google backup drive and ensure there isn't some cached data from a previous attempt. Once the ticket is open please update this thread with the ticket ID as well. Thanks! 0 -
Yeah, this is the very first time I've ever set this up, so I was indeed confused when it was telling me it was already setup. Are you wanting me to post as a feature request? 0 -
Hi @angelleye No, I want you to open a support request, you can do this by clicking the Submit A Support Ticket link in my signature, open the ticket then let us know here what the ticket ID is so we can track it. Thanks! 0 -
Okay, thanks. I was about to create the ticket but it tells me I should submit a ticket with my hosting provider first, so I'll do that and if they can't help I'll complete the ticket. I'll update this thread either way. Thanks. 0 -
Hi @angelleye That sounds like a plan! Just let us know here if you do end up opening a ticket with us or if your provider is able to help you resolve the issue. Thanks! 0 -
Ugh, I didn't realize my browser pop-up blocker was blocking the Google Authentication window. That was the only problem. Once I unblocked that I was able to approve and now things seem to be hooked up properly. 0 -
Hi @angelleye Oh no! I'm glad you found the issue though! Thanks for updating here as well so it can potentially help others in the same situation. Thanks! 0 -
Hi @angelleye If you run the following via SSH what is the output?
grep -r google /var/cpanel/backups/
I'm getting a permission denied... Can you please help?0 -
HI @Joshua Trimm At what point are you getting this error message? Can you give me the steps you're taking exactly? Thanks! 0 -
hay... Thanks for information... 0 -
Hello, I'm having a similar issue here with trying to set up Google Drive for backups. I follow all the steps and then I click the 'Save Configuration' button and then next I click 'Validate All Destinations'. This is where the error comes in. Error: Validation for transport "gdrive" failed: Could not create path directory "/backup/": Cache file /var/cpanel/backups/"xxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com".yml not found. See GETTING STARTED in the docs for how to get started. at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/OAuth/Cmdline.pm line 191 Is this not correct? i.imgur.com/yWCrh1C.png 0 -
Hi @jp4mc Can you confirm you added the clientID and ClientSecret then went through the steps necessary after Generate Credentials? Thanks! 0 -
Hi @jp4mc Can you confirm you added the clientID and ClientSecret then went through the steps necessary after Generate Credentials? Thanks!
Yes, I can confirm that and I get this: "You have already generated credentials for this transport. You do not need to do so again." What am I missing?0 -
Hi @jp4mc Where most find tricky is when you click "generate credentials" you should be directed to Google to complete the authentication process but that window is sometimes blocked by a pop-up blocker, in this case, though it sounds like you may have already done that. Can you tell me if the yml file for Google is indeed located at /var/cpanel/backups/? Thanks! 0 -
Hi @jp4mc Where most find tricky is when you click "generate credentials" you should be directed to Google to complete the authentication process but that window is sometimes blocked by a pop-up blocker, in this case, though it sounds like you may have already done that. Can you tell me if the yml file for Google is indeed located at /var/cpanel/backups/? Thanks!
I'm logged in now and I do not see it there.0 -
Hi @jp4mc If they were originally generated successfully it would be there. Can you recreate the backup location and follow the instructions here verbatim How to Set Up the Google Drive API - cPanel Knowledge Base - cPanel Documentation they are correct I've just reconfirmed this. Please let me know if there's any point which you're not able to complete. Thanks! 0 -
Ok, now I'm getting an error generating credentials. [BTW: Google Chrome has a pop blocker of it's own to watch for!] Error: invalid_client The OAuth client was not found. 0 -
Hi @jp4mc It sounds like you didn't create the oauth credentials. You did this whole section? 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!0 -
Hi @jp4mc It sounds like you didn't create the oauth credentials. You did this whole section?
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.0 -
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!0 -
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! 0 -
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 :)0 -
Here you go Lauren: 10171321 0 -
Hi @jp4mc Awesome, I'm watching that ticket and I'll update here when I have any new information. Thanks! 0 -
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 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! 0 -
I followed the 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 :)0 -
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. 0
Please sign in to leave a comment.
Comments
31 comments