Google Drive Backup Failure

Operating System & Version
CENTOS 7.9 kvm
cPanel & WHM Version
v86.0.38

steveanderson

Registered
Mar 29, 2021
4
1
3
Fort Mill, SC
cPanel Access Level
Website Owner
I noticed my backups are failing now using Google Drive. If I go to the Additional Destinations tab in Backup Configuration and attempt to validate the destination, I get the following error message. I renamed the old directory and tried entering a new directory but no luck.

Error: Validation for transport “WebBackups” failed: Could not create path directory “/WebBackups/”: Token refresh failed at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/OAuth/Cmdline.pm line 83

It appears to be the exact issue that was happening on the following thread, but I didn't see any resolution there. Any suggestions?

 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,810
895
313
cPanel Access Level
Root Administrator
Hey there! When we see this error, it is usually networking issues, but the client in the thread you linked didn't open a ticket with us so I don't have much else to report. Are you seeing similar log entries in the usr/local/cpanel/logs/cpbackup or /usr/local/cpanel/logs/cpbackup_transporter directories? If so, it might be best to get a ticket submitted to our team, and then post the ticket number here so I can follow along.
 

steveanderson

Registered
Mar 29, 2021
4
1
3
Fort Mill, SC
cPanel Access Level
Website Owner
In cpbackup_transporter, I am seeing the same token refresh issue. It has something like this at every attempt to use the Google Drive API. There's not exactly anything useful that I can tell here, so guessing I should start a ticket?

[2021-03-28 02:06:37 -0600] warn [cpbackup_transporter] Path creation failed: Token refresh failed at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/OAuth/Cmdline.pm line 83
at /usr/local/cpanel/Cpanel/LoggerAdapter.pm line 27.
Cpanel::LoggerAdapter::warn(Cpanel::LoggerAdapter=HASH(0x14ad890), "Path creation failed: Token refresh failed at /usr/local/cpa"...) called at /usr/local/cpanel/Cpanel/Backup/Queue.pm line 872
Cpanel::Backup::Queue::transport_backup::_validate_path(Cpanel::Backup::Queue::transport_backup=HASH(0x12af200), Cpanel::Transport::Files::GoogleDrive=HASH(0x235d7e8), "/BlueHostBackup/2021-03-28/accounts/legalrf5.tar.gz", Cpanel::LoggerAdapter=HASH(0x14ad890)) called at /usr/local/cpanel/Cpanel/Backup/Queue.pm line 822
Cpanel::Backup::Queue::transport_backup::validate_path(Cpanel::Backup::Queue::transport_backup=HASH(0x12af200), Cpanel::Transport::Files::GoogleDrive=HASH(0x235d7e8), "/BlueHostBackup/2021-03-28/accounts/legalrf5.tar.gz", Cpanel::LoggerAdapter=HASH(0x14ad890)) called at /usr/local/cpanel/Cpanel/Backup/Queue.pm line 315
Cpanel::Backup::Queue::transport_backup::process_task(Cpanel::Backup::Queue::transport_backup=HASH(0x12af200), Cpanel::TaskQueue::Task=HASH(0x2352e08), Cpanel::LoggerAdapter=HASH(0x14ad890)) called at /usr/local/cpanel/Cpanel/TaskQueue.pm line 635
eval {...} called at /usr/local/cpanel/Cpanel/TaskQueue.pm line 638
Cpanel::TaskQueue::__ANON__() called at /usr/local/cpanel/Cpanel/StateFile.pm line 241
eval {...} called at /usr/local/cpanel/Cpanel/StateFile.pm line 241
Cpanel::StateFile::Guard::call_unlocked(Cpanel::StateFile::Guard=HASH(0x233eca8), CODE(0x20f7b98)) called at /usr/local/cpanel/Cpanel/TaskQueue.pm line 643
Cpanel::TaskQueue::process_next_task(Cpanel::TaskQueue=HASH(0x233ed98)) called at /usr/local/cpanel/bin/cpbackup_transporter line 168
eval {...} called at /usr/local/cpanel/bin/cpbackup_transporter line 166
 

steveanderson

Registered
Mar 29, 2021
4
1
3
Fort Mill, SC
cPanel Access Level
Website Owner
The issue I had with validating the destination was solved by disabling the built-in Chrome popup blocker for my cPanel admin domain. When I did that, attempting to refresh the token passed me off to Google to allow access to the Google Drive API.

The only pending question is why the token became invalid after just a week. I'm waiting to see if this happens again, and if so, I'm going to follow up on my support ticket. A few days in though and everything is working as expected.

Thanks again for your assistance.
 
  • Like
Reactions: cPRex

steveanderson

Registered
Mar 29, 2021
4
1
3
Fort Mill, SC
cPanel Access Level
Website Owner
Coming back to my original question, I was able to get the backups finally working without having to refresh the token every week. Something weird happened when I originally created my Google Cloud API project and it was never properly associated with my Google Workspace account. The issue was that in the OAuth Consent Screen, the User Type was set to External and I was not allowed to set a value of Internal. It was even giving me the message "Because you’re not a Google Workspace user, you can only make your app available to external (general audience) users." I was getting this message even though I had set up the app with my Google Workspace user and that was the only user associated with the project. I ended up recreating the project and in the new one, I was able to set the User Type to Internal. It worked fine after that.