What is the problem you are having with rclone?
I'm having an issue getting rclone to work unattended with google drive. Yeah, Ive searched
and read all of the messages, and if I hadn't already dropped the annual cost into google drive,
I would be checking other providers.
So, the issue. I need to be able to do unattended weekly syncs. Unattended meaning that I
am unable to copy/paste with my windows box to get the oauth info. I need a solution that can
run on its own for weeks and months, etc.
Work done:
I first set it up, did the initial config, and did a sync. Since the smaller of my folders i need to
back up is only about a gig, it worked perfectly. I paid google their money and got me some
disk space. At this point it was like 2am so I went to sleep figuring Id do the rest in the am.
Next morning, i try to do a sync so i can see the incremental, and boom need to reauthorize.
What? Doc said "initial setup" would need to manual auth. Well crud. So, I looked for ways
around this, googled a bunch of stuff, and decided to try a service account. I set up a service
account, downloaded the json, and configured it.
Yeah, you guys know the situation here, Ive seen it in a bunch of posts here. Service accounts
have their own disk locations separate from all of the disk i just added to my google drive. I
tried this, i tried that, i danced around a bonfire under the full moon, and nothing worked. I DID
see some posts about sharing a folder, but it had its own caveats and sadly wont work for my
situation. While the uploads worked, it stuck them in a unique drive for the service account that
I cannot view or even upgrade with larger disk. This config could work for me, if i could actually
upgrade that service account disk. But, I disgress.
Ok, so question is, has anyone found a way around this? Someone mentioned a program
called duplicati which apparently gets around this using a delegated oauth service (their
service does the oauth, probably with selenium or something, and sends it back to you all
from the command line).
So, bottom line. Am I boned here with google drive? IF so, thats fine I can switch to another
provider. BUT, the communities I am backing up have their own budget and its already pretty
maxed. $20 once a year shared by the few communities is doable, while a monthly fee is not
so much. Sad thing is I only NEED like 150gb.
Thoughts? Ideas? Flames, even? I'm open to any input.
TLDR;
Need unattended backups from a headless server, no manual oauth to a headed box. Google
Drive SEEMS to be a dead end. Need 150gb for similar price to drive, but that will work with
these requirements. Any input appreciated.
Run the command 'rclone version' and share the full output of the command.
# rclone version
rclone v1.61.1
- os/version: centos 7.9.2009 (64 bit)
- os/kernel: 3.10.0-1160.el7.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.4
- 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
)
I've tried a bunch, but this is what works and Ive been using:
rclone sync -P ~/t GDCONFIG:/test/
The rclone config contents with secrets removed.
[GDCONFIG]
type = drive
client_id = *redact*
client_secret =*redact*
scope = drive
token = *redact*
team_drive =
service_account_file = ~/svcaccount.json
A log from the command with the -vv
flag
# rclone sync -P ~/t GDCONFIG:/test/ -vv
2023/02/05 07:36:06 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "sync" "-P" "/root/t" "GDCONFIG:/test/" "-vv"]
2023/02/05 07:36:06 DEBUG : Creating backend with remote "/root/t"
2023/02/05 07:36:06 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/02/05 07:36:06 DEBUG : Creating backend with remote "GDCONFIG:/test/"
2023/02/05 07:36:07 DEBUG : Google drive root 'test': 'root_folder_id = 0AOEZS-4rBBCwUk9PVA' - save this in the config to speed up startup
2023/02/05 07:36:07 DEBUG : fs cache: renaming cache item "GDCONFIG:/test/" to be canonical "GDCONFIG:test"
2023-02-05 07:36:07 DEBUG : Google drive root 'test': Waiting for checks to finish
2023-02-05 07:36:07 DEBUG : servers/my.cnf: Size and modification time the same (differ by -470.852µs, within tolerance 1ms)
2023-02-05 07:36:07 DEBUG : servers/my.cnf: Unchanged skipping
2023-02-05 07:36:07 DEBUG : Google drive root 'test': Waiting for transfers to finish
2023-02-05 07:36:07 DEBUG : Waiting for deletions to finish
2023-02-05 07:36:07 INFO : There was nothing to transfer
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 1 / 1, 100%
Elapsed time: 0.7s
2023/02/05 07:36:07 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 1 / 1, 100%
Elapsed time: 0.7s
2023/02/05 07:36:07 DEBUG : 6 go routines active