# Place downloaded (or cached) files directly to filestore

**URL:** <https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114>\
**Category:** Help\
**Created:** [June 1, 2020, 9:25am UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114 "2020-06-01T09:25:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ildar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ildar/32/3252_2.png) [@ildar](https://discuss.ipfs.tech/u/ildar)\
**Post date:** [June 1, 2020, 9:25am UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/1 "2020-06-01T09:25:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![caesar](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@caesar](https://discuss.ipfs.tech/u/caesar)\
**Post date:** [June 1, 2020, 2:53pm UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/2 "2020-06-01T14:53:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Akita](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/akita/32/2650_2.png) [@Akita](https://discuss.ipfs.tech/u/Akita)\
**Post date:** [June 3, 2020, 9:21am UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/3 "2020-06-03T09:21:23Z")

</div>

For content replication, you may want to have a look at [IPFS Cluster](https://cluster.ipfs.io/)

---

<div class="post-metadata">

**Author:** ![ildar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ildar/32/3252_2.png) [@ildar](https://discuss.ipfs.tech/u/ildar)\
**Post date:** [June 4, 2020, 11:18am UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/4 "2020-06-04T11:18:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![caesar](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@caesar](https://discuss.ipfs.tech/u/caesar)\
**Post date:** [June 4, 2020, 1:02pm UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/5 "2020-06-04T13:02:30Z")

</div>

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](https://github.com/ipfs/go-ipfs/issues/3981)

---

<div class="post-metadata">

**Author:** ![ildar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ildar/32/3252_2.png) [@ildar](https://discuss.ipfs.tech/u/ildar)\
**Post date:** [June 4, 2020, 1:17pm UTC](https://discuss.ipfs.tech/t/place-downloaded-or-cached-files-directly-to-filestore/8114/6 "2020-06-04T13:17:31Z")

</div>

Indeed, thanks a lot. I’m new guy in town.  
👍🏻
