OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: genesysguy on May 30, 2022, 01:35:12 AM

Title: Google Backups failing
Post by: genesysguy on May 30, 2022, 01:35:12 AM
I'm probably the only one that uses this, but backups to Google drive started failing for me recently.
Has been working for a long time, not sure if something changed on Google's end or what.

Error message:

[29-May-2022 01:00:01 America/New_York] PHP Fatal error:  Uncaught Google_Service_Exception: {
"error": {
  "errors": [
   {
    "domain": "global",
    "reason": "wrongUrlForUpload",
    "message": "Uploads must be sent to the upload URL. Re-send this request to https://www.googleapis.com/upload/drive/v3/files?uploadType=media"
   }
  ],
  "code": 400,
  "message": "Uploads must be sent to the upload URL. Re-send this request to https://www.googleapis.com/upload/drive/v3/files?uploadType=media"
}
}
in /usr/local/share/google-api-php-client/src/Google/Http/REST.php:118
Stack trace:
#0 /usr/local/share/google-api-php-client/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#1 /usr/local/share/google-api-php-client/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#2 /usr/local/share/google-api-php-client/src/Google/Http/REST.php(58): Google_Task_Runner->run()
#3 /usr/l in /usr/local/share/google-api-php-client/src/Google/Http/REST.php on line 118
Title: Re: Google Backups failing
Post by: Greelan on May 30, 2022, 05:42:26 AM
Can't comment on the error you are seeing but I can confirm that it is still working at my end. I just ran a manual backup and it successfully uploaded and deleted the oldest.
Title: Re: Google Backups failing
Post by: BlueHatDinuX on May 30, 2022, 06:00:25 AM
Quote from: genesysguy on May 30, 2022, 01:35:12 AM
I'm probably the only one that uses this, but backups to Google drive started failing for me recently.
Has been working for a long time, not sure if something changed on Google's end or what.

Error message:

[29-May-2022 01:00:01 America/New_York] PHP Fatal error:  Uncaught Google_Service_Exception: {
"error": {
  "errors": [
   {
    "domain": "global",
    "reason": "wrongUrlForUpload",
    "message": "Uploads must be sent to the upload URL. Re-send this request to https://www.googleapis.com/upload/drive/v3/files?uploadType=media"
   }
  ],
  "code": 400,
  "message": "Uploads must be sent to the upload URL. Re-send this request to https://www.googleapis.com/upload/drive/v3/files?uploadType=media"
}
}
in /usr/local/share/google-api-php-client/src/Google/Http/REST.php:118
Stack trace:
#0 /usr/local/share/google-api-php-client/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#1 /usr/local/share/google-api-php-client/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#2 /usr/local/share/google-api-php-client/src/Google/Http/REST.php(58): Google_Task_Runner->run()
#3 /usr/l in /usr/local/share/google-api-php-client/src/Google/Http/REST.php on line 118

Hi, I had the same issue yesterday.
I managed to solve it by provide a "password" for encryption backup. I didn't provide a password previously and working fine all the while until it failed on yesterday.

Hope this help.
Title: Re: Google Backups failing
Post by: genesysguy on May 31, 2022, 06:40:10 PM
Thanks for that.  I went into Google Cloud Console at https://console.cloud.google.com/iam-admin and grabbed one of the service account passwords I had setup for this and re-entered it.  That resolved the issue.

I wonder what happened on 5/25, which was the last successful backup.  Perhaps when I updated to OPNsense 22.1.8_1.

Either way, thanks for the idea!
Title: Re: Google Backups failing
Post by: sammycda on June 03, 2022, 05:01:17 AM
I'm having the same issue here. I can backup to Google Drive from the settings part of the web interface but the daily, 1:00 am backups have stopped. I'm also running the business edition.

My last backup was 5/31
Title: Re: Google Backups failing
Post by: Greelan on June 03, 2022, 05:07:46 AM
Ofc daily backups only run if the OPNsense config has been changed since the last backup.
Title: Re: Google Backups failing
Post by: Alives on June 20, 2022, 06:24:19 PM
Confirmed, same exact issue.  Adding any password fixes it.