casync icon indicating copy to clipboard operation
casync copied to clipboard

extract and use a local store as a cache

Open alban opened this issue 6 years ago • 3 comments

The documentation just says:

--extra-store=<PATH>: Additional chunk store to look for chunks in

But it does not say how casync decides the priority between the main store (--store= or $CASYNC_STORE) and the extra stores.

My use case is to extract the data from a remote (http://172.17.0.2/rootfs.caidx) and use the remote store as necessary (--store=http://172.17.0.2/store/) but with a local cache (--extra-store=/var/cache/casync/store/) common to all my images. I want to populate the local cache with the missing chunks whenever I run the casync extract command.

So when I run casync extract a second time, it does not need to download big files from the remote store a second time. But it does not seem to update the local store with the missing chunks...

Is there a combination of options to achieve that?

alban avatar Sep 28 '17 15:09 alban

+1

sigurdteigen avatar Oct 22 '17 09:10 sigurdteigen

From the source, --store= is considered writable; all --extra-store= sources are read-only. So if this support were to be implemented, I'd expect you'd want --store= to point at the local location and --extra-store= to be remote.

Not that this works as-is; see #104.

charles-dyfis-net avatar Oct 30 '17 22:10 charles-dyfis-net

FYI --

A 3rd-party client implementing this support is available; see https://github.com/folbricht/desync

charles-dyfis-net avatar Nov 10 '17 17:11 charles-dyfis-net