What is the problem you are having with rclone?
It does not seem to be respecting my filters as I would have expected. There are hidden files I want to keep and also hidden files and directories I do not care about. Some of them are not owned by me (system stuff like .Trashes
) so I am trying to exclude them.
When I just exclude all hidden items, it is all fine. But when I try to include my desired hidden items (ending in .notes.yaml
) It does include them but also throws IO errors from the permissions.
It shouldn't be trying to read those directories, right?
I also tried putting my include filter at the end but that, as I would expect, kills my other filter
My guess as to what is happening is that when there is the include filter, it is trying to list the hidden directories to match against but when that isn't there, it doesn't try to list them. Is that correct? That seems like incorrect behavior as it is not a bucket remote (it's local file system) and it can match the directory name
What is your rclone version (output from rclone version
)
Which OS you are using and how many bits (eg Windows 7, 64 bit)
macOS
Which cloud storage system are you using? (eg Google Drive)
Local to crypt
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
This command correctly includes the files I want but does not exclude hidden directories
rclone --dry-run\
--config backups/backup_sync.rclone.cfg \
-v --progress \
--filter "+ .*.notes.yaml" \
--filter "- .*" \
--filter "- .*/**" \
sync . backup:
I would assume it is something to do with my excludes but when I just run
rclone --dry-run\
--config backups/backup_sync.rclone.cfg \
-v --progress \
--filter "- .*" \
--filter "- .*/**" \
sync . backup:
it correctly excludes the other hidden directories
A log from the command with the -vv
flag
When the first command is run:
(I notice certain files are excluded (e.g. .DS_Store
) but the permission denied shouldn't have even happened given the filter)
...
2020/05/16 17:54:07 DEBUG : .DS_Store: Excluded
...
2020/05/16 17:54:41 ERROR : .DocumentRevisions-V100: failed to open directory ".DocumentRevisions-V100": open ****.DocumentRevisions-V100: permission denied
...
2020-05-16 17:54:55 ERROR : Attempt 3/3 failed with 4 errors and: not deleting files as there were IO errors
With the second command
...
2020/05/16 17:58:31 DEBUG : .test.notes.yaml: Excluded
2020/05/16 17:58:31 DEBUG : .DS_Store: Excluded
...
NO permission errors
I am not sure I understand why it is trying access excluded directories when there is the include (that doesn't match!) but not otherwise. Is that expected?