Gdrive 403 rate limit exceeded

When i try to backup on my google drive, mostly i getting these errors: rclone: 2021/05/08 16:57:47 ERROR : locks/660032244f60c6cec488ecf70a8ca7b0fbd46445a9cd5b93debd8b7e943eade6: Post request put error: googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded

Why? Sometimes i dont get these after few retries.
Is there a workaround?

So i can forget restic for backups?

If your storage backend for the repository limits the requests you make you should perhaps consider using another storage. Why use something that limits you, for one of the most important pieces of your infrastructure (your backups).

I have no idea what plan you are on with Google, I would presume that if you are a paying customer you are eligible for a reasonable amount of requests and should not hit a limit like this. But I don’t use Google services and don’t know their pricing.

That said, you could try using the --limit-upload option to the backup command in restic (there’s also a --limit-download option), to see if that helps. It would presumably effectively limit the number of requests per time period.

Tons of people use restic for backups, so I would say “no” to your last question.

There is no other storage that have unlimited space, for just 10 euros :frowning:
BTW there is no problem with rclone alone, only with restic. Few days ago i’ve just backed up 370 gbytes to the same storage with rclone sync.

That’s a low price for as much storage as you’d like, yeah. As long as it’s actually accessible :wink:

It looks like rclone actively rate limits with Google Drive, so that is probably why you haven’t had the problem there. Restic doesn’t do this, it expects that it is free to perform :slight_smile:

What you could do is try to use rclone as the backend for restic, that might actually solve the problem. You’d configure rclone as usual, then reference those remotes as per the previously linked documentation. Also see here for the rclone documentation about it.

today i’ve tried with rclone serve restic, with restic, and the backup works. There are 500 errors (no rate limit, just plain 500 errors), with retries, probably exceeding transfer/sec limit of google which is don’t know how much…

But it works. I did not used any extra parameters for rclone serve, just --buffer-size to make rclone use more RAM for caching.

I don’t know why it doesn’t work if restic directly invokes rclone.

OS: W10.
restic version: “restic 0.12.0 compiled with go1.15.8 on windows/amd64”
rclone version: v1.59.0
I’m doing restic backups to the Drive of a free Gmail account, i.e. 15 GB capacity. It has been working for many months. The only thing I’ve had to keep an eye on to date has been how near the 15 GB things are getting (so “forget” snapshots accordingly solves this).

I have this 403 error this morning:

Error 403: Quota exceeded for quota metric ‘Queries’ and limit ‘Queries per minute’ of service ‘drive.googleapis.com’ for consumer ‘project_number:…’.

This is after trying a restic backup overnight as follows (in an elevated command dialog/terminal):

C:\WINDOWS\system32>restic -r "rclone:google-drive-restic-w10:My_Documents" backup --use-fs-snapshot --limit-upload 500 --limit-download 5000 "D:/My Documents"

… the size of all files under “My Documents” is about 5 GB. The name of my Gmail account is “google-drive-restic-w10”, as above.

I’ve never had this error beforehand. So I found this thread. I’m trying to understand the final post here by disconnect5852: “today i’ve tried with rclone serve restic, with restic, and the backup works.”

I’m no expert on rclone.

  1. In terms of the command I would use, instead of the one I show above, could someone explain what I might try?
  2. Are there any restic-native or rclone-native options or switches which might prevent the occurrence of this particular complaint, “Quota exceeded for quota metric ‘Queries’ and limit ‘Queries per minute’”, i.e. some way to restrict the frequency of these requests?