Rclone quota from Google Drive is not correct

What is the problem you are having with rclone?

When uploading a file, error msg : Failed to copy: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
But the quota is far from beinng exceeded (5To available, file = 50Mo). But When I installed Rclone, I was in another plan, I've upgraded plan after.

Run the command 'rclone version' and share the full output of the command.

rclone v1.56.0

  • os/version: debian 10.13 (64 bit)
  • os/kernel: 4.19.0-6-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.5
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Rclone copy xxx.tar.gz Google-drive:/Mydir

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Sorry, command not found and I don't know how to update Rclone...

A log from the command that you were trying to run with the -vv flag

Failed to copy: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded

You can update here:

Install (rclone.org)

but that error seems you are out of storage.

image

You might want to wait to check with Support to see as the error is saying you are out of storage so something isn't lining up.

Update rclone and use the rclone config redected..

I just installed Rclone, so I suppose nothing to update? Or you are speaking about updazting cache or something like that? In this case I don't know how to do it. What is "rclone redected"?

I just updated to latest version, but still same problem...

rclone v1.65.2

  • os/version: debian 10.13 (64 bit)
  • os/kernel: 4.19.0-6-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.6
  • go/linking: static
  • go/tags: none

Is there a cache or something in rclone?
Is it a service, we can restart it?
Where is the config file?

I have no idea how you are setup and if you are using a service or not.

You'd want to run.

rclone config redacted

Ideally, you want to run one file copy and share the full debug log.

rclone copy test.txt Google-drive: -vv

Whatever file you want to test with and share the debug log.

Result:

[Google-drive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
service_account_file = /etc/rclone/service-account-key.json
team_drive =
root_folder_id = XXX

The log:
2024/02/13 18:42:05 DEBUG : 8 go routines active
2024/02/13 18:42:05 DEBUG : rclone: Version "v1.65.2" starting with parameters ["rclone" "copy" "/home/backups/sites/arnaques-internet.13-02-2024.tar.gz" "Google-drive:/Linux/sites/" "-vv"]
2024/02/13 18:42:05 DEBUG : Creating backend with remote "/home/backups/sites/arnaques-internet.13-02-2024.tar.gz"
2024/02/13 18:42:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/02/13 18:42:05 DEBUG : fs cache: adding new entry for parent of "/home/backups/sites/arnaques-internet.13-02-2024.tar.gz", "/home/backups/sites"
2024/02/13 18:42:05 DEBUG : Creating backend with remote "Google-drive:/Linux/sites/"
2024/02/13 18:42:06 DEBUG : fs cache: renaming cache item "Google-drive:/Linux/sites/" to be canonical "Google-drive:Linux/sites"
2024/02/13 18:42:06 DEBUG : arnaques-internet.13-02-2024.tar.gz: Need to transfer - File not found at Destination
2024/02/13 18:42:06 ERROR : arnaques-internet.13-02-2024.tar.gz: Failed to copy: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:06 ERROR : Attempt 1/3 failed with 1 errors and: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:06 DEBUG : arnaques-internet.13-02-2024.tar.gz: Need to transfer - File not found at Destination
2024/02/13 18:42:07 ERROR : arnaques-internet.13-02-2024.tar.gz: Failed to copy: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:07 ERROR : Attempt 2/3 failed with 1 errors and: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:07 DEBUG : arnaques-internet.13-02-2024.tar.gz: Need to transfer - File not found at Destination
2024/02/13 18:42:08 ERROR : arnaques-internet.13-02-2024.tar.gz: Failed to copy: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:08 ERROR : Attempt 3/3 failed with 1 errors and: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded
2024/02/13 18:42:08 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 2.7s

Is it a team drive?

You shouldn't mix a client ID/secret and a service account. Pick one or the other. A service account has it's own client ID for API usage.

Ok, so I just has to remove the line with service account?
No, it isnt a team drive

Possibly as I'm not sure which you'd want to use. Personally, I avoid service accounts as I like the oauth part as if someone snags a service key, they can do a lot but I guess somewhat the same if they snag the actual rclone.conf. Really personal choice, but I would use the client ID/secret only as that's what I've done.

Try to run

rclone about Google-drive:

What does that show?

I've removed the service account file line (service_account_file = )
But now :

Failed to create file system for "Google-drive:/Linux/sites/": drive: failed when making oauth client: failed to create oauth client: empty token found - please run "rclone config reconnect Google-drive:"

If I type rclone config reconnect Google-drive:

2024/02/13 19:21:05 NOTICE: Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config.
2024/02/13 19:21:05 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=P0Eqln36Aj-Hh1WLzEg5RQ
2024/02/13 19:21:05 NOTICE: Log in and authorize rclone for access
2024/02/13 19:21:05 NOTICE: Waiting for code...

And it never end...

Right, you have to connect it if it never was.

The service account doesn't use that.

The issue is probably your service account is out of storage and you want to use the user client ID/secret. I really don't use service accounts on Google.

Assuming it's a headless server, you'd have to use this:

Remote Setup (rclone.org)

I'm sorry, I don't understand the process with remote machine... I have just the linux server (command line), so I've not a browser...

In the remote setup it asking for :

Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: Remote Setup
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "drive" "eyJjbGllbnRfaxxxjU2MDgtY2xtNzE4cjNmb25uMGdvNjFmOW5pNWQ0ajhkaTVyM2EuYXBwxxxCJjbGllbnRfc2VjcmV0IjoiR09DU1BYLWVvTkRVa0tDaDJWcFZ5dDNIbUVNOxxxx9wZSI6ImRyaXZlIn0"
Then paste the result.
Enter a value.
config_token>

But I can't paste it on my PC, the address is 127.0.0.1...

You need rclone on a box that has a web browser like the one you are posting here.

On that box, just follow the steps listed in the remote setup portion as that is your "desktop" machine in the steps.

Ok, I've installed it on my PC, I've lanched config and at the end, it launches the browser. But error message in browser : The OAuth client was not found.

Wow, I launched rclone authorize "drive" and it worked! The toiken has been returned! I have it! Where do I have to paste it exactly on the linux server?

Just follow all steps

...
Remote config
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes (default)
n) No
y/n> n
For this to work, you will need rclone available on a machine that has
a web browser available.

For more help and alternate methods see: https://rclone.org/remote_setup/

Execute the following on the machine with the web browser (same rclone
version recommended):

	rclone authorize "amazon cloud drive"

Then paste the result below:
result>

If too complicated than setup everything locally and just copy rclone.conf file to the remote machine - Remote Setup

thats it! I've setup successefuly, and now the copy of the files are working without a quota problem!! That was the error : we have to use token only!
Thanks to all for helping me in this operation! :+1: :+1:

1 Like