Pin 100k hashes on own IPFS cluster

355 views Asked by At

I am running an IPFS cluster in the cloud and I would like to pin about 100k hashes of objects from the network.

I'm currently iterating through the list using the ipfs pin add <hash>, but it's taking forever (as some hashes can't be found immediately or take long time to be found)

Is there a way to request a IPFS node/cluster to pin add hashes in batches? A best effort approach would suffice as I know some hashes may have disappeared or not be reacheable anymore.

Is there a way to achieve this quickly?

1

There are 1 answers

1
loops On

You can stream a list of files to ipfs pin add on STDIN. Here, /path/to/hashes is a file with one IPFS hash on each line:

ipfs pin add < /path/to/hashes

You can also pass the --progress flag to see the current pinning progress.