Sync to DropBox fails when file is open - lock file has disallowed filename

What is the problem you are having with rclone?

  • I am trying to use rclonesync to sync. between DropBox and a folder on my Raspberry Pi
  • When I leave a file open (e.g. 'privaterentalmarketstatistics221214.xlsx') sync fails, giving the errors below; I then need to run first sync to correct it (temporarily). If I then run sync with the file closed it runs fine:
2023/04/10 11:38:32 ERROR : Courses/University of Michigan Python for Everybody course/.~lock.privaterentalmarketstatistics221214.xlsx#: Failed to copy: upload failed: batch upload failed: path/disallowed_name
2023/04/10 11:38:32 ERROR : Attempt 1/3 failed with 1 errors and: upload failed: batch upload failed: path/disallowed_name
2023/04/10 11:38:35 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/disallowed_name

Run the command 'rclone version' and share the full output of the command.

rclone v1.62.2
- os/version: raspbian 10.13
- os/kernel: 5.10.103-v7l+ (armv7l)
- os/type: linux
- os/arch: arm (ARMv7 compatible)
- go/version: go1.20.2
- go/linking: static
- go/tags: none

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> Yes, I am

Which cloud storage system are you using? (eg Google Drive)

DropBox

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclonesync Dropbox:/ ~/dropbox --check-access --check-filename RCLONE_TEST.txt

The rclone config contents with secrets removed.

[Dropbox]
type = dropbox
token = {"<Removed>","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

A log from the command with the -vv flag

pi@raspberrypi:~ $ rclonesync Dropbox:/ ~/dropbox --check-access --check-filename RCLONE_TEST.txt -vv
2023-04-10 18:26:09,527:  ***** BiDirectional Sync for Cloud Services using rclone (V3.2 201201) *****
2023-04-10 18:26:10,213:  Lock file created: </tmp/rclonesync_LOCK_Dropbox___home_pi_dropbox_>
2023-04-10 18:26:10,213:  Synching Path1  <Dropbox:/>  with Path2  </home/pi/dropbox/>
2023-04-10 18:26:10,213:  Command args: <Path1=Dropbox:/, Path2=/home/pi/dropbox, check_access=True, check_filename=RCLONE_TEST.txt, check_sync_only=False, config=None, dry_run=False, filters_file=None, first_sync=False, force=False, max_deletes=50, no_check_sync=False, no_cleanup=False, no_datetime_log=False, rc_verbose=None, rclone=rclone, rclone_args=None, remove_empty_directories=False, verbose=2, workdir=/home/pi/.rclonesyncwd>
2023-04-10 18:26:10,213:  ***** Cannot find prior Path1 or Path2 lsl files, likely due to critical error on prior run.
2023-04-10 18:26:10,213:  Lock file removed: </tmp/rclonesync_LOCK_Dropbox___home_pi_dropbox_>
2023-04-10 18:26:10,214:  ***** Critical Error Abort - Must run --first-sync to recover.  See README.md *****

Any help appreciated. Thanks for your time
Tom

The error is this

I suggest you exclude files of that name, something like --exclude ".~*"

Hi Nick,
Thanks for your help, much appreciated.
I've tried adding --exclude ".~" to the end of the command, i.e.:
'''rclonesync Dropbox:/ ~/dropbox --check-access --check-filename RCLONE_TEST.txt --exclude ".~
"'''

When I run it I get this error message:
rclonesync: error: unrecognized arguments: --exclude

Do you know what I am doing wrong?
Cheers
Tom

Sorry, minor correction, the error message is:
rclonesync: error: unrecognized arguments: --exclude .~*

I guess this might be something to do with rclonesync which I don't know anything about. That --exclude would work for plain rclone.

Hi Nick,
Ok, fair enough, thanks for the suggestion anyway. I'll have to find an alternate way to work around the issue.
Cheers
Tom

Hi Nick,

I've switched to using rclone bisync, and it works with the --exclude argument, i.e.:
rclone bisync Dropbox:/ ~/dropbox --check-access --check-filename RCLONE_TEST.txt --exclude ".~*"

Everything seems to be synchronising with DropBox, even if I have files open on my Raspberry Pi.

Thanks again for your help
Tom

1 Like

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