How to exclude multiple directories in rclone?

Hello I am using rclone since a week and it is an fantastic tool to backup systems in the cloud. I want to backup my entire user files. I want to backup some directories of my /home/$USER. I don't want to includes hidden folders which starts with period in front of it. How should I do that?

I read the docs but I couldn't figure out which command is best for me and how to use it. That's why I am posting in this forum.

Thank you.

hello and welcome to the forum,

filtering can be confusing, so often we use rclone tree or rclone ls to test the --exclude rule
once rules is tested, then can use a command such as
rclone sync . remote: --exclude='.*/' --dry-run

this might do what you want?

# list all files
rclone tree . -all
/
├── .dir01
│   └── .file
├── .file
└── dir
    └── file

# apply exclude rule
rclone tree . --exclude='.*/' -all
/
├── .file
└── dir
    └── file

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