kubo icon indicating copy to clipboard operation
kubo copied to clipboard

`ipfs dag export --ignore-missing-blocks`

Open lidel opened this issue 7 months ago • 0 comments

Checklist

  • [x] My issue is specific & actionable.
  • [x] I am not suggesting a protocol enhancement.
  • [x] I have searched on the issue tracker for my issue.

Description

This is a feature request extracted from https://github.com/ipfs/ipfs-webui/issues/2380#issuecomment-2942278113

WebUI users would like to have an ability to export/import MFS as a potentially partial CAR (without prefetching non-local blocks)

General idea

  • Kubo: add --ignore-missing-blocks to both dag import|export
    • this would allow for ipfs dag export --ignore-missing-blocks --offline $(ipfs files stat / | head -1) that would effectively do the same "local-only" DAG walk as Reprovider.Strategy=mfs and output blocks to a CAR
    • ipfs dag import would error if both --pin-roots and --ignore-missing-blocks are passed
  • Webui (tracked in https://github.com/ipfs/ipfs-webui/issues/2380, here only for context)
    • Files → Import → From CAR in WebUI would have a checkboxes for controlling --pin-roots and --skip-missing-blocks before proceeding with import.
    • Files → Export CAR in WebUI would show modal which would allow user to do export via ipfs.dag.export and uncheck --ignore-missing-blocks --offline.

lidel avatar Jun 06 '25 18:06 lidel