Mount and sync together

What is the problem you are having with rclone?

Hi
I mount the directory /home/archive to my gdrive and at the same time I want to transfer other directories (/home/0504) to my google drive (gcrypt:/archive/0504). I always get this message:

2020/05/06 19:14:30 ERROR : /root/.cache/rclone/cache-backend/gcache.db: Error opening storage cache. Is there another rclone running on the same remote? failed to open a cache connection to "/root/.cache/rclone/cache-backend/gcache.db": timeout
2020/05/06 19:14:30 Failed to create file system for "gcrypt:/archive/0504": failed to make remote gcache:"/crypt/ih8cjhftf26fc2m98gp703jcfo/cngr4qq0pcl4vthhcjf9sj8tm0/et1drjr91ia0sjn57o1uckcb3o" to wrap: failed to start cache db: failed to open a cache connection to "/root/.cache/rclone/cache-backend/gcache.db": timeout

how can I use the mount and the move at the same time

What is your rclone version (output from rclone version)

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

debian 10
Linux debian 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

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)

mount:
rclone mount gcrypt:/archive /home/archive --allow-other --allow-non-empty --cache-db-purge --buffer-size 32M --use-mmap --dir-cache-time 72h --drive-chunk-size 16M --timeout 1h --vfs-cache-mode minimal --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G &

move:
rclone move /home/0504 gcrypt:/archive/0504 -P --checkers 3 --log-file /root/upload.log -v --tpslimit 3 --transfers 3 --drive-chunk-size 32M

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/05/06 19:14:30 ERROR : /root/.cache/rclone/cache-backend/gcache.db: Error opening storage cache. Is there another rclone running on the same remote? failed to open a cache connection to "/root/.cache/rclone/cache-backend/gcache.db": timeout
2020/05/06 19:14:30 Failed to create file system for "gcrypt:/archive/0504": failed to make remote gcache:"/crypt/ih8cjhftf26fc2m98gp703jcfo/cngr4qq0pcl4vthhcjf9sj8tm0/et1drjr91ia0sjn57o1uckcb3o" to wrap: failed to start cache db: failed to open a cache connection to "/root/.cache/rclone/cache-backend/gcache.db": timeout

You can't mount a cache remote and move to it at the same time - However, you can have another crypt that skips your cache for uploading directly.

eg, with this kind of config:

[gdrive]
type = drive

[gcache]
type = cache
remote = gdrive:

[crypt_mount]
type = crypt
remote = gcache:
password = x
password2 = y

[crypt_upload]
type = crypt
remote = gdrive:
password = x
password2 = y

(Note that mount points to the cache, and upload points directly to the gdrive)

You could then:

rclone mount crypt_mount:/archive /home/archive

rclone move /home/0504 crypt_upload:/archive/0504

I don't quite understand what I have to change. this is my config. can you tell me what the config should look like?

[gdrive]
type = drive
client_id = xxx
client_secret = xxx
scope = drive
root_folder_id = xxx
token = xxx

[gcache]
type = cache
remote = gdrive:/gdrive
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

The point here is that the 'database' can only be open by one process at a time. So if you've mounted your remote with that 'database' (cache database) then you cant use it with another command.

What you need to do is move to the crypt remote rather than trying to move to the cache backend (since that is already in use by the mount). So create an other 'crypt' pointng directly to crypt rather than cache.

EDIT: @Makeshift is on the ball. :slight_smile: below.

[gdrive]
type = drive
client_id = xxx
client_secret = xxx
scope = drive
root_folder_id = xxx
token = xxx

[gcache]
type = cache
remote = gdrive:/gdrive
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

Should do the trick - You can mount the gcrypt remote, and do moves to the gcrypt_upload remote, and they'll end up in the same place.

many thanks for your help

the commands remain the same?

rclone mount crypt_mount:/archive /home/archive
rclone move /home/0504 crypt_upload:/archive/0504

Hopefully one last question, how can I reload the config file now?

Regards

No need. Its immediately usable. You didn't make any changes to the mount entry so no need to restart your mount either.

They need to match your entries.

mount:
rclone mount gcrypt:/archive /home/archive --allow-other --allow-non-empty --cache-db-purge --buffer-size 32M --use-mmap --dir-cache-time 72h --drive-chunk-size 16M --timeout 1h --vfs-cache-mode minimal --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G &

move:
rclone move /home/0504 gcrypt_upload:/archive/0504 -P --checkers 3 --log-file /root/upload.log -v --tpslimit 3 --transfers 3 --drive-chunk-size 32M

Always test using "--dry-run"

thank you very much, it works so perfectly

Regards

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