Scripts to copy local files to dropbox mount

Are there any guides on the best way to create a script that scans a local folder for new files, and move them to a Dropbox rclone mount safely?

You can use rclone to move files to your remote:

Thanks - will this delete a file if it's currently being accessed?

It will attempt to delete all files. rclone does not have "knowledge" of files accessed by other applications. Whether delete operation is successful or not is up to your OS. You can utilise files locking, permissions etc.

But it is your computer so simply do not run move on files you use. Only do this when your other program finishes.

But instead of moving files why don't you use mount itself? You could add --vfs-write-back 1h flag which would only start uploading file to underlying remote 1h after no more in use.

Thanks - I have wondered this, but it seems many more experienced operators use move instead of writing direct to the mount. I assumed for API reasons?

So I could have a single local folder, mount rclone dropbox to it, copy files to it and rclone will auto upload them at a point I set - but the local machine will see no real difference?

There are always many way how to achieve the same goal:)

Yes. From local machine perspective file is in your mount. And you can edit it or do whatever you need with it. This file will be only uploaded to the remote after is not in use for specified period of time.

Thank you, I'll have a play.

Are there any commands to trigger an upload based on how many files (either by file quantity or size) are yet to be uploaded etc?

Only control you have is time delay since last file change. There is nothing else.

Ok thanks I'll check it out. Thanks again

Hmm I can't seem to mount when using the following command

--vfs-write-back=1h

I'm using rclone v1.52.2

Update your rclone to the latest version. There is no point troubleshooting some ancient version from 2020

1 Like

Wow didn't realise it had been so long! Apologies... will update when the mounts aren't being used

Yeah... tones of issues were fixed since then. And new features added:) And mount + VFS it is different reality compared to your old version.

Moving forward there is also nice feature (since v1.57 I think):

rclone selfupdate --stable

to update your rclone to the latest version

Will I have to make any changes to my existing mount configs?

No idea. I can not see your screen

I meant more in a general sense if any features have been deprecated over the past year or two.

Anyhow- have the mount up and running (after coming across an issue with fusermount3 but sorted that).

Lets see how it goes! Thanks for your help

1 Like

A lot of things changed:) It is rather long read. But I do not think anything was deprecated

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