Rclone copy to webdav/combine with -include appears to be excluding top level dir

What is the problem you are having with rclone?

Using --include with the combine backend seems to be excluding the top level directory.

What I'm after:
The webdav source (/eos/webdavpool/data) contains many user directories, one of them being mine (myuser@mydomain.au). The user data is in this format:

$ ls /eos/webdavpool/data/myuser@mydomain.au
files  files_trashbin  files_versions  thumbnails

I'm trying to copy data just for individual users (example, myuser), as shown in the config file, and I'm after only the files folder and nothing else.

But it keeps excluding my entire user (myuser@mydomain.au) rather than myuser@mydomain.au/files_trashbin etc when I run the rclone command below.

I'm observing the same behavior when running the same command against webdav source:

$ rclone -vv --inplace --use-json-log --config .rclone_conf ls webdav:"/" --include "/files/**"
< redacted >
04T07:47:57.763876+00:00"}
{"level":"debug","msg":"Excluded","object":"lee@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.7639+00:00"}
{"level":"debug","msg":"Excluded","object":"lisa@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.764131+00:00"}
{"level":"debug","msg":"Excluded","object":"myuser@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.764113+00:00"}
<redacted>

How can I make this work?

If I do this, it works:

rclone -vv --inplace --use-json-log --config .rclone_conf ls primetenant:"/" --include "/myuser@mydomain./files/**"

However this doesnt seem ideal.
Is this a bug or did I make a mistake somewhere? Is there a better way to do this?

I did try using --exclude and -filter but both appear to include "files" in otherwise excluded directories (eg: myuser@mydomain.au/files_trashbin/files), unless I refine them with more rules. Due to the size and number of files I'm dealing with, this indicates a potential performance issue because it will need to do a walk of directories containing potentially a lot of files (more than 500k) and I worry that I may get a performance impact.

Rclone version:

2024/01/04 07:35:43 DEBUG : rclone: Version "v1.63.0" starting with parameters ["rclone" "version"]
rclone v1.63.0
- os/version: redhat 7.9 (64 bit)
- os/kernel: 3.10.0-1160.102.1.el7.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.5
- go/linking: static
- go/tags: none
2024/01/04 07:35:43 DEBUG : rclone: Version "v1.63.0" finishing with parameters ["rclone" "version"]

Which cloud storage system are you using?

Source: EOS webdav
Destination: SFTP (using the combine backend)

The command you were trying to run

rclone -vv --inplace --use-json-log --config .rclone_conf ls sftpcloud:"/" --include "/files/**"

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[webdav]
type = alias
remote = /eos/webdavpool/data/

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=webdav:/myuser@mydomain.au/"

[source]
type = hasher
remote = sftpcloud:
hashes = md5
max_age = 1s

[destination]
type = sftp
host = sftpcloud.mydomain.au
user = migration
pass = mysuperstrongpass
port = 22
disable_hashcheck = false
chunk_size = 255k
shell_type = unix

A log from the command that you were trying to run with the -vv flag

{"level":"debug","msg":"Version \"v1.63.0\" starting with parameters [\"rclone\" \"-vv\" \"--inplace\" \"--use-json-log\" \"--config\" \".rclone_conf\" \"ls\" \"sftpcloud:/\" \"--include\" \"/files/**\"]","object":"rclone","objectType":"string","source":"cmd/cmd.go:422","time":"2024-01-04T07:43:45.465042+00:00"}
{"level":"debug","msg":"Creating backend with remote \"sftpcloud:/\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.465414+00:00"}
{"level":"debug","msg":"Using config file from \"/home/szahri/rclone_tests/.rclone_conf\"","source":"config/config.go:362","time":"2024-01-04T07:43:45.465513+00:00"}
{"level":"debug","msg":"Creating backend with remote \"webdav:myuser@mydomain.au/\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.465696+00:00"}
{"level":"debug","msg":"Creating backend with remote \"/eos/webdavpool/data/myuser@mydomain.au\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.46574+00:00"}
{"level":"debug","msg":"fs cache: renaming cache item \"webdav:/myuser@mydomain.au/\" to be canonical \"/eos/webdavpool/data/myuser@mydomain.au\"","source":"cache/cache.go:84","time":"2024-01-04T07:43:45.628947+00:00"}
{"level":"debug","msg":"fs cache: renaming cache item \"sftpcloud:/\" to be canonical \"sftpcloud:\"","source":"cache/cache.go:84","time":"2024-01-04T07:43:45.629094+00:00"}
{"level":"debug","msg":"**Excluded","object":"myuser@mydomain.au",**"objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:43:45.629255+00:00"}
{"level":"debug","msg":"4 go routines active\n","source":"cmd/cmd.go:300","time":"2024-01-04T07:43:45.629365+00:00"}

