I tried to replicate this but failed. Can you work out what I need to do differently?
I set up a cache pointing to a local directory in /tmp TestCache:
(I also tried this with s3 as the destination with the same results)
$ rclone config show TestCache
--------------------
[TestCache]
type = cache
remote = /tmp/rclone_cache_test
chunk_size =
info_age =
chunk_age =
warmup_age =
--------------------
I then set up a source directory
$ mkdir /tmp/rclone_cache_test
$ ls /tmp/rclone_cache_test
$ rclone --cache-db-purge ls TestCache:
$ cd /tmp/
$ mkdir source
$ echo one > source/normal
$ echo two > source/excluded
$ ls -l /tmp/source/
total 8
-rw-rw-r-- 1 ncw ncw 4 Jun 24 09:49 excluded
-rw-rw-r-- 1 ncw ncw 4 Jun 24 09:49 normal
Initial sync
$ rclone -vv sync /tmp/source/ TestCache:
2018/06/24 09:50:08 DEBUG : rclone: Version "v1.42-010-g935533e5" starting with parameters ["rclone" "-vv" "sync" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:08 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2018/06/24 09:50:08 DEBUG : TestCache: wrapped local:/tmp/rclone_cache_test at root
2018/06/24 09:50:08 INFO : TestCache: Cache DB path: /home/ncw/.cache/rclone/cache-backend/TestCache.db
2018/06/24 09:50:08 INFO : TestCache: Cache chunk path: /home/ncw/.cache/rclone/cache-backend/TestCache
2018/06/24 09:50:08 INFO : TestCache: Chunk Memory: true
2018/06/24 09:50:08 INFO : TestCache: Chunk Size: 5M
2018/06/24 09:50:08 INFO : TestCache: Chunk Total Size: 10G
2018/06/24 09:50:08 INFO : TestCache: Chunk Clean Interval: 1m0s
2018/06/24 09:50:08 INFO : TestCache: Workers: 4
2018/06/24 09:50:08 INFO : TestCache: File Age: 6h0m0s
2018/06/24 09:50:08 DEBUG : Adding path "cache/expire" to remote control registry
2018/06/24 09:50:08 DEBUG : Adding path "cache/stats" to remote control registry
2018/06/24 09:50:08 DEBUG : Cache remote TestCache:: list ''
2018/06/24 09:50:08 DEBUG : : list: empty listing
2018/06/24 09:50:08 DEBUG : : list: read 0 from source
2018/06/24 09:50:08 DEBUG : : list: source entries: []
2018/06/24 09:50:08 DEBUG : : list: cached directories: 0
2018/06/24 09:50:08 DEBUG : : list: cached dir: '', cache ts: 2018-06-24 09:50:08.871707105 +0100 BST m=+0.017722264
2018/06/24 09:50:08 INFO : Cache remote TestCache:: Waiting for checks to finish
2018/06/24 09:50:08 DEBUG : Cache remote TestCache:: put data at 'normal'
2018/06/24 09:50:08 INFO : Cache remote TestCache:: Waiting for transfers to finish
2018/06/24 09:50:08 DEBUG : Cache remote TestCache:: put data at 'excluded'
2018/06/24 09:50:08 DEBUG : normal: put: uploaded to remote fs
2018/06/24 09:50:08 DEBUG : excluded: put: uploaded to remote fs
2018/06/24 09:50:08 DEBUG : normal: put: added to cache
2018/06/24 09:50:08 DEBUG : excluded: put: added to cache
2018/06/24 09:50:08 DEBUG : : cache: expired
2018/06/24 09:50:08 INFO : : put: cache expired
2018/06/24 09:50:08 DEBUG : normal: object hash cached: 5bbf5a52328e7439ae6e719dfe712200
2018/06/24 09:50:08 INFO : normal: Copied (new)
2018/06/24 09:50:08 DEBUG : : cache: expired
2018/06/24 09:50:08 INFO : : put: cache expired
2018/06/24 09:50:08 DEBUG : excluded: object hash cached: c193497a1a06b2c72230e6146ff47080
2018/06/24 09:50:08 INFO : excluded: Copied (new)
2018/06/24 09:50:08 INFO : Waiting for deletions to finish
2018/06/24 09:50:08 INFO :
Transferred: 8 Bytes (138 Bytes/s)
Errors: 0
Checks: 0
Transferred: 2
Elapsed time: 0s
2018/06/24 09:50:08 DEBUG : 7 go routines active
2018/06/24 09:50:08 DEBUG : rclone: Version "v1.42-010-g935533e5" finishing with parameters ["rclone" "-vv" "sync" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:08 DEBUG : Cache remote TestCache:: Services stopped
Second sync
$ rclone -vv sync /tmp/source/ TestCache:
2018/06/24 09:50:23 DEBUG : rclone: Version "v1.42-010-g935533e5" starting with parameters ["rclone" "-vv" "sync" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:23 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2018/06/24 09:50:23 DEBUG : TestCache: wrapped local:/tmp/rclone_cache_test at root
2018/06/24 09:50:23 INFO : TestCache: Cache DB path: /home/ncw/.cache/rclone/cache-backend/TestCache.db
2018/06/24 09:50:23 INFO : TestCache: Cache chunk path: /home/ncw/.cache/rclone/cache-backend/TestCache
2018/06/24 09:50:23 INFO : TestCache: Chunk Memory: true
2018/06/24 09:50:23 INFO : TestCache: Chunk Size: 5M
2018/06/24 09:50:23 INFO : TestCache: Chunk Total Size: 10G
2018/06/24 09:50:23 INFO : TestCache: Chunk Clean Interval: 1m0s
2018/06/24 09:50:23 INFO : TestCache: Workers: 4
2018/06/24 09:50:23 INFO : TestCache: File Age: 6h0m0s
2018/06/24 09:50:23 DEBUG : Adding path "cache/expire" to remote control registry
2018/06/24 09:50:23 DEBUG : Adding path "cache/stats" to remote control registry
2018/06/24 09:50:23 DEBUG : Cache remote TestCache:: list ''
2018/06/24 09:50:23 DEBUG : : list: cold listing: 2018-06-24 03:50:08.901053886 +0100 BST
2018/06/24 09:50:23 DEBUG : : list: read 2 from source
2018/06/24 09:50:23 DEBUG : : list: source entries: [excluded normal]
2018/06/24 09:50:23 DEBUG : : list: cached object: excluded
2018/06/24 09:50:23 DEBUG : : list: cached object: normal
2018/06/24 09:50:23 DEBUG : : list: cached directories: 0
2018/06/24 09:50:23 DEBUG : : list: cached dir: '', cache ts: 2018-06-24 09:50:23.953566254 +0100 BST m=+0.032286330
2018/06/24 09:50:23 DEBUG : excluded: Size and modification time the same (differ by 0s, within tolerance 1ns)
2018/06/24 09:50:23 DEBUG : excluded: Unchanged skipping
2018/06/24 09:50:23 DEBUG : normal: Size and modification time the same (differ by 0s, within tolerance 1ns)
2018/06/24 09:50:23 DEBUG : normal: Unchanged skipping
2018/06/24 09:50:23 INFO : Cache remote TestCache:: Waiting for checks to finish
2018/06/24 09:50:23 INFO : Cache remote TestCache:: Waiting for transfers to finish
2018/06/24 09:50:23 INFO : Waiting for deletions to finish
2018/06/24 09:50:23 INFO :
Transferred: 0 Bytes (0 Bytes/s)
Errors: 0
Checks: 2
Transferred: 0
Elapsed time: 0s
2018/06/24 09:50:23 DEBUG : 8 go routines active
2018/06/24 09:50:23 DEBUG : rclone: Version "v1.42-010-g935533e5" finishing with parameters ["rclone" "-vv" "sync" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:23 DEBUG : Cache remote TestCache:: Services stopped
Sync with --delete-excluded
$ rclone -vv sync --exclude excluded --delete-excluded /tmp/source/ TestCache:
2018/06/24 09:50:47 DEBUG : rclone: Version "v1.42-010-g935533e5" starting with parameters ["rclone" "-vv" "sync" "--exclude" "excluded" "--delete-excluded" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:47 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2018/06/24 09:50:47 DEBUG : TestCache: wrapped local:/tmp/rclone_cache_test at root
2018/06/24 09:50:47 INFO : TestCache: Cache DB path: /home/ncw/.cache/rclone/cache-backend/TestCache.db
2018/06/24 09:50:47 INFO : TestCache: Cache chunk path: /home/ncw/.cache/rclone/cache-backend/TestCache
2018/06/24 09:50:47 INFO : TestCache: Chunk Memory: true
2018/06/24 09:50:47 INFO : TestCache: Chunk Size: 5M
2018/06/24 09:50:47 INFO : TestCache: Chunk Total Size: 10G
2018/06/24 09:50:47 INFO : TestCache: Chunk Clean Interval: 1m0s
2018/06/24 09:50:47 INFO : TestCache: Workers: 4
2018/06/24 09:50:47 INFO : TestCache: File Age: 6h0m0s
2018/06/24 09:50:47 DEBUG : Adding path "cache/expire" to remote control registry
2018/06/24 09:50:47 DEBUG : Adding path "cache/stats" to remote control registry
2018/06/24 09:50:47 DEBUG : Cache remote TestCache:: list ''
2018/06/24 09:50:47 DEBUG : excluded: Excluded from sync (and deletion)
2018/06/24 09:50:47 DEBUG : : list: warm 2 from cache for: , expiring on: 2018-06-24 15:50:23.953566254 +0100 BST
2018/06/24 09:50:47 DEBUG : : list: cached entries: [excluded normal]
2018/06/24 09:50:47 INFO : Cache remote TestCache:: Waiting for checks to finish
2018/06/24 09:50:47 DEBUG : normal: Size and modification time the same (differ by 0s, within tolerance 1ns)
2018/06/24 09:50:47 DEBUG : normal: Unchanged skipping
2018/06/24 09:50:47 INFO : Cache remote TestCache:: Waiting for transfers to finish
2018/06/24 09:50:47 INFO : Waiting for deletions to finish
2018/06/24 09:50:47 DEBUG : excluded: removing object
2018/06/24 09:50:47 DEBUG : : cache: expired
2018/06/24 09:50:47 INFO : excluded: Deleted
2018/06/24 09:50:47 INFO :
Transferred: 0 Bytes (0 Bytes/s)
Errors: 0
Checks: 2
Transferred: 0
Elapsed time: 0s
2018/06/24 09:50:47 DEBUG : 8 go routines active
2018/06/24 09:50:47 DEBUG : rclone: Version "v1.42-010-g935533e5" finishing with parameters ["rclone" "-vv" "sync" "--exclude" "excluded" "--delete-excluded" "/tmp/source/" "TestCache:"]
2018/06/24 09:50:47 DEBUG : Cache remote TestCache:: Services stopped
Resync with --delete-excluded
$ rclone -vv sync --exclude excluded --delete-excluded /tmp/source/ TestCache:
2018/06/24 09:51:44 DEBUG : rclone: Version "v1.42-010-g935533e5" starting with parameters ["rclone" "-vv" "sync" "--exclude" "excluded" "--delete-excluded" "/tmp/source/" "TestCache:"]
2018/06/24 09:51:44 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2018/06/24 09:51:44 DEBUG : TestCache: wrapped local:/tmp/rclone_cache_test at root
2018/06/24 09:51:44 INFO : TestCache: Cache DB path: /home/ncw/.cache/rclone/cache-backend/TestCache.db
2018/06/24 09:51:44 INFO : TestCache: Cache chunk path: /home/ncw/.cache/rclone/cache-backend/TestCache
2018/06/24 09:51:44 INFO : TestCache: Chunk Memory: true
2018/06/24 09:51:44 INFO : TestCache: Chunk Size: 5M
2018/06/24 09:51:44 INFO : TestCache: Chunk Total Size: 10G
2018/06/24 09:51:44 INFO : TestCache: Chunk Clean Interval: 1m0s
2018/06/24 09:51:44 INFO : TestCache: Workers: 4
2018/06/24 09:51:44 INFO : TestCache: File Age: 6h0m0s
2018/06/24 09:51:44 DEBUG : Adding path "cache/expire" to remote control registry
2018/06/24 09:51:44 DEBUG : Adding path "cache/stats" to remote control registry
2018/06/24 09:51:44 DEBUG : Cache remote TestCache:: list ''
2018/06/24 09:51:44 DEBUG : excluded: Excluded from sync (and deletion)
2018/06/24 09:51:44 DEBUG : : list: cold listing: 2018-06-24 03:50:47.760431914 +0100 BST
2018/06/24 09:51:44 DEBUG : : list: read 1 from source
2018/06/24 09:51:44 DEBUG : : list: source entries: [normal]
2018/06/24 09:51:44 DEBUG : : list: cached object: normal
2018/06/24 09:51:44 DEBUG : : list: cached directories: 0
2018/06/24 09:51:44 DEBUG : : list: cached dir: '', cache ts: 2018-06-24 09:51:44.603869892 +0100 BST m=+0.026212905
2018/06/24 09:51:44 INFO : Cache remote TestCache:: Waiting for checks to finish
2018/06/24 09:51:44 DEBUG : normal: Size and modification time the same (differ by 0s, within tolerance 1ns)
2018/06/24 09:51:44 DEBUG : normal: Unchanged skipping
2018/06/24 09:51:44 INFO : Cache remote TestCache:: Waiting for transfers to finish
2018/06/24 09:51:44 INFO : Waiting for deletions to finish
2018/06/24 09:51:44 INFO :
Transferred: 0 Bytes (0 Bytes/s)
Errors: 0
Checks: 1
Transferred: 0
Elapsed time: 0s
2018/06/24 09:51:44 DEBUG : 6 go routines active
2018/06/24 09:51:44 DEBUG : rclone: Version "v1.42-010-g935533e5" finishing with parameters ["rclone" "-vv" "sync" "--exclude" "excluded" "--delete-excluded" "/tmp/source/" "TestCache:"]
2018/06/24 09:51:44 DEBUG : Cache remote TestCache:: Services stopped