New to rclone (google drive)

Hello I am very new to rclone using Virtualmin / ubuntu 20.04

When i do rclone config, name, select option 18 (google drive)

The command isnt asking for me my root folder ID,

The videos I was watching had the root folder line.

Any help would be appreciated thank you!

Normally you will leave this blank and rclone will determine the correct root to use itself.

It does not as you said No to question about editing advanced settings:) It is only needed for special cases so unless you need it you can happily start using rclone without it.

hello and welcome to the forum,

if you run the command with -vv you will see the root folder id and can add it to the config file.
tho i have never bothered to do it.

rclone lsd gdrive: -vv
DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "lsd" "gdrive:" "-vv"]
DEBUG : Creating backend with remote "gdrive:"
DEBUG : Using config file from "c:\\data\\rclone\\rclone.conf"
DEBUG : Google drive root '': 'root_folder_id = 0AIYnsu88uXytUk9PVA' - save this in the config to speed up startup

and you can copy/paste it direct into the config file or use rclone config

[gdrive]
type = drive
client_id = redacted
client_secret = redacted
scope = drive
token = redacted
root_folder_id = 0AIYnsu88uXytUk9PVA
1 Like

This is where I get lost

Edit advanced config?
y) Yes
n) No (default)
y/n> y

Option token.
OAuth Access Token as a JSON blob.
Enter a string value. Press Enter for the default token>

Option auth_url.
Auth server URL.
Leave blank to use the provider defaults.
Enter a value. Press Enter to leave empty.
auth_url>

Option token_url.
Token server url.
Leave blank to use the provider defaults.
Enter a value. Press Enter to leave empty.
token_url>

Option root_folder_id.
ID of the root folder.
Leave blank normally.
Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.
Enter a value. Press Enter to leave empty.
root_folder_id>

This is the other part i get confused on

make sure to use latest rclone, v1.63.0
https://rclone.org/downloads/

press enter to skip

I used this bash lastnight to isntall it on my vps

sudo -v ; curl https://rclone.org/install.sh | sudo bash

press enter to keep the current value and skip to next item.

IMHO this is not what to do in this particular case... it is token prompt.

As your VPS does not have web browser you should run

rclone authorize "drive" "eyJb.....fQ"

on another computer where there is web browser - it will generate toke you copy/paste back here.

for now, skip the advanced setup, no need to hardcode the root folder id, that is optional and not required.
after the remote is created and tested, then if you want, then try advanced setup

as i mentioned, i never bothered to hard code the root folder id and based on debug logs posted in the forum,
most users do not hardcode.

when i type in y i get this

2023/06/30 17:28:40 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=_bS8bYNY93_JknH897kZ6Q
2023/06/30 17:28:40 NOTICE: Log in and authorize rclone for access
2023/06/30 17:28:40 NOTICE: Waiting for code...

and nothing happens

to create a remote for gdrive, need a machine with web browser.

might be easier to run rclone config on a machine with a web browser.
and then copy the config file to the vps.

check out

I got it to work via rclone on my pc, now other question do you know when rclone will make a back up to my google drive account?

Thank you

It doesn't automatically make backups., You have have to tell it to do so by calling it

rclone sync source: dest:

but if this is a backup, I strongly suggest something like the following making rclone more akin to a reverse incremental backup

rclone sync source: dest:current --backup-dir dest:backup/`date +"%Y%m%dT%H%M%S%z"`

or

rclone sync src: dst: --backup-dir dst:.backups/`date +"%Y%m%dT%H%M%S%z"` --filter "- /.backups/**"

(the former makes two high-level directories: One for the latests and one for backups. The latter embeds the backup directory in the main destination as a "hidden" directory)

Without --backup-dir, it isn't really a great backup since it'll happily propagate accidental deletions or modifications.

There are advanced ways to schedule this to happen but setting that up is beyond the scope here. Look for guides/tutorials on crontab.

1 Like

rclone is not really backup software - it is rather utility program to move/copy files around.

Like jwink3101 suggested you can use backup-dir flag to create simple solution but for backups I would recommend something like restic - which BTW is using rclone to access remotes like google drive.

1 Like

Do I need the oauth secret key for Google drive?

are you asking about drive-client-id and drive-client-secret ?

as per rclone docs
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.

Finally found a video lastnight how to do it step by step, i was doing it completely wrong.
Thank you for your help

1 Like