Torrent like usage?

I have been using IPFS for a few days and I do see potential for it, but there are some things that discourage me.

For example when I add a file to IPFS, first I either ipfs add -r directory or ipfs add -w file (to get it in a directory and save the filename) and then ipfs pin add <hash for the directory>.

Then as I know my laptop isn’t online 24/7, I ssh to my VPS and run ipfs pin add <hash for the directory> there too so the content is available all the time.

This is where I encounter my biggest disappointment and is where I compare to torrents:

  • I add a torrent to my bittorrent daemon (transmission in practice) and it will start downloading (or finding peers or whatever it does in the background) and if there are no seeds available, it will just remember the torrent forever until it can begin, no matter does the network go down or anything that happens.
  • I ipfs pin add content, I don’t know anything it is doing, there is just blank until I hopefully see pinned <hash> recursively, but I am as likely to see something like Error: Post EOF.

I don’t know how to format what my issue is, so I cannot search it, so I hope it’s OK to ask here: are there any issues I could follow or plans to make IPFS seem more like a Bittorrent and instead of silence tell me “started attempting to pin HASH” and keep doing that until it has the content?

It would probably bring other issues like me being unaware of when IPFS has downloaded the content, but maybe there could be another command for that such as ipfs process hash or ipfs status hash that could be put into watch command?

1 Like

I don’t know the answers to all of your questions and concerns off the top of my head, but I have some initial thoughts.

Your torrents don’t ever get marked as “stalled” and then stop attempting to download? This is something I see a lot for poorly-seeded torrents.

You can get some idea of the progress if you use ipfs pin add --progress <hash>.

to expand upon @leerspace’s post,

this really is not necessary. anything you add to IPFS is already pinned to your datastore, meaning you don’t have to run the pin command on your device. the only time this isn’t the case is if you run ipfs add --pin=false to upload your file, which i haven’t seen a good use case for yet.

No, I haven’t ever seen that even if I am using transmission-daemon.

Thanks, I will keep that in mind.

Oh, I see.

However my main question is still unanswered on if I can somehow use IPFS closer to how torrents work and not have pinning material my laptop is seeding fail by itself while both are offline and it would be nice if I could pin material at third devices while both others are down and have the IPFS there get the content as I get either of the seeds up.

I don’t know of a way to do this and I can’t find any existing issues for it. It might be worth creating a new one for this kind of persistent long-running pin functionality in the issue tracker:

Alternatively, it shouldn’t be too difficult to write a script that does this. It could repeatedly run the pin command for a given hash – or list of hashes – until it completes. You can check if something is pinned by checking if it’s contained in the ipfs pin ls --type=recursive output.