Closed hacdias closed 5 years ago
An alternative way, for now, could be to first pin to make sure we have all the contents in the repo. Is there any command similar to pin that fetches recursively something to the repo but does not pin?
@hacdias We should avoid using low level pins here. I believe ipfs refs --recursive <CID>
is what you want. It lists all children of the root CID, which has a side-effect of preloading all content to the local repo :)
A way to solve this, for now, is to call ipfs get $cid
and ignore the results or ipfs refs -r $cid
before copying to MFS. That way we can get everything block.
Oh, sorry. Replied and what you said hasn't been loaded before. I'll PR.
I created https://github.com/ipfs-shipyard/cohosting/issues/6 to discuss idea of "Lazy cohosting" that takes advantage of how ipfs files cp
works.
While working on
cohosting.sh
andipfs-cohost
, I noticedipfs files cp
does not ensure recursive content. It just links the hash to a certain place in MFS and only fetches it if the user actually goes there.Even though having a directory on MFS prevents it from being garbage collected, it does not get recursively fetched when copying for the first time.
/cc @lidel @autonome