Hacker News new | past | comments | ask | show | jobs | submit login

Considering I want to use this as it is meant to be used, distributed, how do I pin all of say https://ipfs-sec.stackexchange.cloudflare-ipfs.com/ham/ (including the search) to my local IPFS node so I can use it offline?



Normally you would go about it like this:

    dig +short txt _dnslink.ipfs-sec.stackexchange.cloudflare-ipfs.com
^ will get you the root hash. Then for finding the hash of that particular directory:

    ipfs resolve /ipfs/QmVsEiBRsdiHMvmDVJTNtrXNqSKYdtoepcoZxUrQ8rU7qR/ham
But unfortunately it errors, probably because it's a HAMT sharded directory and the `resolve` call hasn't been changed to accept them yet. There is a open issue about it here: https://github.com/ipfs/go-ipfs/issues/5270

Edit: Actually found a work-around.

Loading up the hash via our IPLD Explorer reveals the (re-)name of the directory, which happens to be `05ham` and we can call `resolve` on that: "ipfs resolve /ipfs/QmVsEiBRsdiHMvmDVJTNtrXNqSKYdtoepcoZxUrQ8rU7qR/05ham"

Then we get the `/ipfs/zdj7WZpLoZYr4AoDUdpCNBVHLi1S8y6muFoCgwUa9kmxUpYCr` hash which you can use for pinning.


Now we just need a browser extension that does all that.

If pinning was a button press away it would be much more attractive than making a dns query, resolve the result and pinning that.


Indeed, that's a good idea! I took the freedom to open a issue about this idea on the repository for the IPFS-Companion extension here: https://github.com/ipfs-shipyard/ipfs-companion/issues/581


So I've been trying to get "ipfs pin add --progress /ipfs/zdj7WZpLoZYr4AoDUdpCNBVHLi1S8y6muFoCgwUa9kmxUpYCr" to complete but it just takes hours and hours. Is this normal? What might be the issue?


Does it get stuck or are you still seeing that blocks are being fetched? If it's still increasing, it's just very large. You can check the download rate by doing `ipfs stats bw --poll`.

Weird thing is, I'm not seeing anyone providing it but I can still pin it. Currently on `Fetched/Processed 1661 nodes` but I'll leave it running and see if it finishes.

But doing `ipfs dht findprovs zdj7WZpLoZYr4AoDUdpCNBVHLi1S8y6muFoCgwUa9kmxUpYCr` should list everyone who is providing it, but I'm getting no responses, which is weird.

Edit: Hm, got stuck at 2007 blocks, are you seeing the same thing?


Fetched/Processed 6077 nodes

and ~/.ipfs is not even 40 Megabytes...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: