Exclude-from configuration

Hello,

It would be nice to have the ability to specify a exclude-from file in the rclone.conf

In my case, I'd like to avoid the synchronization of my editor's cache files and libreoffice lockers.

I do not see any solution except using the option --exclude or --exclude-from each time I use rclone.

Is this something possible ?

Thanks,
Louis

$ rclone version
rclone v1.60.1

  • os/version: arch (64 bit)
  • os/kernel: 6.0.10-arch2-1 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.3
  • go/linking: dynamic
  • go/tags: none

it's a whole lot easier for you to just include the aforementioned --exclude flag in your script that you are likely saving anyway to run each time, than it is for the team to stitch this in at the code level :slight_smile:

It is not about easiness, it is about collaboration, working with a team and to avoid dumb files in the tree. You probably use a .gitignore in a git repository

What script ? At that point, the most relevant solution is to alias rclone

There is an issue to put flags into the config file as configuration profiles. It isn't implemented yet but it is on the list!

You can also set environment variables which may be interesting RCLONE_INCLUDE_FROM and you mentioned .gitignore - rclone supports --exclude-if-present which might be useful.

1 Like

perhaps an environment variable RCLONE_EXCLUDE_FROM with a default value of :/.rcloneignore

that would be awesome indeed

I assume you don't type out the rclone command each time you sync. don't you have a premade script you keep handy so you can just schedule it or execute it at will?

Your assumption is incorrect. I have no script. It is not required in my usage.
At this stage, I have made a quick alias with the --exclude-from flag.

Perhaps rclone could also watch for ~/.conf/rclone/exclude.conf

really? so each time you do a sync you type out the command with the file paths and flags?

Yeah I type every flag I need. It ends more or less that big:

rclone sync myrepo: ./mydata

Unusual, isn't it ?

yes :slight_smile:

i did the same thing for a while. but i very quickly realized i was spending a LOT of time typing scripts into that little black window. now i keep a OneNote window open and just copy/paste whichever script i need for recurring manual syncs, and the every-day ones i just have windows task scheduler run a .bat file. but i guess we have to keep around 2 million files synced that are distributed on 4 servers, so a little automation goes a long ways.

jared

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