folbricht / desync

Alternative casync implementation
BSD 3-Clause "New" or "Revised" License
343 stars 44 forks source link

[Question] Should Mtree be able to handle .caibx #249

Open bearrito opened 1 year ago

bearrito commented 1 year ago

From the README mtree - Print the content of an archive or index in mtree-compatible format. However this doesn't seem to work with a blob.

#mtree v1.0
Error: unsupported element desync.FormatIndex in archive
charles-dyfis-net commented 1 year ago

A caibx file doesn't have any directory entries to build a mtree for. It's not an "archive" in the relevant meaning, just a blob -- think a .gz file instead of a tar.gz or cpio.gz.

bearrito commented 1 year ago

I seem to able to replicate this even with an archive

/usr/local/go/bin/desync tar -i -s /tmp/chunkstore/ /tmp/indices/23.1.5.archive.caidx /mnt/new/opt/locusrobotics/
/usr/local/go/bin/desync mtree /tmp/indices/23.1.5.archive.caidx
#mtree v1.0
Error: unsupported element desync.FormatIndex in archive
folbricht commented 1 year ago

When using mtree on an archive-index, you need the -i flag and also at least one -s store.

desync mtree -i -s tree.store/ tree.caidx

Whereas if you have a catar you can use mtree directly on it.

desync mtree tree.catar

Btw, make sure to update, I fixed an issue in the mtree command

bearrito commented 1 year ago

My mistake. I'll update and try again.