Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Story: Generate a New IPFS Pack from Existing IPFS Content #90

Open
flyingzumwalt opened this issue Jan 15, 2017 · 1 comment
Open

Story: Generate a New IPFS Pack from Existing IPFS Content #90

flyingzumwalt opened this issue Jan 15, 2017 · 1 comment

Comments

@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented Jan 15, 2017

Motivation:
I have the hash of a directory that was previously added to IPFS, I want to build an IPFS pack containing the files & directories corresponding to the hash.

Note: ipget could be the tool (or starting point for a tool) to do this -- give it an ipfs hash and it will build packs from the existing ipfs content/blocks.

Acceptance Scenario

Given

  • Andrew has added /a/bb/c1 to ipfs. The contents of the directory at 5GB.
  • Janelle wants to use a copy of that directory

Then

  • Janelle replicates the blocks into her ipfs repository using the root hash corresponding to the directory
  • Janelle generates/exports a new ipfs pack using the root hash corresponding to the directory
  • Janelle registers the ipfs-pack with her ipfs node
  • Janelle un-pins the blocks in her ipfs node's repository

When Janelle is done replicating the data and running GC,

  • Both Andrew and Janelle have the complete directory on their local machines.
  • The new ipfs pack on Janelle's machine should matches the original directory on Andrew's machine.
  • Janelle has only one copy of the data on her machine -- she does not have a redundant copy in a .ipfs repo

Needs Clarification:

  • What API methods does janelle use to do this?
@flyingzumwalt
Copy link
Contributor Author

@whyrusleeping the fastest & dirtiest way to do this would be to 'ipfs get' all the stuff you want, piping it to somewhere on the local file system, and then build a pack using 'ipfs pack'.

Is there a more efficient option? Is there a way to avoid re-building/recalculating the DAG for the pack Manifest since that info is already in ipfs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant