I have been trying for hours. I read multiple entries on different forums about this. And I still cannot achieve the correct filtering. Particularly Virtualbox VMs, I gave up and tried different versions of trying to exclude this damn folder.
The idea is to backup the home folder to Google Drive, excluding the folders that are either to big or not important to backup.
I tried the general syntax: -v --exclude "/.folder/**" for hidden folders -v --exclude "folder/**" for non hidden folders
I know I can shorten everything, I tried, it wasn't working so I went back to the basic switches to debug it.
I've been messing around more in this long command but here is the filter file that did not really work as well: https://pastebin.com/GTYqbPBY
With this command (2): sudo rclone sync -v -P --filter-from ~/Documents/scripts/filter.txt --dump filters /home/user google:/xps-backup/00/home/
Ok so I clearly forgot to describe the problem I was to frustrated, my bad sorry.
The problem is that the filtering is not working, it is still uploading the map Virtualbox VMs amongst other files. I do not trust the filters I am using. So when I do rclone sync /home/user remote:/target/
And I want to filter out Pictures
I need to put - "Pictures/**"' - "/Pictures/**" wont work as far as I understand?
Note that you don't want escaping in the filter from file.
- /Virtualbox VMs/**
I put that folder in different ways in the filter file and it was still uploading as I was looking at the verbose output and progress. Amongst other things are still ending up on the remote.
Using `rclone ls --filter-from file.txt /home/user/` is an easy way to test filters.
This looks like a better way indeed, thank you
Further, on this topic, imagine I get all the filters working like I want and there is still old files in the remote. Where do I put --delete-excluded ?
The first one (no /) will filter out `/home/user/Pictures` , `/home/user/subdir/Pictures` and `/home/user/sub/subdir/Pictures`
whereas the second will only filter out `/home/user/Pictures`
Is that clearer?
You are writing it now without the quotation marks, this is not necessary in the filter file?
So I used rclone ls --filter-from on the filter file and it spit out everything it would exclude, looked good, I found Virtualbox VMs in there. So I started the sync and it completely ignored the filter for Virtualbox VMs, what am I doing wrong?
I did rclone ls src --filter-from filter/file/location.txt | grep VMs
With this in the filter file /'VirtualBox VMs'/** and the output was this: https://pastebin.com/u9Eee8wm
VirtualBox VMs was showing up, great!
So I went ahead with the sync, and the huge folder still ended up in the remote location.
Ubuntu 18 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I did the rclone ls --filter-from file.txt /home/user/ etc command and it was not showing up when the folder was written without the quotes.
When I changed it to /'VirtualBox VMs'/** It showed up in the output so yeah I went ahead and ran the sync command.
I caved sir, I just added all the virtualbox file types to the file type exclusion list as you can see. And that also worked. Still do not understand what I am doing wrong though.
Do you think it has something to do with the shell I am using? zsh?