Open HLCaptain opened 4 weeks ago
When I wanted to switch accounts from the local host to remote host with the same account, I got some problems and the client deleted all my files on the server by "syncing". I use Windows and proxied all the files either on the local and remote hosted accounts.
how did you do the switch?
6. Choose proxied files with same sync directory as the local host account.
If I understand you case correctlu, I think this is the reason the files were deleted. Never reuse the sync folder. The database does not get reset for the new sync connection. The client will try to match the database with local and remove, that could lead to deletion of files.
What are proxied files?
I have quite a lot files in nested folders (around 5tb), so I guess Windows could not proxy each item. Also I might have not logged into the local account for a while, so files might have changed. I did the switch like:
I think the remote account started syncing the "new" files and from some point on when I removed the local account it started deleting the not proxied files. There were around 30000 files deleted during a few hours until I noticed.
I tried to replicate it with remote-remote accounts, but the bug did not come up. As I am not on the local network, I cannot replicate this with local-remote hosted accounts.
I guess you are right and I was dumb to reuse the sync folder for the "same" account. I also noticed, that from the authentication flow, the client prompts the user not to reuse the sync folder, but does not prohibit it. I guess it gives the user some freedom, while handling 90% of edge cases with the collision handling, but what I would like to see is an account data migration from a host to another one, seamlessly. Like there would be an option to change the host of a user, who could be identified with a UUID/name with a clear sync path.
⚠️ Before submitting, please verify the following: ⚠️
Bug description
I host Nextcloud on TrueNas Scale and used it locally. So the host was a local IP (192.168...). I got to make the server accessible remotely under a custom domain to reach it outside my local network.
When I wanted to switch accounts from the local host to remote host with the same account, I got some problems and the client deleted all my files on the server by "syncing". I use Windows and proxied all the files either on the local and remote hosted accounts.
As suggested in this issue comment, I am opening a new issue for my specific problem.
Steps to reproduce
Documents/School/HomeWork.md
Expected behavior
When the remote account syncs, it does not delete locally not found files on the server.
Which files are affected by this bug
Documents/School/HomeWork.md
Operating system
Windows
Which version of the operating system you are running.
Windows 11 IoT Enterprise LTSC 26100.2161
Package
Official Windows MSI
Nextcloud Server version
30.0.1
Nextcloud Desktop Client version
3.14.2
Is this bug present after an update or on a fresh install?
Fresh desktop client install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
Are you using an external user-backend?
Nextcloud Server logs
No response
Additional info
No response