Cannot figure out how to get Rclone to sync folders on my W10 PC to Google Drive while the folders on GDrive to be encypted?


#1

Hello, sorry if this is not the right place to ask this, but i’m kinda beat.

I just bought a 1TB Google drive plan, and i’m planning on backing up and syncing some folders on my desktop(document folder, desktop etc) but how can I do so in a way, where I can backup the folders to Google drive but they are encrypted in google drive? And a way where it can sync up the folder so I don’t have to upload the whole folder every time I change or update something on my PC? I setup a remote and linked it to Google Drive, now i’m completely lost


#2

You have to create an encrypted remote in your google drive. See: https://rclone.org/crypt/. Run rclone config and follow the steps.

You have the answer yourself: use the sync command. See: https://rclone.org/commands/rclone_sync/


#3

Sorry but I am completely lost here. I just setup the remote and linked my Google Drive, now what do I do?


#4

You probably created your remote on google drive as unencrypted, which is correct.

You should now create a new encrypted remote pointing to a folder in your remote created in google drive.

See how my rclone.conf file looks (in this case with Dropbox):

[MyDropbox]
type = dropbox
app_key = 
app_secret = 
token = {"access_token":"............."}

[MyDropbox_crypt]
type = crypt
remote = MyDropbox:folder_encrypted
filename_encryption = off
password = ..............
password2 = ..............

Therefore, all the files that I transfer to MyDropbox_crypt will be stored encrypted in the folder folder_encrypted in my dropbox account.


#5

I’m lost. Okay, please do not be vague… this is my first time using a command prompt like this. I created a encrypted remote I believe, now what? If possible please do a step by step i’m completely lost


#6

Ok, so from the beginning: you used the rclone config command to create the remote, right? Then a configuration file rclone.conf was created. Paste here the contents of this file (without the passwords!) and I will indicate the next step.


#7

Where exactly do I get the rclone.conf file? (Sorry for so many questions)


#8

Which OS you are using?


#9

Windows 10, latest update


#10

So you’ll probably find it in:

C:\Users\[your user name]\.config\rclone


#11

Thank you, here’s the config

[gdrive]
type = crypt
client_id =
client_secret =
scope = drive
root_folder_id =
service_account_file =
token =[edited out]
remote = secure
filename_encryption = standard
directory_name_encryption = true
password = [edited out]
password2 = [edited out]


#12

Then you have a remote named gdrive, encrypted (type = crypt) and pointing to a remote named “secure”. Did you create this “secure” remote?


#13

Yes I did, but I may have not saved it… here’s what appears when I do rclone config

Microsoft Windows [Version 10.0.17134.137]
© 2018 Microsoft Corporation. All rights reserved.

C:\Users\Daniel>cd\

C:>cd rclone

C:\rclone>rclone config
Current remotes:

Name Type
==== ====
gdrive crypt

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>


#14

And did you saved the key (token)?

See a google drive remote from my rclone.conf file:

[GDrive_user]
type = drive
client_id =
client_secret =
service_account_file =
token = {"access_token": ".....................

#15

Yes I did, I just edited it for safety


#16

So let’s try to edit your rclone.conf file directly (it’s a normal txt file). Be careful when saving, don’t add a txt extension (rclone.conf.txt).

Add these lines at the beginning:

[secure]
type = drive
client_id = 
client_secret = 
service_account_file = 
token = {"access_token":"   your saved token here    "}

#17

Alright just did, what do I do next?


#18

In this line of the rclone file:

remote = secure

modify to:

remote = secure:some_encripted_folder

Where some_encripted_folder is a folder you should create on your google drive, and within encrypted files will be stored. Choose the name you want.


#19

Paste here the rclone.conf file again.


#20

[secure]
type = drive
client_id =
client_secret =
service_account_file =
token = {“access_token”:“access_token”:"[edited out]"}
[gdrive]
type = crypt
client_id =
client_secret =
scope = drive
root_folder_id =
service_account_file =
token = {“access_token”:"[edited out]"}
remote = secure:Backup
filename_encryption = standard
directory_name_encryption = true
password = [edited out]
password2 = [edited out]