NextCloud/WebDAV - how to ignore external storage?


What is the problem you are having with rclone?

When using rclone to sync a webDAV remote. I can't see how to exclude external storage (remotely mounted) directories.

What is your rclone version (output from rclone version)

rclone v1.57.0

  • os/version: slackware 14.2+ (64 bit)
  • os/kernel: 4.19.107-Unraid (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

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

WebDAV (via NextCloud)

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

rclone copy nextcloud: /local/dir

The rclone config contents with secrets removed.

type = webdav
url =
vendor = nextcloud
user = user
pass = pass


  • you can use filtering

  • for example, this would exclude a folder named folder on nextcloud:
    rclone copy nextcloud: /local/dir --exclude=/folder/

  • to test the filter
    rclone ls nextcloud: --exclude=/folder/

  • if you have multiple folders to exclude, use a text file, let's call it excludes.lst
    rclone copy nextcloud: /local/dir --exclude-from=excludes.lst

this is excludes.txt


Unfortunately that doesn't help when the folder name can change. Nor when other folders that need to be synced can match.

Is there not a meta flag that can be used?

please provide a detailed example.

I'm not sure what you mean. Users can add any directory as "external storage" in NextCloud. I have no way of knowing what the folder name will be. Nor if I use --exclude=/external/ can I be sure that that path will still be an external storage in the future.

I want to exclude based upon being external storage not based upon changeable folder paths.

if you cannot define a glob/regex pattern to exclude external storage, how you expect rclone do exclude that???

really, can you post a real world detailed example?

I'm asking whether rclone can do this. Whether it's able to read file flags to determine whether it is external storage or not. Are you saying there is no way to determine this via WebDAV?

And I'm not sure what is not real-world about my example.

I want to back-up my NextCloud. I don't want to back-up anything from external storage which does not exist in the NextCloud at all, it's just a virtual mount.

if it does not exist in nextcloud, then rclone would not know about it and thus not back it up.

as per the rclone documentation,

  • with webdav, rclone knows about
    --- dir/file name
    --- file size

  • with nextcloud, rclone also knows about
    --- modtime
    --- md5 hash

perhaps in nextcloud, create a username, that does not have access to the virtual mount.
and have rclone use that username

Well this is false as I have verified it.

If it's impossible then it's good to know. I will have to think of another workaround, thanks.

some of what you posted is self-contradicting and confusing, very hard to understand exactly your use-case.

if you would only post a real world example, of what you are trying to exclude, we can better understand and help.
the output of rclone lsd would be helpful

What parts are self conflicting?

It's very simple. I want to back-up my NextCloud. I don't want to back-up anything from external storage which does not exist in the NextCloud at all, it's just a virtual mount.

Please help me by explaining which part of that you don't understand.

we are going around in circles now. you are not willing to post an example.

so i am going to drop off now.

I have posted an example several times. What part of it do you not understand? If you can't explain where you are lost in my example, I'm not sure how I can clarify any further.

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