owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.4k stars 665 forks source link

Files deleted randomly #3206

Closed mortenfirst closed 9 years ago

mortenfirst commented 9 years ago

Hi,

I have a problem with med owncloud. It randomly started deleting files in my windows client. I manged to stop it, but around 3700 files just disappeared from the server and my desktop.

I could recover some with the trashbin, but others are just gone. How can I recover these files? In the sync log I can see the files being INST_REMOVE like: |0|3. år/Bachelor Projekt/Modelforsøg/MKB-016/MKB-016.NMR.B/B9008/10/acqu|INST_REMOVE|Up|1363349160|54d0ffdc97185|0|00007752oc3ca0eaa736|0||0|0|0|||INST_NONE|

Best Regards, Morten

guruz commented 9 years ago

Are you sure they're not still on the server?

Can you please try to see if this also happens with http://download.owncloud.com/desktop/daily/ownCloud-1.8.1.5047-nightly20150506-setup.exe (which will basically become 1.8.1 released tomorrow)?

guruz commented 9 years ago

Also, which client and server versions do you use?

mortenfirst commented 9 years ago

Yes I am sure they are not on the server, not in the WebUI or in the data folder if I go through the terminal.

I have powered off the server in hope to recover files with Linux tools. And what do you expect to see with another client? The files does not exist anymore? Den 06/05/2015 15:48 skrev "Markus Goetz" notifications@github.com:

Are you sure they're not still on the server?

Can you please try to see if this also happens with

http://download.owncloud.com/desktop/daily/ownCloud-1.8.1.5047-nightly20150506-setup.exe (which will basically become 1.8.1 released tomorrow)?

— Reply to this email directly or view it on GitHub https://github.com/owncloud/client/issues/3206#issuecomment-99466413.

guruz commented 9 years ago

Do you also have log lines for the directory that file is in? Is that the only file in that directory or is the directory empty? Or whole directory gone?

dragotin commented 9 years ago

Can you also check the server log file (owncloud.log) if you see something in there? thx.

mortenfirst commented 9 years ago

It is not just one file, it is 3700 files and directories. Many directories have been deleted with files and everything. I have just updated the server version to 8.0.3 last weekend. The client was the latest stable version for windows, can't remember the number, and I uninstalled and installed the RC2.

/var/log/owncloud.log contains nothing, not a single line.

mortenfirst commented 9 years ago

I have just tried to do a full sync with the RC2 client, but the files are still missing. How can these 3700 files just disappear with no notice? And why aren't they in the trashbin? There must be a huge security breach/bug in this.

dragotin commented 9 years ago

@DeepDiver1975 red alert here. Do you have any thoughts on the trashbin question?

guruz commented 9 years ago

@mortenfirst My question was if it was single files inside a directory (with other files staying in the directory) or always all files in a directory? Or whole directories all the time?

Did you check the filecache table on the server's DB if it contains anything about those files (although might be too late already for this)

Did you do any file moving or similar inside those directories?

mortenfirst commented 9 years ago

The whole directory is gone. It is not random files here and there, it deleted random directories.

The files do not exist in the oc_filecache table.

I didn't do anything with these files, someof them haven't been changed since I installed owncloud.

hoho508 commented 9 years ago

Hi , I think your issue is the same as mine ....

mortenfirst commented 9 years ago

Not quite, I can see you synced between two laptops. I didn't do anything. I just decided to delete the files....

@dragotin @guruz Any news?

dragotin commented 9 years ago

looks like the same thing as in #3229

dragotin commented 9 years ago

@mortenfirst can you please report with which client version you saw this problem?

mortenfirst commented 9 years ago

not really, I couldn't find the files in the trashbin. They are still missing. I can't remember which client version, it was the fully updated client at the time.

BahnhofMS commented 9 years ago

Was the folders used by several devices (or shared?). Any strange path/filenames? I would like to try re-produce this, so any additional details would be nice.

taspac commented 9 years ago

Hello, I can confirm the same behavior with OC Client 1.8.1 (build 5050) on Win 7 Pro x64. We've lost ~500 files as one of clients computer deleted some shared stuff on server, during normal sync operation. After that other clients "synced" as well.. In 1.7.1 version it was ok, then update came on 14.05.2015 with 1.8.1 and on 17.05.2015 we've got this accident. No logs on server showed nothing - just Action tab on user account and client log with stuff like this:

06:17:18|3747|folder/file_1|INST_REMOVE|Up|1397046443|54412bec95ec3|0|00000576oc82828ff9e7|4||0|0|0|||INST_NONE| 06:17:18|3669|folder/file_2|INST_REMOVE|Up|1397823145|54412bece503d|0|00000586oc82828ff9e7|4||0|0|0|||INST_NONE| 06:17:18|3750|folder/file_3|INST_REMOVE|Up|1397826646|54412bed41713|0|00000575oc82828ff9e7|4||0|0|0|||INST_NONE| 06:17:21|2826|folder/file_4|INST_REMOVE|Up|1397729934|54412bed92161|0|00000582oc82828ff9e7|4||0|0|0|||INST_NONE| .. Few files were found in trashcan, others were removed completely.

mortenfirst commented 9 years ago

My files were only used on one client and synced at the server. And no, it were regular files, with ordinary filenames.

guruz commented 9 years ago

@taspac Is the folder/ itself gone too? Are all files/subfolders in folder/ gone?

ogoffart commented 9 years ago

So what this piece of log tells us is that the client saw that the files were removed locally, and then propagated it to the server.

The question then is why were the files removed locally? Was it the client deleting them by mistake in a previous sync? was it something else deleting it?
At this point, I don't know what this could be.

taspac commented 9 years ago

@guruz Yes, subfolders & files of shared folder were deleted: not all, but somehow randomly ~2/3 of the stuff. About 1% of them were found in trashcan, others disappeared.

ogoffart commented 9 years ago

@taspac is there a way we could reproduce the problem? Do you know how it hapenned?

ogoffart commented 9 years ago

I really do not know if there is a bug in the owncloud client. And without a way to reproduce or more information, i am unable to do anything.

mortenfirst commented 9 years ago

I'm not really satisfied with this just being closed? It must be the worst error anyone can imagine when you trust a cloud service.

I don't think anyone can trust owncloud when files just disappears.

ogoffart commented 9 years ago

Yes, i agree. However i don't really see what can be done. We tried to imagine scenario in which this could happen but we have no idea what can go wrong and why would the client delete files.

ogoffart commented 9 years ago

After more investigations and somebody else reproduced this issue, I was able to track what is hapenning:

in 1.8.0 there was a bug that would lead to the deletion by mistake of local files. Normally the file would re-appear soon after that. But if the deletion of one file would file, we would not save the local DB and have inconsistant state in the local DB. Which means that in the next sync we would think that the files were deleted locally and we would propagate the deletion to the server.

commit e54253d makes sure that we always keep the local db in a consistant state even if there are errors. So should another bug like the one in 1.8.0 appear, we would not loose the files.