I’ve lost most of my files after enabling the virtual file system option then disabling it.
Via the web interface I see that they are all in the “Deleted Files” section but the “restore” button doesn’t do anything.
On the local file system they are shown with a grey X overlay on the icon and double clicking doesn’t do anything.
Please can anyone suggest what to do?
I’m currently tarring the whole /var/www/owncloud folder for backup.
I’m running OwnCloud server 10.4.0.4 community on a Ubuntu 18 box. The client is OwnCloud for Windows x64 v18.104.22.16870 (rolled back from v5).
When I try to undelete a folder from the web trash bin I get an error in the owncloud.log similar to
"An exception occurred while executing ‘UPDATE oc_file_locks SET lock = lock + 1, ttl = ? WHERE key = ? AND lock >= 0’ with params [1698927184, \"files\\\/xxxxxxxxxxxxxxxxxxxx\"]:\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction"
If I undelete a single file from the web trash bin I get another error in the log, saying "files\/xxxxxxxxxxxxxxxxxx\" is locked" but the file is restored on the local computer, though in the root folder. This could be a workaround to restore single important files but it doesn’t save the day.
The reason why I downgraded to v4 is that I had only yesterday installed v5 and today I was getting a lot of “Access Denied” errors in the “Not Synced” log so I figured it might have been a bug in the new version. But I’m still getting them in v4 and the errors are about the files that I lost i.e. they don’t exist on the local file system but only in the “Deleted files” folder on the server
Updating to a recent version of OwnCloud requires a chain of updates that I’m not ready to perform now.
I recovered many files from trash by using this excellent tool: …github.com/JanAckermann/owncloud-restore-trash
Some of them were not recovered because of locks or whatever, but I managed to find them on an old laptop.
I still wonder how I could lose my files by just checking the virtual file system option. I guess the old version of OwnCloud couldn’t cope with it. If that is the case, could I suggest the developers to issue some kind of warning on the client when connected to an unsupported version of the server.
i’m not sure but i think that it could be possible that this is not even originating from using the virtual file system but just because of the usage of this outdated ownCloud server version which maybe could have known bugs triggered by any operation on the server.
If you think there should be a warning in the client when connection to an outdated version of the server then i think you could ask the ownCloud developers over there because i think that it is not guaranteed that they will notice it in the forum:
Whatever it was, it was triggered by enabling the virtual file support. I’ve been using this version of OwnCloud for years with no problems. Then the other day I enabled virtual file support and hell got loose.
The first strange symptom was that, although all my files were already synced, after enabling virtual files I got all those sync icons everywhere and some cloud icons too. Then I started having conflicts on files that I didn’t change, then errors in the log, then when I disabled virtual files something even weirder happened and most of them were moved to trash where they got trapped. I also struggled to get rid of virtual file support: I kept seeing sync icons in Explorer until, after reverting back to v4, I reinstalled v5 only to find that the option for virtual files was back there and I removed it again.
In any case, I will not try virtual files again for some time, probably years
One thing that I just found out and might be of interest to others is that my maintenance cron job has never run in 5 years because apparently I forgot to configure it.
The database had lots of locks in the lock table. That might have been the cause of not being able to de-trash the files.
I cleaned the lock table manually (as suggested somewhere) before enabling the cron job.
A few days ago I lost about 2300 files, and I had to recover them from the trash for a very long time.
From the very beginning I have been using a virtual file system and I have never disabled it.
Only files from directories are deleted, while folders remain, but they are empty.
This is the second time this has happened to me in a month,
I have already had the pleasure of manually restoring files from the trash one by one.
It’s a very long time.((((
I will share the clippings from the log file, maybe it can help to sort out this problem
I had big trouble with the file deletion caused by disabling the virtual file system. On a new laptop I installed the 5.0.x ownCloud desktop app release and unticked the virtual file system support. It was on a Sunday and no one took notice, that deletions for all files had been triggered.
So on the following Monday my restore work had to begin. As much more than 10k files were deleted - manual restore via the ownCloud webGUI and its trashbin was not an option.
Also I tried all above mentioned scripts etc., but nothing worked that fast it could bring back the data in time.
During kind of disaster recovery from backups I stumbled upon these issues (links censored):
To be honest - I find it irresponsible to still let this 5.0 version on the download page here: https-owncloud.com-[language]-desktop-app (link censored) while e.g. third party package managers already rollout the 5.1 release.
Also regarding the tag on the issue “Consider a hotfix release with only that fix (ex: lose trust, money, security issue, …)” it maybe would have been an incident that could have been prevented.
Sorry for the rant about an otherwise excellent software project - it came straight out of my stressed mind.