We are trying to sync a filesystem to Google Drive using rclone 1.46. The problem I am having is that I have specified a log file using "--log-file=" to a location on the filesystem being synced. Even though I have used an "--exclude" to try to prevent that log file being synced, rclone still attempts to sync it, and as such exits with an error.
I have tried variations on the '--exclude' to try and match the log file, but rclone still tries to sync it.
Here is the error it reports in the log:
2019/05/20 02:04:28 ERROR : log/2019-05-20_01:22-remote-backup-cea-archive.log: Failed to copy: can't copy - source file is being updated (size changed from 58 to 8853)
2019/05/20 02:20:19 ERROR : Google drive root 'Backup/server/pool': not deleting files as there were IO errors
2019/05/20 02:20:19 ERROR : Google drive root 'Backup/server/pool': not deleting directories as there were IO errors
2019/05/20 02:20:19 ERROR : Attempt 1/3 failed with 1 errors and: can't copy - source file is being updated (size changed from 58 to 8853)
I'm sure it's something simple but I've tried quite a few variations and still can't get rclone to ignore this file in the sync.
There appears to be a stray inverted comma at the end of your example? Is there meant to be one at the beginning as well? I've already tried that but will try without inverted commas.
It seems to work if I omit the inverted commas. I made a modified version of my script to test. Testing now on the main script. Thanks for pointing me in the right direction.
It is the shell (bash) that interprets the quotes, not rclone.
If you put things in 'single quotes' bash will not interpret anything in them, so the $(date ...) won't be interpreted. However if you use "double quotes" stuff will be interpreted. If the argument has no spaces then you can use no quotes like you have done.