What does `ipfs filestore dups` mean?

Hi,

From the help and implementation of ipfs filestore dups, my understanding is this command could check both filestore and mainblockstore then show the duplicated objects. Because I could not add the same file with and without —nocopy flags, I am a little bit confuse about when could I use ipfs filestore dups.

I test in commit Merge pull request #5611 from ipfs/features/streaming-ls-5600 · ipfs/kubo@b7a4853 · GitHub. My steps:

make install
~/go/bin/ipfs init
~/go/bin/ipfs deamon
(start another terminal)
~/go/bin/ipfs add README.md
(exit ipfs daemon by pressing Ctrl+c)
~/go/bin/ipfs config --json Experimental.FilestoreEnabled true
~/go/bin/ipfs daemon
~/go/bin/ipfs add --nocopy README.md
~/go/bin/ipfs filestore ls
(no output)
~/go/bin/ipfs filestore dups
(no output)

Thanks

Hi @bjzhang,

There are several things going on

(1) Files added with --nocopy imply --raw-leaves so you need to specify in order to get the same hash when adding files without the --nocopy.

(2) You might need to reverse the order, that is first the file with --raw-leaves --nocopy then with just --raw-leaves.

(3) Due to what is probably a bug, it seams ipfs will not complain if a file can not be added via the filestore due to path restrictions and instead add it normally.

Kevin

(1) Files added with --nocopy imply --raw-leaves so you need to specify in order to get the same hash when adding files without the --nocopy.

Got it.

(2) You might need to reverse the order, that is first the file with --raw-leaves --nocopy then with just --raw-leaves.

Thanks. It works.

(3) Due to what is probably a bug, it seams ipfs will not complain if a file can not be added via the filestore due to path restrictions and instead add it normally.

Sorry what’s your mean “path restrictions”?