Union remote with custom filters

What is the problem you are having with rclone?

I'm trying to have a union over 2 remotes, but want to have routing on where files should go.

Remote A contains only PDF files.
Remote B contains only XLSX files.

They both have the same below folder structure:

  • 2020
    • January
    • February
    • March
      ...
  • 2019
    ...
    ...

I would like to have a single union remote named Budget so I can mount and work with all files.
Most importantly, I want to just drop a PDF file in, and it will be transfer to remote A, while a XLSX file will go to remote B.

I have read through the docs for Union remote and I'm not sure it is possible, but I want to ask for help on this.

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: darwin/amd64
  • go version: go1.15.4

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

darwin/amd64

Which cloud storage system are you using? (eg Google Drive)

Local

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy ~/Downloads/December.2020.Paycheck.pdf Budget:2020/December/
rclone copy ~/Downloads/December.Expenses.2020.xslx Budget:2020/December/

The rclone config contents with secrets removed.

[A]
type = alias
remote = /mnt/storage/A

[B]
type = alias
remote = /mnt/storage/B

[Budget]
type = union
upstreams = A: B:

This isn't possible at the moment. The only selections you can have for which union files go to is based on free space or existing directories.

If you had a directory structure like this

  • PDF
    • 2020
      • Jan
      • Feb
    • 2019
      • Jan
  • XLS
    • 2020
      • Jan
      • Feb
    • 2019
      • Jan

You could make it work by making sure the XLS and PDF directories were only on the corresponding remotes and not on both remotes.

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