And . . in fact, no, I am still getting the error. So I’ll try the above, i.e. putting the ‘include all .items’ before the ‘exclude .gvfs’, and i will use this format for the latter: .gvfs/**.
The filter rules are checked in order starting at the top for each item, so you want the excludes first probably.
I think this problem may be in the local backend though - what is failing is it doing an lstat on the directory .gvfs - that is rclone trying to read info about the directory, not the directory.
Can you do stat .gvfs and post the results? I’d like to see exactly what the permissions are.
stat .gvfs in the relevant folder yields stat: cannot stat '.gvfs': Permission denied
I would like my job to circumvent that error, in that I wish rclone to tell me about other problems, but not about this sort of permissions problem. (Indeed, I have rclone set to mail me the result of jobs; and I don’t want to hear by mail about that problem. For, it is not that I want the folder - which has to do with network stuff - backed up. Now ‘has to do with network stuff’ is vague. That is because I have a poor understanding of gvfs. I have .gvfs items in my system because I resorted to using gvfs when other networking methods broke.)
why would a file be there the user doesn’t own in there home!
I don’t know; as I said, I do not understand the file system in question. (I just know that unlike other methods of networking that I have tried, it does not hang all the time.)
What’s the ls -al on the file look like?
$ ls -al .gvfs
ls: cannot access ‘.gvfs’: Permission denied
$ sudo ls -al .gvfs
[sudo] password for [user]:
total 4
dr-x------ 2 root root 0 Apr 10 15:51 .
drwx------ 98 [user] [user] 4096 Apr 11 00:23 …
I have bookmarks in my file manager, Nemo, for various remote shares. Those shares get mounted (if that is the terminology I want) when I click those bookmarks (and not before). At that point, an icon for the share appears on my desktop. When I have been getting the error in question, no such share was mounted.
Here is the filter-from file (as it is currently; I’ve been fiddling with it).
# ==============================================
#
# RCLONE FILTER FILE
#
# TYPE: filter-from
# FORMAT
# + <include pattern>
# - <exclude pattern>
# Add /** to exclude a folder whatever its path
# Root (/) is the topmost folder specified by the backup job:
# SOURCE ROOT
# /home/<user>
#
# ASSOCIATED BACKUP FUNCTION
# dots
#
#
# Rules are processed in order they are defined
#
# ===============================================
- .cache
- .dropbox
- .gvfs # keep getting errors with this one.
- .gnupg
- .lock
- .old
- .Trash-0
- cache
- /.bash_history
- /.recoll/**
- /.xsession-errors
# Excludes everything else; we do NEED THAT.
# (May be a good idea also, in the rclone command, to set a shallow 'max-depth'.)
- *
+ /.*
+ /.*/*
# EOF
Using --one-file-system seems not to help, as one can see from the following output from my backup script.
NAME of script TEST
JOB to run dots_COPY
SOURCE path /home/<user>
DESTINATION path enc-b2:/X1/home/<user>
COMMAND TYPE COPY
OPTIONS, constant --skip-links --fast-list --checkers 12
--drive-chunk-size=256K --log-level=NOTICE
--local-no-check-updated --retries=2 --timeout=4m
--tpslimit 0 --tpslimit-burst 1 --drive-use-trash=false
OPTIONS, variable --one-file-system --filter-from
/home/<user>/BackupSetup/rclone/lists/dots_filter-from
--max-depth=3 --max-size 25M
OPTIONS, log and display --log-file /tmp/tmp.MdcaGB9zhF -P --stats=0
--stats-one-line
MAIL true
Rclone version rclone v1.46
0 / 0 Bytes, -, 0 Bytes/s, ETA -
dots_COPY - finished WITH ERROR CODE 1 in 0 hour(s),5 minute(s) and 13 second(s).
DETAILS:
2019/04/11 12:42:39 ERROR : : error reading source directory: failed to read directory "": lstat /home/<user>/.gvfs: permission denied
2019/04/11 12:42:39 ERROR : Attempt 1/2 failed with 1 errors
2019/04/11 12:45:12 ERROR : : error reading source directory: failed to read directory "": lstat /home/<user>/.gvfs: permission denied
2019/04/11 12:45:12 ERROR : Attempt 2/2 failed with 1 errors
(1) is - <foo>/** the correct syntax for excluding all instances in all locations of folder foo?
(2) I do not understand your example (your ‘eg’ and the material that followed it).
Thanks. All that I did, gvfs-wise, was to put some gvfs-style addresses into my file manager’s location bar and then bookmark the result. I will try giving more access to my user to the relevant folders. I will report back.