Rclone move cache to crypt

What is the problem you are having with rclone?

Sorry if this question was already asked but i did a search and coud only find one relevant thread. But i could be searching for the wrong keywords. I did find this post which i think answers my question but just want to check if there is another better/faster way.

So I have a g-drive cache and i store about 1TB of files on that. I mount that drive cached using the settings below.

I want to have this data encrypted and from what i can find the best way to do that is using rclone crypt. When i mount the crypt i dont see any of the files that are in the cache mount. I assume this is to be expected as the crypt only shows files that have been encrypted.

Now to my questions. Can i do some magic and make that cache mount an crypt or do i have to create a rclone crypt like below and mount both the cached and the crypt and move all the data from the cache to the new crypt? If i do have to move the data from the cache to the crypt can anyone recommend the optimal settings to use if i use the method in this post. What happens if using this command there is a connection issue will it have to start the copy again or can it pick up where it left off like rsync?

[my-cache]
type = cache
remote = my-gdrive:my-media
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G
db_purge = true
db_path = /mnt/my-cache
plex_token = XXXXXXX

[my-gdrive]
type = drive
client_id = 
client_secret = 
token = {"access_token":"XXXXXXXX","token_type":"Bearer","refresh_token":"1XXXXX","expiry":"2021-12-10T15:25:15.593501396Z"}

I currently use this command to mount the cache drive.

/usr/bin/rclone mount --config=/.config/rclone/rclone.conf --allow-other --cache-db-path=/mnt/rclone-caches/rclone-my-cache --no-modtime --vfs-cache-mode=writes --drive-use-trash --use-json-log --log-file=/var/log/rcloner-my-gdrive.log --cache-info-age=60m my-cache: /mnt/my-gdrive
[my-crypt]
type = crypt
remote = my-cache:
filename_encryption = standard
directory_name_encryption = true
password = XXXXXX
password2 = XXXXXX

Rclone version:

rclone v1.49.3
- os/arch: linux/amd64
- go version: go1.12.9

hello and welcome to the forum,

  1. please update rclone to latest stable v1.57.0
    https://rclone.org/downloads/#script-download-and-install
  2. you need to create a new crypt remote and sync/copy files into that crypt.
    when you sync/copy the files, rclone will on the fly, crypt the files.
  3. better to use rclone sync/copy, not rclone mount.
  4. the rclone mount command you posted uses my-plex-cache: but that is not in the posted config file?
  5. the cache remote has been deprecated, no longer supported and has bugs that will never get fixed.
    instead to use the vfs cache feature for rclone mount
    so to stop using the cache remote, test using this.
[r00052131-crypt]
type = crypt
remote = my-gdrive:my-media-crypt
filename_encryption = standard
directory_name_encryption = true
password = XXXXXX
password2 = XXXXXX

rclone sync my-gdrive:my-media r00052131-crypt: --dry-run -vv

1 Like

First off thanks for the prompted and detailed response.

1, please update rclone to latest stable v1.57.0
Done

2. you need to create a new crypt remote and sync/copy files into that crypt. when you sync/copy the files, rclone will on the fly, crypt the files. better to use rclone sync/copy, not rclone mount.
Do i need to have them both(cache/crypt) unmounted before i run this?

3. the rclone mount command you posted uses my-plex-cache: but that is not in the posted config file?
sorry i copied the copied that incorrectly. Its updated now to be correct.

4. the cache remote has been deprecated, no longer supported and has bugs that will never get fixed. instead to use the vfs cache feature for rclone mount so to stop using the cache remote, test using this.
I assume when you say the vfs cache option that you mean the "--vfs-cache-mode=writes" option I am already using? So going forward my command will look like below and i can replace --cache-db-path and --cache-info-age as they no longer seem to be options here with --cache-dir and --dir-cache-time. The /mnt/rclone-caches drive is an external drive I use as without it the host drive was filling up whether I transferred large files.

/usr/bin/rclone mount --config=/.config/rclone/rclone.conf --allow-other --cache-dir=/mnt/rclone-caches/rclone-my-crypt --no-modtime --vfs-cache-mode=writes --use-json-log --log-file=/var/log/rcloner-my-crypt-gdrive.log --dir-cache-time=60m my-crypt: /mnt/my-gdrive

thanks again

-1.. https://rclone.org/cache/#status
"The cache backend is due to be phased out in favour of the VFS caching layer"

2.. well, imho, i would move on from using cache remotes, we can create a new rclone mount command, not using the cache remotes
note: technically, you can have a rclone mount and rclone sync running at the same time.

4.. about the my-crypt, is that something you are using, or something you want to use?
the problem is that is uses my-cache: which is a cache remote.
we can workaround that.

might test using something like this, need to use a new folder name for the remote, change my-media-crypt to whatever folder name you want.

[my-crypt]
type = crypt
remote = my-gdrive:my-media-crypt
filename_encryption = standard
directory_name_encryption = true
password = XXXXXX
password2 = XXXXXX

i have never used that cache remote, but as based on the documentation.
replace --cache-db-path with --cache-dir
replace -cache-info-age with --dir-cache-time

i could be wrong, but the vfs cache does not cache metadata such as modtimes.
whereas, from the docs, looks like cache remote did cache metadata.

1 Like

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