t00
(T00)
November 19, 2021, 6:29pm
1
hello
is it possible with rclone to encrypt an existing unencrypted directory with my settings?
What is your rclone version (output from rclone version)
rclone version
rclone v1.56.0
Which cloud storage system are you using? (eg Google Drive)
Gsuit
The rclone config contents with secrets removed.
[gdrive]
type = drive
client_id = xxx
client_secret = xxx
scope = drive
root_folder_id = xxx
token = xxx
[gcache]
type = cache
remote = gdrive:/gdrive
plex_password = xxx
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G
[gcrypt]
type = crypt
remote = gcache:/crypt
filename_encryption = standard
directory_name_encryption = true
password = xxx
password2 = xxx
[gcrypt_upload]
type = crypt
remote = gdrive:/gdrive/crypt
filename_encryption = standard
directory_name_encryption = true
password = xxx
password2 = xxx
Regards
T00
asdffdsa
(jojothehumanmonkey)
November 19, 2021, 6:35pm
2
hi,
should not be using cache
remote, it has been deprecated, has known but that will never get fixed.
should update to latest stable v1.57.0
cannot do an in-place encryption.
you would need to crypt into a new directory
t00
(T00)
November 19, 2021, 6:44pm
3
can you tell me how a new correct config looks like with encryption?
and with which command can I encrypt the directory into a new directory?
Regards
asdffdsa
(jojothehumanmonkey)
November 19, 2021, 6:49pm
4
i will make a suggestion, but i need to be sure i understand your current setup.
both of these commands should give the same output,
--- rclone lsd gcrypt:
--- rclone lsd gcrypt_upload:
t00
(T00)
November 19, 2021, 6:55pm
5
root@debian ~ # rclone lsd gcrypt:
2021/11/19 19:54:34 NOTICE: WARNING: Cache backend is deprecated and may be removed in future. Please use VFS instead.
-1 2020-05-11 18:39:33 -1 archive
root@debian ~ # rclone lsd gcrypt_upload:
-1 2020-05-11 18:39:33 -1 archive
root@debian ~ #
asdffdsa
(jojothehumanmonkey)
November 19, 2021, 6:59pm
6
ok, good the same output.
this is my advice, but the onus is one you to validate!!!
use gcrypt_upload
,
no need to use gcrypt
and gcache
what is the directory with the files you want to crypt?
t00
(T00)
November 19, 2021, 7:10pm
7
I've moved the directory to root, it's called "unencrypted_dir"
i put it in the same place as archive directory
if you tell me how the configuration is better, i will adjust it
asdffdsa
(jojothehumanmonkey)
November 19, 2021, 7:16pm
8
not sure exactly what you mean.
need to know the exact
source dir; is it gdrive:unencrypted_dir
?
verify it with rclone lsd
dir where you want the crypted files to be at, need the full path
t00
(T00)
November 20, 2021, 5:46pm
9
he does not show me the directory, although it is there. but with the google account i can see the directory
rclone lsd gcrypt_upload:
-1 2020-05-11 18:39:33 -1 archive
yes dir name is unencrypted_dir
would it be better to first set the config correctly?
t00
(T00)
November 23, 2021, 5:19pm
11
it looks like this here on my-drives
ih8cjhftf26fc2m... is the encrypted directory of archive
asdffdsa
(jojothehumanmonkey)
November 23, 2021, 5:28pm
12
the problem is that unencrypted_dir
is inside /gdrive/crypt
cannot have non-crypted files inside a rclone crypt remote.
so move unencrypted_dir
to the root of gdrive
.
then post the output of rclone lsd gdrive: -vv
t00
(T00)
November 23, 2021, 7:18pm
13
rclone lsd gdrive: -vv
2021/11/23 20:29:18 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "lsd" "gdrive:" "-vv"]
2021/11/23 20:29:18 DEBUG : Creating backend with remote "gdrive:"
2021/11/23 20:29:18 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
-1 2020-05-11 18:39:31 -1 gdrive
-1 2021-11-23 20:29:15 -1 unencrypted_dir
2021/11/23 20:29:19 DEBUG : 4 go routines active
asdffdsa
(jojothehumanmonkey)
November 23, 2021, 7:32pm
14
ok, now we know the the source dir is
gdrive:unencrypted_dir
you need to pick a the destination dir, where do you want the crypted files to go?
the exact
full path
1 Like
t00
(T00)
November 23, 2021, 9:00pm
15
it should then be in the /gdrive/crypt/archive/ directory. also /gdrive/crypt/ih8cjhftf26fc2m...
asdffdsa
(jojothehumanmonkey)
November 23, 2021, 9:21pm
16
based on this
[gcrypt_upload]
type = crypt
remote = gdrive:/gdrive/crypt
/gdrive/crypt/archive/
would be gcrypt_upload:archive
, correct?
1 Like
t00
(T00)
November 24, 2021, 8:02pm
17
yes, correct
root@debian / # rclone lsd gcrypt_upload:
-1 2020-05-31 17:02:45 -1 archive
asdffdsa
(jojothehumanmonkey)
November 24, 2021, 8:10pm
18
good, so now we know the source and dest
one caveat is if the same folder name exists in the root of both
gdrive:unencrypted_dir
and
gcrypt_upload:archive
then rclone would merge that two folders.
so the command should be this? upon you to confirm!!!???
rclone copy gdrive:unencrypted_dir gcrypt_upload:archive -vv --dry-run
t00
(T00)
November 25, 2021, 5:43am
19
very good, i will test it, thank you very much.
One more question are the files downloaded and then uploaded again in encrypted form? or does it all happen on the server?
Rclone acts like the middle man for this because it's rclone that does the encryption so the encryption part happens where you run rclone so in this case, on the server if that helps.