I've successfully been using rclone with B2 Backblaze for more than a year now. I've never had to use the backed up files. Until now.
For most files I've disabled "versions". So every sync (that has file change) will overwrite the existing backed up file. All good.
But for some files I've been using B2's versions feature because I did want to keep old versions of a file.
In the B2 UI every such versioned file is created as a directory with the same name and then the latest version of the file under it.
It turns out this is also how the api "presents" the files. So when I copy from B2 all files with versions turned on turns out like that. I had expected that the structure would be flattened to actually match the structure being synced.
rclone copy remote:bucket/* ./
Is there any way to flatten this automatically using rclone? If now how has other dealt with this?
After reading the issue I can see how that could solve the issue, but to me this seems to be moving an implementation detail in into user space.
My case is like this:
then I edit the file
So really to me (as a user) there is really just the file and no directories.
Flatten as described by the issue owner seems be a generic flattening solution where the user wants to only get the files without preserving however many levels of directories (customizable or not). Whereas in my case I don't want to flatten files unless they are files in directories that were created by the version feature.
This is an implementation detail at B2 that they chose to represent versions this way.
I don't think --flatten is a fit for this.
In this case I don't want:
To me --flatten signals a desired behavior that is different what my case. IMO the rclone copy or rclone sync should deal (if possible) with this transparently.