Setup rclone with Google Drive Service Account for unattended machine

What is the problem you are having with rclone?

I am currently using rclone for my server with client_id, client_secret and token auto generate from the browser to upload stuff to Google Drive for storing, it worked for 2 years without a problem.
Now I wanna use rclone with google service account, that mean I just need 1 service account json file for this case.
But I can use rclone to upload file with the json file, but when I access Google Drive from that account there isn't anything that I have uploaded from the server, also when I check file and directory with command rclone lsd there is nothing on it.
Compare to when I run rclone with client_id, client_id command rclone lsd can show file and directory that already on my Google Drive.

What is your rclone version (output from rclone version)

rclone v1.57.0

  • os/version: debian 9.12 (64 bit)
  • os/kernel: 4.9.0-12-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)

Google Drive

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

rclone copy -P --ignore-existing /usr/local/freeswitch/ 'google-drive':'Google Drive Test'
rclone lsd 'google-drive':

The rclone config contents with secrets removed.

[google-drive]
type = drive
scope = drive
service_account_file = /root/ferrous-layout-336609-34bd8ad93212.json

A log from the command with the -vv flag

Transferred:       96.256 KiB / 716.241 MiB, 0%, 8.751 KiB/s, ETA 23h16m31s
Checks:               174 / 174, 100%
Transferred:           17 / 5577, 0%
Elapsed time:        12.7s
Transferring:
 *                          conf.orig/mime.types:100% /27.947Ki, 13.969Ki/s, 0s
 *                         conf.orig/tetris.ttml:100% /1.130Ki, 1.129Ki/s, 0s
 *                            conf.orig/vars.xml:100% /4.886Ki, 4.882Ki/s, 0s
 *                       conf.orig/voicemail.tpl:  0% /1.423Ki, 0/s, -
2021/12/29 17:20:01 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "-vv" "lsd" "google-drive:"]
2021/12/29 17:20:01 DEBUG : Creating backend with remote "google-drive:"
2021/12/29 17:20:01 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/12/29 17:20:02 DEBUG : Google drive root '': 'root_folder_id = 0APSi8Mq6A3zRUk9PVA' - save this in the config to speed up startup
          -1 2021-12-29 16:43:24        -1 Google Drive Test
2021/12/29 17:20:02 DEBUG : 6 go routines active

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