What's the behavior of --allow-non-empty?

Hi!

How does --allow-non-empty actually behave?

I have an application that auto creates folders where i want my mount point to be, which makes remounting rather hard without this flag, because sometimes it just happens to be nonempty.

Does the cloud data take over completely?
Does it erase the folder?
Does it overwrite stuff?
I’d like to know how this behaves really, i’d also like to be able to define this behavior, i’d like the local data to be completely ignored.

Thanks! :slight_smile:

It allows for a mount with other items on the mount point. It is kinda bad to use imo as you can copies of things underneath your mount point.

So if I have a mount /stuff and it isn’t mounted, I can drop a bunch of files on top it and it fills up whatever the / file system is.

Once you mount over top of it, the stuff is ‘hidden’ underneath the mount point.

So if you app writes stuff before it’s actually mounted and you mount over it, the app can’t see it anymore until it is unmounted.

The app in question is just recreating it’s folder structure if it’s missing, which it is when it isn’t mounted. Writing to the mount is handled by writing to local FS, then rclone move stuff to the cloud.

Should this then be considered “safe”? =)

Thanks for the clarification! :slight_smile:

Ideally, you’d want to not use that to make you don’t create yourself a problem.

It’s just an order of operations question. If you write something there and then mount, you won’t see it until it’s unmounted.

I would think in your case, you’d especially want to use non empty to make sure you don’t get into a wonky state.

I think i forgot to mention that i only read from the mount, to get data onto the mount i store elsewhere on FS, then rclone copy/move it to the remote site of the mount :slight_smile: