Unable to backup to crypt when it is mounted

Hi

I’m using rclone with Google Drive but have issues trying to backup new files to my crypt.

My setup is:

GD > Cache > Crypt > Mount

[gdrive]
type = drive
client_id = *** REMOVED ***
client_secret = *** REMOVED ***
scope = drive
token = *** REMOVED ***
team_drive = *** REMOVED ***

[gcache]
type = cache
remote = gdrive:
plex_url = http://127.0.0.1:14475
plex_username = *** REMOVED ***
plex_password = *** ENCRYPTED ***
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G

[gcrypt]
type = crypt
remote = gcache:/crypt
filename_encryption = standard
directory_name_encryption = true
password = *** ENCRYPTED ***
password2 = *** ENCRYPTED ***

The crypt is monuted using:

rclone mount --cache-tmp-wait-time 5m --allow-other --dir-cache-time 72h --buffer-size 64M --vfs-read-chunk-size 128M --vfs-cache-max-age 675h --size-only --vfs-read-chunk-size-limit=1G --uid 99 --gid 100 --default-permissions gcrypt: /home/user/gcrypt &

For example, if I try to copy the files with rclone using

rclone copy /home/user/file.ext gcrypt: -P -v

I get this:

2019/01/13 00:04:53 INFO : gcache: Cache DB path: /home/user/.cache/rclone/cache-backend/gcache.db
2019/01/13 00:04:53 INFO : gcache: Cache chunk path: /home/user/.cache/rclone/cache-backend/gcache
2019/01/13 00:04:54 ERROR : /home/user/.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 “/home/user/.cache/rclone/cache-backend/gcache.db”: timeout
2019/01/13 00:04:54 INFO : gcache: Cache DB path: /home/user/.cache/rclone/cache-backend/gcache.db
2019/01/13 00:04:54 INFO : gcache: Cache chunk path: /home/user/.cache/rclone/cache-backend/gcache
2019/01/13 00:04:55 ERROR : /home/user/.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 “/home/user/.cache/rclone/cache-backend/gcache.db”: timeout
2019/01/13 00:04:55 Failed to create file system for “gcrypt:”: failed to make remote gcache:"/crypt" to wrap: failed to start cache db: failed to open a cache connection to “//home/user/.cache/rclone/cache-backend/gcache.db”: timeout

Or if I try to copy the files directly to the mount using

cp -r /home/user/file.ext* /home/user/gcrypt/*

I get this:

cp: error writing ‘/home/user/file.ext’: Input/output error
cp: failed to close ‘/home/user/file.ext’: Input/output error

It works perfectly when the crypt isn’t mounted, but I can’t unmount it every time I want to back up otherwise, the files already on the crypt are useless during that time.

I did try to create another remote (gcrypt2) pointing to gdrive rather than gcache so that I had one to mount one to backup but the files uploaded on the gcrypt2 were only readable if I mounted it.

Does anyone have any ideas how I can get around this?

Thank you

You can only have one cache mounted at a time.

So you’d have to create another cache entry and you can use the same the same encryption passwords/etc to mount it so they have different cache.dbs.

Intput/Output error means it isn’t actually mounted or your cache.db is messed up.

I’d stop everything and remove the cache.db and remount everything.