Rclone multiple source

Ive looked through the documentation, and also older threads with similar questions but i cant understand how to do this.

I want to check/copy multiple sources -> remote:dir
I think my problem lies with the --include syntax.

Im on windows so "/home/dir/" doesnt apply

I tried with:
rclone --include C:/path/to/include/** check localpath remote:path

and other commands similar to it but it doesnt work, can anyone help?

Thanks

edit: i found now that the path is relative, but i want to include several driveletters in the include so i want X:/something and Y:/something to be included when copying C:/something to remote:path

create a batch file

rclone c:\something remote:csomething
rclone x:\something remote:xsomething
rclone y:\something remote:ysomething

I don't think that is possible to have a sync span more than one drive due to the way the Windows file system works.

Would it work on remotes though potentially?
Because this (multiple sources, or especially, multiple destinations) is a feature I have been thinking about before.

If you wanted to sync remote1 to remote2, 3 and 4 - then it is quite inefficient to have to re-list remote1 3 times redundantly.

As described below - you can kind of work around this with a union for the source, but it can't work for the destination. Although... when hopefully you get the time to rewamp union later then it would also be possible for the destination (by setting all 3 destinations to write-mode).

Still - a more intuitive way of defining it on the fly would be nice though by having a way rclone could accept multiple source and destination arguments. Just a thought for the future, but probably not very high priority as it's "only" an optimization/convenience thing.

1 Like

@user_4534

asdffdsa's solution is clearly the simplest and most straightforward.
That said ,you could accomplish this via a union remote as well if you really needed it all to be one command. That would have the benefit of only needing to list the external remote once for the operation.

If you added this remote to your config:
[all_something]
type = union
remotes = c:\something x:\something y:\something

then you could sync like this...
rclone sync all_something: remote:/path

in this setup all_something will be a virtual merge of all 3 folders. Do note that in case of multiple files with the exact same path and name, only one will be used, and the last location in the union will take priority (in this example that would be y:\something)

Not 100% sure I understand the full source-destination structure you have, but:

Does --copy-links work on windows?
-L, --copy-links Follow symlinks and copy the pointed to item.

If so create symlinks to the desired c: , x: and y: drive folders and put them all in in a single folder
c:/source/csomething
c:/source/xsomething
c:/source/ysomething

Create a local: remote in rclone pointing to c:/source.
https://rclone.org/local/

Then use command
rclone sync local: remote:somefolder --copy-links

  1. interesting idea.
  2. try it out and let us know
  3. take a look at my wiki, might give you a few ideas.
    https://github.com/rclone/rclone/wiki/How-to-enable-VSS-for-rclone

Nice, asdf :+1: I like the VSS approach.

Maybe the OP will try the symlink approach. I don't have a need for it atm :wink:

Here are a few of my misc script tools, fyi

Cheers all!
I think Union is what im looking for, that was new to me ^^