Internal server error after restoring from backup

Hello, I'm running the updated version of owncloud server (10.X) in Ubuntu 16.04. After a HD failure I've reinstalled it from backup (both the directories with Back in Time and the database with phpMyAdmin ). Permissions I guess that are right as well as the user and group (var-www) . This is the message in the web interface:

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times and include the technical details below in your report.

More details can be found in the server log.

Technical details

Remote Address: 150.214.245.224
Request ID: KDjOmGaOOafLqXAH3nJw

When I look into the log file, I found this entry, which I do not understand:

{"reqId":"KDjOmGaOOafLqXAH3nJw","level":3,"time":"2018-03-26T09:35:10+00:00","remoteAddr":"150.214.245.224","user":"--","app":"index","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/?dir=%2FBackup_nexus","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Class 'OCA\\Files_Trashbin\\Trashbin' not found\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/legacy\\/app.php(242): require_once()\n#1 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/legacy\\/app.php(193): OC_App::requireAppFile('files_trashbin')\n#2 \\/var\\/www\\/html\\/owncloud\\/lib\\/private\\/legacy\\/app.php(127): OC_App::loadApp('files_trashbin')\n#3 \\/var\\/www\\/html\\/owncloud\\/lib\\/base.php(900): OC_App::loadApps(Array)\n#4 \\/var\\/www\\/html\\/owncloud\\/index.php(55): OC::handleRequest()\n#5 {main}\",\"File\":\"\\/var\\/www\\/html\\/owncloud\\/apps\\/files_trashbin\\/appinfo\\/app.php\",\"Line\":29}"}

Everything seems to have been imported correctly (at least I didn't get any error message)

Some clue of what can I do?. Thanks in advance. Cheers

Jose Manuel

found a similar issue.

can you try this:

Thanks Dmitry, but refreshing (CTR-R) does nothing. The error persists.. Before the HD problem, owncloud was working OK with the last owncloud update, so I guess that the php modules are updated ( or should be ..in fact I had to do it few weeks ago).

These are the details of my web server:

Apache/2.4.18 (Ubuntu)
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
PHP extension: mysqli Documentation
PHP version: 7.0.25-0ubuntu0.16.04.1

And the database server:

Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 10.0.34-MariaDB-0ubuntu0.16.04.1 - Ubuntu 16.04
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Any other clue?

Cheers

Jose Manuel

I have no clue.

You say that your data is on a external drive, right?

Do you have many users with many shares? If not you could simply create a fresh instance and connect the data via external HDD.

Or is this not an option for you?

Hello Dmitry,
unfortunately I do have several users with many data. To recreate a new instance for all of them is a lot of work, which aI'm tryiong to avoid. I've been strugging ..to no avail. But there is a very suspicious string in the entry of the log file, which repeats systematically:

..."GET","url":"\/owncloud\/index.php\/apps\/files\/?dir=%2FBackup_nexus","message":"Exception: {\"Exception\":\"Error\",\"Message\":..

"Backup_nexus" shouldn't be there .... In fact I have recovered (with Back in Time) from an external drive where this was the name of the backup directory (nexus is the machine). It seems that some path is wrong because this string has been written somewhere inappropriately ...

The problem is that I cannot find it by doing a recursive search. But it should be somewhere .. There is a wrong path somewhere because of this, which is driving me crazy.

Some idea?

Have you looked in the database? ( or the config.php) ?

sorry if it's too simple an answer, but I am just guessing here

also try this

sudo -u www-data php occ trashbin:cleanup

I got same problem with this. Hope to get answer from you guys

Hi Dmitry,

                yes I did both things, but no way ..

Finally I fixed (apparently) the issue by brute force, I had not much hope, but it worked, I tell you my steps for the record:

1) Y renamed owncloud directory -> owncloud_bak

2) I took the latest upgrade that I found zipped in data/updater-data/download , which in my case happened to be 10.07.zip

3) Unzipped it as the new owncloud home directory

4) I copied the original config.php to the right place cp -a /var/www/html/owncloud_bak/config/ config.php /var/www/html/owncloud/config

5) I copied the data directory : cp -a /var/www/html/owncloud_bak/data /var/www/html/owncloud

It is huge in my case and took quite a while

6) I changed recursively ownership and permissions:

chown -R /var/www/html/owncloud www-data:www-data

 find  /var/www/html/owncloud -type f -exec chmod 644 {} \;

 find  /var/www/html/owncloud -type d -exec chmod 755 {} \;

7) Et voilĂ , it worked!

I hope this helps

Thanks for your interest. Regards