Issues with rclone on Rasp 4 using Legacy Buster Debian

What is the problem you are having with rclone?

I can't see any files in Google drive or send files up to the drive.

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

rclone v1.63.1
- os/version: raspbian 10.13
- os/kernel: 5.10.103-v7l+ (armv7l)
- os/type: linux
- os/arch: arm (ARMv7 compatible)
- go/version: go1.20.6
- 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)

Results are a file made locally in the gdrive on the Raspberry Pi.
rclone ls --max-depth 1 gdrive:

  •    0 Test File 4*
    

pi@raspberrypi:/ $

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = (CLIENT ID)
client_secret = (SECRET)
scope = drive
token = {"access_token":"ACCESS TOKEN","token_type":"Bearer","refresh_token":"REFRESH TOKEN","expiry":"2023-07-30T13:35:15.193659048+01:00"}
team_drive = [gdrive]
type = drive
client_id = (CODE).apps.googleusercontent.com
client_secret = (SECRET)
scope = drive
token = {"access_token":"(ACCESS TOKEN","token_type":"Bearer","refresh_token":"(REFRESH TOKEN)","expiry":"2023-07-30T13:35:15.193659048+01:00"}
team_drive =

A log from the command with the -vv flag

rclone ls --max-depth 1 gdrive: -vv
2023/07/30 17:10:02 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "ls" "--max-depth" "1" "gdrive:" "-vv"]
2023/07/30 17:10:02 DEBUG : Creating backend with remote "gdrive:"
2023/07/30 17:10:02 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/07/30 17:10:02 DEBUG : gdrive: Loaded invalid token from config file - ignoring
2023/07/30 17:10:03 DEBUG : Saving config "token" in section "gdrive" of the config file
2023/07/30 17:10:03 DEBUG : gdrive: Saved new token in config file
2023/07/30 17:10:03 DEBUG : Google drive root '': 'root_folder_id = (NEW ID)' - save this in the config to speed up startup

  •    0 Test File 4*
    

2023/07/30 17:10:04 DEBUG : 8 go routines active

I am trying to set this up to do a periodic upload of video and still images from EyeMotion to use as a security system.

Can anyone help me get this working?

Ta in advance....Balgroggy.

Could you run:

rclone config show

and post output here. Please include it in between triple "ticks" signs":

image

so it is easy to read.

output
output

remove you passwords etc

Thank you KapitainSky for the quick response.

Here is the output of rclone Config Show:

[gdrive]
type = drive
client_id = (information as given from Google)
client_secret = (information as given from Google)
scope = drive
token = {"access_token":"The access token given by rclone config","token_type":"Bearer","refresh_token":"The refresh token given","expiry":"2023-07-30T18:10:02.397144085+01:00"}
team_drive =
1 Like

can you run

rclone config reconnect gdrive:

and try to authenticate again

Authentication appears to work, it always has.

I ran the reconnect command and got a successful response on the browser. Still not seeing the files on Google Drive though.

OK - it would point to incorrect client_id. We can check it easily.

run rclone config and create new remote gdrive-test - do not enter client_id/secret and let's see if it will work:

rclone ls --max-depth 1 gdrive-test: -vv
rclone ls --max-depth 1 gdrive-test: -vv
2023/07/30 19:25:02 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "ls" "--max-depth" "1" "gdrive-test:" "-vv"]
2023/07/30 19:25:02 DEBUG : Creating backend with remote "gdrive-test:"
2023/07/30 19:25:02 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/07/30 19:25:02 DEBUG : Google drive root '': 'root_folder_id = (Deleted for security but did appear)' - save this in the config to speed up startup
        0 Test File 4
2023/07/30 19:25:02 DEBUG : 6 go routines active

Still none of the test files I had put directly into Google Drive.

Looks like there is one object there called Test File...

upload a new test2.txt and see if there:

echo "hello world" | rclone rcat gdrive-test:test2.txt
rclone ls --max-depth 1 gdrive-test: -vv
2023/07/30 19:36:43 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "ls" "--max-depth" "1" "gdrive-test:" "-vv"]
2023/07/30 19:36:43 DEBUG : Creating backend with remote "gdrive-test:"
2023/07/30 19:36:43 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/07/30 19:36:43 DEBUG : Google drive root '': 'root_folder_id = (Removed for Security)' - save this in the config to speed up startup
        0 Test File 4
       12 test2.txt
2023/07/30 19:36:44 DEBUG : 6 go routines active
pi@raspberrypi:~ $

However, in the Google drive itself, I have only a file I made in Google drive called Google.txt.

Obviously it is not the same drive....

Maybe you are using Team Drives?

When you create new remote config:

Configure this as a Shared Drive (Team Drive)?
y) Yes
n) No

answer Yes - and choose which drive you want to use

The key is we just proved that rclone and gdrive work fine on RPi4 Debian Buster.

Problem is with gdrive configuration.

That's something I suppose.

Here is the output after editing the gdrive-test remote in rclone config to use team drives and running the command again.

pi@raspberrypi:~ $ rclone ls --max-depth 1 gdrive-test: -vv
2023/07/30 19:51:26 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "ls" "--max-depth" "1" "gdrive-test:" "-vv"]
2023/07/30 19:51:26 DEBUG : Creating backend with remote "gdrive-test:"
2023/07/30 19:51:26 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/07/30 19:51:26 DEBUG : Google drive root '': 'root_folder_id = (Removed for security)' - save this in the config to speed up startup
        0 Test File 4
       12 test2.txt
2023/07/30 19:51:27 DEBUG : 6 go routines active
pi@raspberrypi:~ $

What about:

rclone lsd gdrive-test: -vv
pi@raspberrypi:~ $ rclone lsd gdrive-test: -vv
2023/07/30 19:54:43 DEBUG : rclone: Version "v1.63.1" starting with parameters ["rclone" "lsd" "gdrive-test:" "-vv"]
2023/07/30 19:54:43 DEBUG : Creating backend with remote "gdrive-test:"
2023/07/30 19:54:43 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/07/30 19:54:43 DEBUG : Google drive root '': 'root_folder_id = (Removed for security)' - save this in the config to speed up startup
2023/07/30 19:54:44 DEBUG : 6 go routines active

Ok so in your gdrive root folder there are only two files... and no other folders

If you are seeing something else in Google web interface it means you have more than one drive.. I am not gdrive user so can't think about other options but "Team drives"

On the Raspberry Pi drive is the two files, that are showing up on the commands we have been trying, but on the Google drive, there are currently no folders and only a small file called Google.txt.

let's make a folder than:

rclone mkdir gdrive-test:FolderTest -vv
rclone ls gdrive-test: -vv

I feel such a fool...You were completely right and I was logged into the wrong drive! :frowning: The two files we had on the Raspberry Pi are on the drive....Thanks for helping, now I can sort out the rest, cron job and installing EyeMotion.

Thank you SO much Kapitainsky!

1 Like

Do not forget to create client_id/secret - without them gdrive always will have throttling problems.

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