Update rclone to the latest version which is now v1.65

$ rclone -vv --inplace --use-json-log --config .rclone_conf ls webdav:"/" --include "/files/**"
< redacted >
04T07:47:57.763876+00:00"}
{"level":"debug","msg":"Excluded","object":"lee@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.7639+00:00"}
{"level":"debug","msg":"Excluded","object":"lisa@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.764131+00:00"}
{"level":"debug","msg":"Excluded","object":"myuser@mydomain.au","objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:47:57.764113+00:00"}
<redacted>

What is wrong with this result? You ask to include only /files/** so everything else is excluded. BTW --inplace flag is not needed for ls

Not sure what you mean by not ideal? It does exactly what you indented, doesn't it?

Maybe I misunderstand the issue... If yes then can you post rclone tree of your source webdav:/. Your command. And what you get vs what you want.

Hi there, thanks for your reply.
Yep --inplace isnt needed there, in my haste to test with ls I forgot to remove it (I used it for copy)

As for whats wrong with the result - to recap my initial message (sorry if I wasnt clear), I have this in my config:

[webdav]
type = alias
remote = /eos/webdavpool/data/

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=webdav:/myuser@mydomain.au/"

So, based on this, I'm expecting my remote's parent folder or root folder to be "/myuser@mydomain.au", and the same with my source.
And so I expect, when I run this command, the --include would look inside the root/parent folder (this being /myuser@mydomain.au), see that it has several directories (files, files_trashbin, thumbnails etc), and then only include the files directory since I have specified --include "/files/**"
Instead, it appears to exclude myuser@mydomain.au completely:

$ rclone -vv --inplace --use-json-log --config .rclone_conf ls sftpcloud:"/" --include "/files/**"

{"level":"debug","msg":"Version \"v1.63.0\" starting with parameters [\"rclone\" \"-vv\" \"--inplace\" \"--use-json-log\" \"--config\" \".rclone_conf\" \"ls\" \"sftpcloud:/\" \"--include\" \"/files/**\"]","object":"rclone","objectType":"string","source":"cmd/cmd.go:422","time":"2024-01-04T07:43:45.465042+00:00"}
{"level":"debug","msg":"Creating backend with remote \"sftpcloud:/\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.465414+00:00"}
{"level":"debug","msg":"Using config file from \"/home/szahri/rclone_tests/.rclone_conf\"","source":"config/config.go:362","time":"2024-01-04T07:43:45.465513+00:00"}
{"level":"debug","msg":"Creating backend with remote \"webdav:myuser@mydomain.au/\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.465696+00:00"}
{"level":"debug","msg":"Creating backend with remote \"/eos/webdavpool/data/myuser@mydomain.au\"","source":"fs/newfs.go:34","time":"2024-01-04T07:43:45.46574+00:00"}
{"level":"debug","msg":"fs cache: renaming cache item \"webdav:/myuser@mydomain.au/\" to be canonical \"/eos/webdavpool/data/myuser@mydomain.au\"","source":"cache/cache.go:84","time":"2024-01-04T07:43:45.628947+00:00"}
{"level":"debug","msg":"fs cache: renaming cache item \"sftpcloud:/\" to be canonical \"sftpcloud:\"","source":"cache/cache.go:84","time":"2024-01-04T07:43:45.629094+00:00"}
{"level":"debug","msg":"**Excluded","object":"myuser@mydomain.au",**"objectType":"*fs.Dir","source":"list/list.go:66","time":"2024-01-04T07:43:45.629255+00:00"}
{"level":"debug","msg":"4 go routines active\n","source":"cmd/cmd.go:300","time":"2024-01-04T07:43:45.629365+00:00"}

So there must be a misunderstanding in how I'm interpreting combine / webdav and the -include "/files/**"
If so, I'm simply asking for some explanation so I can understand it, and move on.

I guess what I meant by not ideal is the fact that I have to specify the user here:

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=webdav:/myuser@mydomain.au/"

as well as in the rclone command, for the inclusions to actually work:

rclone -vv --inplace --use-json-log --config .rclone_conf ls primetenant:"/" --include "/myuser@mydomain./files/**"

I feel like I'm not configuring the remotes correctly because it feels inefficient that I'd have to supply the user in both cases. If that makes sense.

Ideally, I'd define the remote as it is right now, so I'm only listing against that particular user, and the include would work without having to specify the user again - because this works with the same config (without any exclusions applied obviously, but it did manage to list the files only for myuser@mydomain.au):

$ rclone -vv --inplace --use-json-log --config .rclone_conf ls primetenant:"/"

Also, --exclude seems to work as well, athough I'd have to tighten it a bit more since it does include, say files_trashbin/files when it needs to exclude the whole directory all together and not traverse down:

$ rclone -vv --inplace --use-json-log --config .rclone_conf ls primetenant:/ --exclude "/files_trashbin/**"

My examples here are simplified, in real scenario we have a list of users that we are feeding to rclone to copy individually this way, for specific workflow.

However, if this is what we need to do to make it work (ie specify the full path of what needs to be included in --include when running rclone), then it is what it is. Just making sure I understand the limitations, if any, and if there is a better way to do it.

Thanks

`

run rclone tree sftpcloud: to see what is this combine structure. "/myuser@mydomain.au" is not its root. It is just a "virtual" directory (named by you as myuser@mydomain.au) in the root.

As per combine docs you are asking to create:

$ rclone tree sftpcloud:
/
├── myuser@mydomain.au
    ├── files
    └── files_trashbin

Instead of:

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=webdav:/myuser@mydomain.au/"

you can use alias:

[sftpcloud]
type = alias
remote = "webdav:/myuser@mydomain.au/"

then your webdav user directory myuser@mydomain.au will be the root of sftpcloud

Running this I get:

$ rclone tree sftpcloud: --config .rclone_conf  

/
└── myuser@mydomain.au
    ├── files
    │   ├── SWAN_SESSIONS
    │   │   └── SWAN_SESSION_2023.03.21_05.16.52_UTC
    │   └── Shared
    ├── files_trashbin
    └── files_version

So that looks correct?

Using include again, it's excluding everything again:

$ rclone tree sftpcloud: --config .rclone_conf --include "/files/**"
/

0 directories, 0 files

Unfortunately due to the usecase/setup of the sftp server (multiple disks where user data could be anywhere), I have to use combine backend rather than webdav..so changing that isnt an option.

Thanks for helping with this!

And it is correct. as you do not have /files directory.

It is /myuser@mydomain.au/files

Use alias instead of combine as I suggested. I think it will get you what you want.

Thanks so much, took me awhile to realize this is so! You are right. That was my undoing.

Unfortunately I have to use combine, but your suggestion re alias did give me an idea. After some testing, I've come up with this config:

[webdav]
type = alias
remote = /eos/webdavpool/data/

[sftpclouduser]
type = alias
remote = sftpcloud:/myuser@mydomain.au

[sftpclouduser2]
type = alias
remote = sftpcloud:/lee@mydomain.au

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=sftpclouduser:/"  "leemydomain.au=sftpclouduser2:/"

[source]
type = hasher
remote = sftpcloud:
hashes = md5
max_age = 1s

[destination]
type = sftp
host = sftpcloud.mydomain.au
user = migration
pass = mysuperstrongpass
port = 22
disable_hashcheck = false
chunk_size = 255k

This allows me now to do this successfully:

$ rclone tree sftpclouduser2:/ --config .rclone_conf --include "/files/**"
/
└── files
    ├── SWAN_SESSIONS
    │   └── SWAN_SESSION_2023.03.21_05.16.52_UTC
    └── Shared

0 directories, 0 files

I guess the only slightly annoying bit is that I'd have to create aliases for each and every user (in my example above we just have 2 users, in reality we might have up to 20 or so), so that does make for a long config file.

If there is any other better / shorter way to do this, I'm happy to hear it!

I really appreciate your help and quick responses, you've been very helpful!

1 Like

Maybe you can try union?:

[sftpcloud]
type = union
upstreams = sftpcloud:/lee@mydomain.au sftpcloud:/myuser@mydomain.au

Never tried it with the same remote different subfolders so you have to test.

Also can be problematic if different users have the same files...

BTW - rclone does not care how long config file is:) Maybe you can script it and generate all alias remotes programmatically?

Yep I did test with union but this wouldnt work for my usecase unfortunately.

Re config file, thats good to know it doesnt care about the length of the config file :slight_smile: We are generating it programmatically so it should be good from that end.

Thanks again!

Unfortunately though, I did notice that when trying to list the combine backend (sftpcloud in this case), it does not appear to honor the alias:

$ rclone tree sftpcloud:/ --config .rclone_conf --include=/files/**" -vvvv --log-file=include_combine.txt

2024/01/05 05:27:54 DEBUG : Creating backend with remote "sftpcloud:/"
2024/01/05 05:27:54 DEBUG : Using config file from "/home/szahri/rclone_tests/.rclone_conf"
2024/01/05 05:27:54 DEBUG : Creating backend with remote "sftpclouduser:/"
2024/01/05 05:27:54 DEBUG : Creating backend with remote "sftpclouduser2:/"
2024/01/05 05:27:54 DEBUG : Creating backend with remote "webdav:/eos/webdavpool/data/lee@mydomain.au"
2024/01/05 05:27:54 DEBUG : Creating backend with remote "webdav:/eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 05:27:54 DEBUG : found headers: Remote-User,apache
2024/01/05 05:27:54 DEBUG : found headers: Remote-User,apache
2024/01/05 05:27:54 DEBUG : fs cache: renaming cache item "webdav:/eos/webdavpool/data/lee@mydomain.au" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 05:27:54 DEBUG : fs cache: renaming cache item "sftpclouduser2:/" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 05:27:54 DEBUG : fs cache: renaming cache item "webdav:/eos/webdavpool/data/myuser@mydomain.au" to be canonical "webdav:eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 05:27:54 DEBUG : fs cache: renaming cache item "sftpclouduser:/" to be canonical "webdav:eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 05:27:54 DEBUG : fs cache: renaming cache item "sftpcloud:/" to be canonical "sftpcloud:"
2024/01/05 05:27:54 DEBUG : sftpclouduser2:lee@mydomain.au: Excluded
2024/01/05 05:27:54 DEBUG : sftpclouduser:myuser@mydomain.au: Excluded
2024/01/05 05:27:54 DEBUG : Stat: filePath="/"
2024/01/05 05:27:54 DEBUG : >Stat: fi=, err=<nil>
2024/01/05 05:27:54 DEBUG : ReadDir: dir=/
2024/01/05 05:27:54 DEBUG : >ReadDir: names=[], err=<nil>
/

0 directories, 0 files
2024/01/05 05:27:54 DEBUG : 8 go routines active

It looks like combine expands the alias into, well the full path, rendering the aliases kind of useless and again making it exclude everything.
Is this expected behaviour?

It does not do this if I run the same against a user alias (which is webdav backend).
So it appears to be a combine backend issue.

Unfortunately this means my issue still stands unresolved...

(I'm not sure how to un"solved" this topic)

Different remote structure you have to use different filter. What works for alias wont work for combine as you add another directories level. Nothing is "expended". If not sure run rclone tree to see what your remote structure is and then adapt filter accordingly.

I do not understand what problem you are trying to solve here really?

You fight to make remote structure to fit into your filter - --include=/files/**. Why not to change filter to work - --include=/myuser@mydomain.au/files/** ?

If you explain what exactly you want to achieve then we can try to find the best way to make it.

Hi there,
Its all good, its not necessarily a problem, my questions are also to achieve better understanding of why a webdav destination would "follow" an alias (the include works as I understand it), and why a combine destination containing these webdav remotes would not, because I cannot find explanation in the docs.

It might be straightforward to you, but its not to some people...thats why we go ask questions in this channel :slight_smile:

Yes we can and have tested using include=/myuser@mydomain.au/files/** but this again would need to be generated for every single user. Which we can do programmatically, of course. But it still does not give me the understanding of how I can get combine to "respect" aliases the way a webdav remote would. If it's not possible, then its not possible - we only want confirmation.

We are trying to avoid traversing through the webdav root /eos/webdavpool/data because it contains a lot of directories with files that can be problematic. Hence why we would like to "target" a user directory instead as root. Does that make sense?

Now we have reverted to using --include /*/files/** which works, however again its not super ideal in our situation because it means rclone would have to do a walk into all the directories rather than specific ones, however at this stage due to its simplicity we prefer it than /myuser@mydomain.au/files/**.
It is what it is I suppose, because it sounds like you're saying its not possible to get combine to respect multiple aliased remotes.

Thanks

Instead of description could you please provide examples? Use rclone tree for example to show what you are talking about.

You mean this one?

run rclone tree sftpcloud: and show what is this remote structure? Than it maybe will become clear what you mean by "expending alias".

This is also not clear at all. What does "respecting alias" mean? This is problem with description vs. examples.

Sorry I thought I have given examples to supplement my "descriptions" but happy to do it again.

Rclone tree with webdav remote using alias (this works with --include /files/**):

$ rclone tree sftpclouduser2:/ --config .rclone_conf -vvvv --log-file=rclone_webdav_alias.log
2024/01/05 10:24:14 DEBUG : rclone: Version "v1.63.0" starting with parameters ["rclone" "tree" "sftpclouduser2:/" "--config" ".rclone_conf" "-vvvv" "--log-file=rclone_webdav_alias.log"]
2024/01/05 10:24:14 DEBUG : Creating backend with remote "sftpclouduser2:/"
2024/01/05 10:24:14 DEBUG : Using config file from "/home/szahri/rclone_tests/.rclone_conf"
2024/01/05 10:24:14 DEBUG : Creating backend with remote "webdav:/eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:14 DEBUG : found headers: Remote-User,apache
2024/01/05 10:24:14 DEBUG : fs cache: renaming cache item "webdav:/eos/webdavpool/data/lee@mydomain.au" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:14 DEBUG : fs cache: renaming cache item "sftpclouduser2:/" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:14 DEBUG : Stat: filePath="/"
2024/01/05 10:24:14 DEBUG : >Stat: fi=, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[files files_trashbin files_version thumbnails], err=<nil>
2024/01/05 10:24:14 DEBUG : Stat: filePath="/files"
2024/01/05 10:24:14 DEBUG : >Stat: fi=files, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/files
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:14 DEBUG : Stat: filePath="/files_trashbin"
2024/01/05 10:24:14 DEBUG : >Stat: fi=files_trashbin, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/files_trashbin
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[files], err=<nil>
2024/01/05 10:24:14 DEBUG : Stat: filePath="/files_trashbin/files"
2024/01/05 10:24:14 DEBUG : >Stat: fi=files_trashbin/files, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/files_trashbin/files
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:14 DEBUG : Stat: filePath="/files_version"
2024/01/05 10:24:14 DEBUG : >Stat: fi=files_version, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/files_version
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:14 DEBUG : Stat: filePath="/thumbnails"
2024/01/05 10:24:14 DEBUG : >Stat: fi=thumbnails, err=<nil>
2024/01/05 10:24:14 DEBUG : ReadDir: dir=/thumbnails
2024/01/05 10:24:14 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:14 DEBUG : 9 go routines active

/
├── files
├── files_trashbin
│   └── files
├── files_version
└── thumbnails

Rclone tree with combine remote using alias (this does not with --include /files/**):

$ rclone tree sftpcloud:/ --config .rclone_conf -vvvv --logfile=rclone_combine.log

2024/01/05 10:24:36 DEBUG : rclone: Version "v1.63.0" starting with parameters ["rclone" "tree" "sftpcloud:/" "--config" ".rclone_conf.bak" "-vvvv" "--log-file=rclone_sftpcloud.log"]
2024/01/05 10:24:36 DEBUG : Creating backend with remote "sftpcloud:/"
2024/01/05 10:24:36 DEBUG : Using config file from "/home/szahri/rclone_tests/.rclone_conf.bak"
2024/01/05 10:24:36 DEBUG : Creating backend with remote "sftpclouduser2:/"
2024/01/05 10:24:36 DEBUG : Creating backend with remote "sftpclouduser:/"
2024/01/05 10:24:36 DEBUG : Creating backend with remote "webdav:/eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 10:24:36 DEBUG : Creating backend with remote "webdav:/eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:36 DEBUG : found headers: Remote-User,apache
2024/01/05 10:24:36 DEBUG : found headers: Remote-User,apache
2024/01/05 10:24:36 DEBUG : fs cache: renaming cache item "webdav:/eos/webdavpool/data/myuser@mydomain.au" to be canonical "webdav:eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 10:24:36 DEBUG : fs cache: renaming cache item "sftpclouduser:/" to be canonical "webdav:eos/webdavpool/data/myuser@mydomain.au"
2024/01/05 10:24:36 DEBUG : fs cache: renaming cache item "webdav:/eos/webdavpool/data/lee@mydomain.au" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:36 DEBUG : fs cache: renaming cache item "sftpclouduser2:/" to be canonical "webdav:eos/webdavpool/data/lee@mydomain.au"
2024/01/05 10:24:36 DEBUG : fs cache: renaming cache item "sftpcloud:/" to be canonical "sftpcloud:"
2024/01/05 10:24:36 DEBUG : Stat: filePath="/"
2024/01/05 10:24:36 DEBUG : >Stat: fi=, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[sftpclouduser2:lee@mydomain.au sftpclouduser:myuser@mydomain.au], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[files files_trashbin files_version thumbnails], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au/files"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au/files, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au/files
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au/files_trashbin"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au/files_trashbin, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au/files_trashbin
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[files], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au/files_trashbin/files"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au/files_trashbin/files, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au/files_trashbin/files
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au/files_version"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au/files_version, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au/files_version
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser2:lee@mydomain.au/thumbnails"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser2:lee@mydomain.au/thumbnails, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser2:lee@mydomain.au/thumbnails
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[files files_trashbin files_version thumbnails], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au/files"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au/files, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au/files
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au/files_trashbin"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au/files_trashbin, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au/files_trashbin
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[files], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au/files_trashbin/files"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au/files_trashbin/files, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au/files_trashbin/files
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au/files_version"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au/files_version, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au/files_version
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : Stat: filePath="/sftpclouduser:myuser@mydomain.au/thumbnails"
2024/01/05 10:24:36 DEBUG : >Stat: fi=sftpclouduser:myuser@mydomain.au/thumbnails, err=<nil>
2024/01/05 10:24:36 DEBUG : ReadDir: dir=/sftpclouduser:myuser@mydomain.au/thumbnails
2024/01/05 10:24:36 DEBUG : >ReadDir: names=[], err=<nil>
2024/01/05 10:24:36 DEBUG : 10 go routines active

/
├── sftpclouduser2:lee@mydomain.au
│   ├── files
│   ├── files_trashbin
│   │   └── files
│   ├── files_version
│   └── thumbnails
└── sftpclouduser:myuser@mydomain.au
    ├── files
    ├── files_trashbin
    │   └── files
    ├── files_version
    └── thumbnails

My config:

[webdav]
type = alias
remote = /eos/webdavpool/data/

[sftpclouduser]
type = alias
remote = webdav:/myuser@mydomain.au

[sftpclouduser2]
type = alias
remote = webdav:/lee@mydomain.au

[sftpcloud]
type = combine
upstreams = "myuser@mydomain.au=sftpclouduser:/"  "leemydomain.au=sftpclouduser2:/"

[source]
type = hasher
remote = sftpcloud:
hashes = md5
max_age = 1s

[destination]
type = sftp
host = sftpcloud.mydomain.au
user = migration
pass = mysuperstrongpass
port = 22
disable_hashcheck = false
chunk_size = 255k

Now I do understand that:

  1. They are different backends so they might behave differently
  2. The include "/files/**" wont work in the combine because apparently the user directories are not the root directory.

My question, now that I know what I know:
Is it possible at all to make combine show the user as root (follow the aliases path the way webdav is doing it)?

Just to be clear, I do have workarounds but I just want to understand if combine can do this at all (treat the user directory as root, the way webdav appears to do) or its just not supported. Then we both can move on with our lives :slight_smile:

Thanks

Why you want to use combine? You already have user as root (in alias)? I do not see how it could work for multiple users if all are in root. What if they have the same folders and files?