--drive-server-side-across-configs

I've been using --drive-server-side-across-configs with the latest builds. It is working beautifully, for the most part. I have a couple of questions about behavior and interaction with other flags:

  1. With most rclone flags if you add the same flag twice in a script the latest flag overrides the earlier flag. For example if I run rclone copy a: b: --transfers=5 --transfers=10 then rclone will run with transfers=10.
    However with --drive-server-side-across-configs if I run rclone copy a: b: --drive-server-side-across-configs=true --drive-server-side-across-configs=false the copy runs server side, seeming to ignore the second command.

I won't explain why I might do this (script) as there are easy enough workarounds. But I wasn't sure if this was intended / correct behavior or if it is unintentional. Or perhaps my syntax is wrong for this new flag?

  1. If I use --drive-server-side-across-configs=true and --disable move,copy in an rclone command, regardless of which sequence I use them the --drive-server-side-across-configs seems to override --disable move,copy. Not sure if this is correct or if maybe the latter is deprecated?

Otherwise the new flag is working nicely and rclone continues to get faster and more stable with every release. As always, thanks to your team.:+1:

Not 100% sure why! If you were hoping that a: will have --drive-server-side-across-configs=true and b: --drive-server-side-across-configs=true then that won't work - the flag will apply to both remotes.

So supplying the flag twice doesn't really make sense.

My reading of the code is that if you supply --disable move,copy then it won't do server side moves regardless. Can you post a command with its output with -vv showing the problem?

No, not trying to apply different flags to different remotes (even the idea wouldn't make sense as the action would be a server-side copy/move from a to b, or not. :joy:

It was in the context of a script where certain file types still won't copy server-side on gdrive (m2ts, mk3d, others) so I was inserting dssac=false to do a sweep of those files with a normal download/upload rclone sync.

There are plenty of other ways around this, which I am using now. But the point of the question is whether this behavior where the second occurrence of the flag does not override the first is intended or not. With other flags the final occurrence overrides earlier ones in an rclone command (as noted in the original post). The same idea as command line flags overriding the same flags that may exist in the config file.

If this is intended and correct, it's fine. Only pointing it out in case it was not intended.

:wink:

Actually I would call it undefined behaviour!

Ideally spf13/pflag would warn about this, but it doesn't alas.

Actually I even made an issue about this some time ago!

Thank you for checking. Understood, and no problem.

1 Like

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