You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client just deleted local files, even though they also exist on the server #6322
The client should never delete files for no good reason.
Actual behaviour
I had a tough time synchronizing big ownCloud folders (which is already being discussed e.g. in #5017), often resulting in 503s and timeouts during the sync and thus restarting the sync process.
After some days the folder was mostly synchornized at last, as I could observe on the web interface.
However, all of a sudden the client decided that it should delete the local folder, even though it was still present on the server as well! I got a message telling me that there is a big folder that won't be synchronized by default, I chose to synchronize everything but by that time the local files were already gone...
Steps to reproduce
I'm not really sure.
Client configuration
Client version: Version 2.5.0-nightly20180110 (build 8967).
Start the client with --logdebug --logfile C:\log.txt To start the client will full debug output into a file.
Select the folder in the settings dialog and press the secret "Ctrl+F6" shortcut which will redo a sync with full remote discovery. Does the deleted file re-appear?
Go in the log and search for filename of files that are deleted and send us the lines around that.
My suspission is that the server did not report the files for some reason, doing CTRL+F6 should force the client to read everything again from the server.
Either we will see the file reaparing, or we will see in the log why the client thinks the files are not there.
@sagamusix But you don't know if in this special case the server sent something unexpected, right?
The 503s you spoke about were on previous occasions?
Coincidentally, this just happened again today. This time, it was even worse, though, because it deleted a hardlink (which it would normally not touch at all), and apparently, as a consequence, even deleted the contents of the linked-to folder. I cannot imagine how that is even possible.
I'd be much less frustrated now if ownCloud at least (optionally) uses the recycle bin to delete local files. I do have other backups, but the recycle bin would be just much more convenient, in particular since I use ownCloud with a single client and in theory the server should never delete files for me.
@sagamusix Can you look for the .owncloudsync.log log entry for the file that was deleted? This is pretty hard to debug without a full client log (and I realize getting one is very hard for rare problems like this) and the log entry there might at least provide some pointers.
@sagamusix I've looked at documentation and apparently you can only have hardlinks for files. Is this a symbolic link or a junction? Both should be detectable by looking for reparse points - our current check of !fi.isSymLink() seems to not cut it on Windows.
I don't think I have recently experienced this specific issue. I have been on 2.5 for a while now - I believe. For some reason the UI does not show the version number anymore?
Today, I noticed weird behaviour similar to this one.
Suddenly notification "Following files will be deleted..." appeared and it deleted some local files/folder although I did not touch them at all. They still exist on the server, but local copy has gone and does not resynchronize back. Sync log just contains these folders with action "Deleted".
Client version ownCloud 2.5.4, Win10 x64.
Deleting user data is very critical bug!
Since it's unlikely that this has something to do with the bug that I
was experiencing over a year ago, can you please create a separate issue
and provide as much information there as possible?
Activity
ogoffart commentedon Jan 21, 2018
Start the client with
--logdebug --logfile C:\log.txtTo start the client will full debug output into a file.Select the folder in the settings dialog and press the secret "Ctrl+F6" shortcut which will redo a sync with full remote discovery. Does the deleted file re-appear?
Go in the log and search for filename of files that are deleted and send us the lines around that.
My suspission is that the server did not report the files for some reason, doing CTRL+F6 should force the client to read everything again from the server.
Either we will see the file reaparing, or we will see in the log why the client thinks the files are not there.
sagamusix commentedon Jan 22, 2018
After copying the files back to their original location, the bug didn't happen anymore, even after a enforcing a full remote discovery.
guruz commentedon Feb 2, 2018
@sagamusix Which exact server version are you using?
Can you grep your server access log for the respective path?
sagamusix commentedon Feb 2, 2018
10.0.4, but probably 10.0.3 at that time. I have pruned my logs since they grew to more than 6GB, so I'm afraid they are gone now.
guruz commentedon Feb 5, 2018
@sagamusix But you don't know if in this special case the server sent something unexpected, right?
The 503s you spoke about were on previous occasions?
sagamusix commentedon Feb 5, 2018
As far as I can tell, yes, there was no direct connection between the two.
sagamusix commentedon Feb 5, 2018
Coincidentally, this just happened again today. This time, it was even worse, though, because it deleted a hardlink (which it would normally not touch at all), and apparently, as a consequence, even deleted the contents of the linked-to folder. I cannot imagine how that is even possible.
sagamusix commentedon Feb 5, 2018
I'd be much less frustrated now if ownCloud at least (optionally) uses the recycle bin to delete local files. I do have other backups, but the recycle bin would be just much more convenient, in particular since I use ownCloud with a single client and in theory the server should never delete files for me.
ckamm commentedon Feb 6, 2018
@sagamusix Can you look for the
.owncloudsync.loglog entry for the file that was deleted? This is pretty hard to debug without a full client log (and I realize getting one is very hard for rare problems like this) and the log entry there might at least provide some pointers.ckamm commentedon Feb 6, 2018
I've looked at this as much as I could with the given data in #6282 but don't know what's going on.
sagamusix commentedon Feb 6, 2018
@ckamm I will send you some logs via mail.
ckamm commentedon Feb 7, 2018
@sagamusix Thank you for the logs!
Initial impressions follow:
Setup:
A, some data somewhere else calledB/dataA/linkis a directory link toB/data, soA/link/fooandB/data/foopoint to the same fileTrigger:
linkhas an_invalid_etag (unclear whether parents also had that etag)REMOVEinstruction withDowndirection.B/data/foogets deleted.Bugs:
_invalid_etagsLog snippet from sync run of A:
ckamm commentedon Feb 7, 2018
@sagamusix I've looked at documentation and apparently you can only have hardlinks for files. Is this a symbolic link or a junction? Both should be detectable by looking for reparse points - our current check of
!fi.isSymLink()seems to not cut it on Windows.20 remaining items
ogoffart commentedon Oct 12, 2018
Is this issue still a problem?
I guess the 2.6 new discovery does not suffer from these problem, does it?
sagamusix commentedon Oct 12, 2018
I don't think I have recently experienced this specific issue. I have been on 2.5 for a while now - I believe. For some reason the UI does not show the version number anymore?
guruz commentedon Oct 13, 2018
It's in the about dialog now, accessible from the tray icon.
ckamm commentedon Oct 17, 2018
Definitely reopen if you see it happen again. (also reminder to enable permanent rotating file logging!)
sagamusix commentedon Oct 17, 2018
BigMuscle85 commentedon Jul 24, 2019
Today, I noticed weird behaviour similar to this one.
Suddenly notification "Following files will be deleted..." appeared and it deleted some local files/folder although I did not touch them at all. They still exist on the server, but local copy has gone and does not resynchronize back. Sync log just contains these folders with action "Deleted".
Client version ownCloud 2.5.4, Win10 x64.
Deleting user data is very critical bug!
sagamusix commentedon Jul 24, 2019