Greetings!
I’d want some rsync-like file replication on top of IPFS. filestore
feature is definitely part of the solution.
Yet I can’t figure out how to fetch/download files directly to filestore.
Yes, I imagine I could get file, store it, then GC then re-add the file but this is weird.
Is there a sane way to do that?
Wait, what do you mean? If you want the filestore, you’re putting the files into some part of the filesystem you control. So doing rsync … foo/. && ipfs add -r --nocopy foo
should not be a problem? You don’t mean mfs (ipfs files
) by any chance?
For content replication, you may want to have a look at IPFS Cluster
The idea here is:
if I do ipfs get /ipfs/Qm.../readme
then ipfs gets the file into .ipfs/blocks
and puts the requested file in the current folder.
This is double of space of the file.
I’d prefer an option that: ipfs get --OPTION /ipfs/Qm.../readme
would land the file and add it as filestore piece without spoiling .ipfs/blocks
with the full file volume (virtually ipfs add --nocopy FILE).
I’m about to create an FR in the issue tracker on this.
Ah. I believe that has been requested before. I think the reason that got relatively low priority is that ipfs get
+ ipfs add --nocopy
will indeed place the file in the repository and on disk, but the copy in the repository should be GCed away. More worrying is that the hash may not be the same after the ipfs add.
Seems I have good google fu today. https://github.com/ipfs/go-ipfs/issues/3981
Indeed, thanks a lot. I’m new guy in town.