Versioning doesn't work

Hi,

I got NC 12.0.1 and versioning activated. But I don’t have any earlier versions. “Keine Vorgänger-Versionen vorhanden”

Why is this so?

and their is this strange thing:

Update: I reanabled the waste bin app and there are files in there I deleted out of the waste bin for twenty times or so? After a restart they’re back again?!

edit: I tried to add this missing line to the config: https://docs.nextcloud.com/server/9/admin_manual/configuration_files/file_versioning.html

but didn’t work.

Strange thing: in “/nextcloud/user/files_versions/” everything is there as it should be. Versioning seems to work.
“nextcloud/user/files_trashbin” is empty. But everytime I got on the “deleted files” in the webgui, there are about 600 files I deleted month ago and deleted plenty of times out of the trashbin!
So the problem must have to do something with the webgui. Any ideas?

Same issue here
Also i see 2 Versioning tabs…

If I delete the files one by one in the bin, then it is possible to delete them. The logfile says for each file:
filesize(): stat failed for /mnt/data/user/files_trashbin/files/pic3 (2).jpg.d1497349923 at /var/www/nextcloud/lib/private/Files/Storage/Local.php#161

and it takes a long time to delete this files and a lot of cpu work for mysql.

Now is mysql going insane. it is running between 40 and 170% of an octacore, even after restart.

the command is: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --s

I have same issue on 12.02. Is displayed twice in UI but no versions. Have you found any steps how to get versions running?

Screenshot from 2017-09-11 20-42-37

Seems to be related to the oc_filecache, the file index database table nextcloud uses, also for trash and versions.
So created file versions are not correctly added to the table and removed files from trashbin not removed, for whatever reasons, database overload or something, so my guess.

Could you run occ files:cleanup, followed by files:scan --all both in max verbose mode if that actually exist (-vvv) and see if this solves you trash/versions visibility and in case give any error output of the commands?

Also check your mysql log for errors, slow error log could be interesting, too.

I’ve run both mentioned commands (cleanup and scan) successfully without any error output. The issue is still remaining.

What should I look for in mysql log exactly?

Interesting. And you also face the issue, that removed files from trash do reappear, even they are not present on hard drive and versions are present on hard drive but do not show up on web ui?
In this case the error reason might be different than I thought. Also the double “Versions” tab comes of course from different direction.

As my first thought was about oc_filecache writing errors, every error in mysql log could be relevant.

Also slow database queries might lead to timeouts or something, so enabling slow_query_log for a while and review the related log file could give a hint:

Only versions doesn’t work and are displayed in UI twice. Trash is working fine.

There were quite some file cache related fixes in 12.0.2 and some more fixes in the upcoming 12.0.3 - https://download.nextcloud.com/server/prereleases/ should have 12.0.3RC2 appear later today. I would not recommend to update to 12.0.3rc1, it has some issues that we found when upgrading our private instances and our company server (we always do that before releasing anything) so rc2 is coming soon :smiley:

Maybe these help.

Yes, it helps. I can wait for next stable version. Thank you.

I’ve just upgraded to 12.03 RC2 and issue still remains.

12.0.3RC2 is on the download server, you can give it a try. I just updated my private instance, there are no problems… If you find a problem, you earn a t-shirt :wink:

Finally I’ve solved it by disabling and enabling Version application.

I solved the problem with deactivating the snapshot plugin.

FYI - I had this as an issue in Nextcloud 13. I tried disabling/enabling the versioning app and it did not fix it. But I disabled end-to-end encryption (which has never worked for me anyway) and versioning works again. No clue why that should be, but for those that come across this problem, it might be an option to try.

2 Likes

Same for me. I disabled end-to-end encryption and versionning works again.
Regards

2 Likes

This worked for me as well. Thank you.

It very likely not related to the initial issue since E2E encryption is new in NC 13. However, thanks to share this information and it would be great to create an issue on the bug tracker https://github.com/nextcloud/issues. Check out the existing issues, if there is something similar.