I'm looking to sync all files from Google Drive to a local directory even if the objects share a path (aka: "Duplicate object found in source - ignoring").
Is there an option to just append to the path in the destination directory with the hash of the file itself? That way future syncs are possible and changes are observable. If all 2..N files are the same, then they would result in just a single outputted file in the target directory.
E.g.
gdrive_source
/file1.txt
/file1.txt
target
/file1.txt.md5hash1
/file1.txt.md5hash2
#### Run the command 'rclone version' and share the full output of the command.
rclone version
rclone v1.66.0
os/version: ubuntu 22.04 (64 bit)
os/kernel: 5.15.0-100-generic (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.22.1
go/linking: static
go/tags: none
#### Which cloud storage system are you using? (eg Google Drive)
Google Drive is my source
#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)
#### Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
<!-- You should use 3 backticks to begin and end your paste to make it readable. -->
Double check the config for sensitive info before posting publicly
#### A log from the command that you were trying to run with the `-vv` flag
<!-- You should use 3 backticks to begin and end your paste to make it readable. Or use a service such as https://pastebin.com or https://gist.github.com/ -->
Isn't dedupe the most obvious solution? This is less or more exactly reason it was implemented.
There might be myriad other ways to achieve it like your idea with attaching hashes but IMO dedupe fulfils requirement of the most users in this situation. Sure there might be some special, niche cases when other approach would be more appropriate but then we are talking about very custom implementation benefiting very few users, maybe only you - for sure doable. But most likely either it has to to come from your in form of PR or sponsorship.
If you have dupes, you will get randomish results as it depends on how the API gives you the 'first' file back.
Running any command with dupes will have some chaos in there so you really, really should dedupe your data.
texter@Earls-Mac-mini test % rm hosts.txt
texter@Earls-Mac-mini test % rclone copy GD:dupes /Users/texter/Downloads/test
2024/03/26 11:49:11 NOTICE: hosts.txt: Duplicate object found in source - ignoring
texter@Earls-Mac-mini test % cat hosts.txt
second file%
texter@Earls-Mac-mini test % rclone ls GD:dupes
11 hosts.txt
10 hosts.txt
texter@Earls-Mac-mini test % rclone lsl GD:dupes
11 2024-03-26 11:47:36.170000000 hosts.txt
10 2024-03-26 11:47:20.751000000 hosts.txt
I seem to always get the 'newest' file. Is that the right one though?I ran that command 50 times and got the 2nd file every time. First file would be 'gone/lost'.