Purpose of DuplicateFiles feature

What is the problem you are having with rclone?

I am working on a file system backend, that supports having multiple versions of the same file. I saw that there is a Fs feature called DuplicateFiles, but it looks like it is used only in fs_tests.go and dedupe_test.go. And when I set it to true, matchListings in march.go still filters duplicated entries. Did I misunderstand a purpose of that feature?

If not, I made small changes in march.go to fix that and would love to submit an MR.

What is your rclone version (output from rclone version)

v1.50.2

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Debian 10, 64bit

The Feature is used to detect whether rclone dedupe works on the backend.

March is supposed to pair up identical file names. If there is more than one of the same name then how do you choose which one? Rclone moans about it at the moment since likely sync is going to go wrong.

How do you see that working? Do some extra matching in march?

I'm interested to know what storage you are working on too!

Hi, Nick.

Thanks for the clarification. You are absolutely right, it doesn't work well with sync. It somewhat works - files are paired in the same order they were listed. Changed files are detected correctly, but all of them are pushed to the destination.

Our storage can have multiple files with the same path, that are ordered by modification time. Each time a file with existing path is pushed to it, it creates a separate version of the file instead of overriding it.

Some extra matching in march would work, but wouldn't be optimal and pretty. And it looks like I misunderstood a meaning of that feature.

Instead, I think I should give each separate file version a different path by including some metadata in it. And process this "meta-path" in the backend. Do you think that would work?

Take a look at the B2 backend and the --b2-versions flag. You could do something like that?

So normally multiple versions aren't visible but if you set that flag then they become visible with extra extensions.

Thank you very much, I sill take a look at b2

The docs is the best place to start: https://rclone.org/b2/#versions

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.