Private IPFS Data Replication - missing files in webui

Hello All,

I am trying to create a private ipfs network to replicate files between two sites - remote1 and remote2

I was able to get the webui working by importing the version 22.0 webui by doing

ipfs dag import ipfs-webui@v2.22.0.car on one site, which then made it available when i browser to

http://:5001/webui for both sites.

Once in the webui, I set up a custom pin service for remote1 pointing to remote2, and for remote2 pointing to remote 1.

On remote1, I did the following

user@ipfs:~/ipfs-tutorial$ ipfs add -w sample1GB.bin
added Qmc594YY9cxnoiS2GhoJ4ktaZnQmcdq4KphWZGC1rickn3 sample1GB.bin
added QmUXNWCxxKCK45weQDh6kCQWGVLBbaZJfokewETBgG1iun

user@ipfs:~/ipfs-tutorial$ ipfs files cp /ipfs/QmUXNWCxxKCK45weQDh6kCQWGVLBbaZJfokewETBgG1iun /testrepo

With this, on remote1 webui, under files, I can see the sample1GB.bin file.

I went into the webui for remote1 and for the folder testrepo and the file sample1GB.bin, i chose the “…” menu, then “Set pinning” and selected “Local node” and “remote2”

I saw in the network traffic under status, that an upload occured. I however, do not see the file in the webui for remote2.

What am I doing wrong? From remote1, it appears as though the files are pinned

user@ipfs:~/ipfs-tutorial$ ipfs pin remote ls --service=remote2
QmUXNWCxxKCK45weQDh6kCQWGVLBbaZJfokewETBgG1iun pinned testrepo
Qmc594YY9cxnoiS2GhoJ4ktaZnQmcdq4KphWZGC1rickn3 pinned sample1GB.bin

I am unsure of how to proceed. Any help is appreciated.

MFS (the file tab) doesn’t replicate, only the CID/data does when you pin. Also you don’t need the CID to show up in MFS if it’s pinned as the data is there just fine.

You can test this out by running the following on remote2:

ipfs pin ls | grep QmUXNWCxxKCK45weQDh6kCQWGVLBbaZJfokewETBgG1iun
ipfs pin ls | grep Qmc594YY9cxnoiS2GhoJ4ktaZnQmcdq4KphWZGC1rickn3

Each command should output the same CID, showing that they’re pinned on that node.

MFS is just a human-readable way to organize a local node (more-or-less). You can see your MFS via CLI using ipfs files ls / for example.

Thank you for that reply. If I wanted the MFS to show up on remote2, what do you think is the best strategy? I essentially want to make these files browseable from both sites. I was hoping the MFS replicated. Will I essentially have to publish a list of pinned CIDs and just re-create the MFS file tab on the other remote site?

Yes, unfortunately this is the best solution I can think of. If you ignored pinning altogether and just used MFS, that would work too. Items in MFS aren’t removed from garbage collection, items in MFS are fetched “lazily” (When you add a directory for example to MFS, the client will see this operation complete more-or-less immediately, and the node will download the data in the background).