Does Rclone Ping Google Drive API if the Folders are empty?

What is the problem you are having with rclone?

Does Rclone Ping google.com and use up the "API hit" if the source folder is empty? I am trying to controll my API hits,
at the same time, have a cron job to run every minute to move files to G-drive.

The graph at cloud.console.google.com just shows a 0.1 api/s something like that.

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

rclone v1.57.0

  • os/version: debian 10.11 (64 bit)
  • os/kernel: 5.10.0-0.bpo.11-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

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

G drive

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

rclone move /home/downloads/emptyfolder/ gdrive:inbox/ -P

The rclone config contents with secrets removed.

 

[gdrive]
type = drive
team_drive =
scope = drive
root_folder_id = 
server_side_across_configs = true
service_account_file = /use/the/json/file1.json

A log from the command with the -vv flag

2022/03/22 08:50:47 DEBUG : rclone: Version "v1.57.0" starting with parameters [                                                                                        "rclone" "copy" "xxxxxx/" "gdrive:/" "-P" "-vv"]
2022/03/22 08:50:47 DEBUG : Creating backend with remote "xxxxx"
2022/03/22 08:50:47 DEBUG : Using config file from "xxxxx"
2022/03/22 08:50:47 DEBUG : fs cache: renaming cache item "xxxxx/" to b                                                                                        e canonical "/home/first/downloads/zzyx"
2022/03/22 08:50:47 DEBUG : Creating backend with remote "gdrive/"
2022/03/22 08:50:48 DEBUG : fs cache: renaming cache item "gdrive" to be can                                                                                        onical "one:inbox"
2022-03-22 08:50:48 DEBUG : Google drive root 'inbox': Waiting for checks to fin                                                                                        ish
2022-03-22 08:50:48 DEBUG : Google drive root 'inbox': Waiting for transfers to                                                                                         finish
2022-03-22 08:50:50 DEBUG : .ignore: md5 = xxxxxxxxxxxxxx OK
2022-03-22 08:50:50 INFO  : .ignore: Copied (new)
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         2.4s
2022/03/22 08:50:50 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         2.4s

2022/03/22 08:50:50 DEBUG : 7 go routines active




So you run a move command and it moves a file and you are asking if you use some API for that? Yes, you'd use a few calls to make the copy for that one file.

The API quotas are insanely huge (1 billion or something per day). You'll never hit that quota so I would just not worry about API usage at all.

not 1 file, I am asking, if source directory is empty?

I am currently cron-ing at per minute, but need to max it, and cron per second.

I have a lot of tiny files I need to back up.

So your question is if you run rclone move on an empty source directory, does it use any API calls?

Yes, it does as it'll refresh the token but I'd imagine that's probably it.

API calls are really unlimited so it's not worth every worrying about API usage.

1 Like

I was hoping rclone checks whether files are there or not, and whether they match --include-from, if so then ping the refresh token and continue.... otherwise close.

Sorry are I'm confused.

You asked if the source location was empty, what happens and I answered that.

In the command you share, you don't have an include from as you have a move command with nothing else.

Is the source empty or not?

Where is this from? A new command you are running?

I'm not sure what question we still have as a refresh token update will take an API hit or two.

If you have files in the source and need to transfer them, that will take some API hits depending on number of files.

In the end, API hits really don't matter for Google Drive so not sure what problem/issue you are facing and/or trying to solve.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.