casync icon indicating copy to clipboard operation
casync copied to clipboard

[Question] Is it possible to update chunk store

Open elfgoh opened this issue 7 years ago • 3 comments

Say I have an image a.img which I used to create a chunk store: casync make foobar.caibx a.img.

Later on, I have another img, b.img. b.img is meant to be an upgraded version of a.img.

How do I update the chunk store that was created based on a.img? What is the workflow like?

elfgoh avatar May 14 '18 09:05 elfgoh

  1. Create the chunk store (default saved in folder default.castr) from a.img: casync make foobar-a.caibx a.img
  2. Update the chunk store with the b.img file chunks (it uses the same default.castr folder and only the new/non-duplicated chunks are saved): casync make foobar-b.caibx b.img
  3. Reconstruct the a.img or b.img: casync extract [path-to-caibx-files]/foobar-a.caibx a-copy.img casync extract [path-to-caibx-files]/foobar-b.caibx b-copy.img

mihais avatar May 14 '18 09:05 mihais

I see. So the chunk store default.castr gets bigger over time. Say I am certain that I no longer need a.img. Is there a way to update the chunk store so that unnecessary chunks can be discarded?

elfgoh avatar May 14 '18 14:05 elfgoh

If you have a default.castr that contains a.img, b.img, c.img and you want to keep only b.img and c.img: casync -v gc b.img c.img

mihais avatar May 14 '18 19:05 mihais