[NCP] Database points to the wrong directory

Hey,

Im new to nextcloudpi and got it all set up and running. Lately I discovered one of my two hdd’s (software raid 1) was not connected properly to the raspberry. So I reconnected the hdd and waited for the sync of the data. After the sync process I got the following problem.

Somehow the system thinks the database is located in the www folder. I think it should be located inside the /media/raid/nc-database folder?

I dont know what I can do to fix this.
I’m relativly new to this and need help :frowning:

Thanks,
alex

NextCloudPi diagnostics

NextCloudPi version v1.21.0
NextCloudPi image NextCloudPi_12-20-19
distribution Raspbian GNU/Linux 10 \n \l
automount yes
USB devices sda sdb
datadir /media/raid/nextcloud
data in SD no
data filesystem ext2/ext3
data disk usage 791G/2.7T
rootfs usage 9.1G/59G
swapfile /var/swap
dbdir /media/raid/ncdatabase
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP REMOVED SENSITIVE VALUE
gateway REMOVED SENSITIVE VALUE
interface eth0
certificates REMOVED SENSITIVE VALUE
NAT loopback no
uptime 1min

```
Nextcloud configuration ``` An unhandled exception has been thrown: Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64 Stack trace: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(420): OC\DB\Connection->connect() #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(380): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(324): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(683): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(195): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager)) #6 /var/www/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager)) #7 /var/www/nextcloud/lib/private/Server.php(635): OC\DB\ConnectionFactory->getConnection('mysql', Array) #8 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server)) #9 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OCP\\IDBConnecti...') #10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OCP\\IDBConnecti...') #11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)) #12 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('DatabaseConnect...') #13 /var/www/nextcloud/lib/private/Server.php(1554): OC\ServerContainer->query('DatabaseConnect...') #14 /var/www/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection() #15 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server)) #16 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\Authenticati...') #17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(69): OC\ServerContainer->query('OC\\Authenticati...', true) #18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(99): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass)) #19 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...') #20 /var/www/nextcloud/lib/private/ServerContainer.php(145): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true) #21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(69): OC\ServerContainer->query('OC\\Authenticati...', true) #22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(99): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass)) #23 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(114): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...') #24 /var/www/nextcloud/lib/private/ServerContainer.php(145): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...', true) #25 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\Authenticati...') #26 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)) #27 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\Authenticati...') #28 /var/www/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...') #29 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server)) #30 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\User\\Session') #31 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\User\\Session') #32 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)) #33 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('UserSession') #34 /var/www/nextcloud/lib/private/Server.php(1430): OC\ServerContainer->query('UserSession') #35 /var/www/nextcloud/lib/private/Server.php(688): OC\Server->getUserSession() #36 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server)) #37 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('OC\\App\\AppManag...') #38 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(161): OC\ServerContainer->query('OC\\App\\AppManag...') #39 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)) #40 /var/www/nextcloud/lib/private/ServerContainer.php(120): Pimple\Container->offsetGet('AppManager') #41 /var/www/nextcloud/lib/private/Server.php(1725): OC\ServerContainer->query('AppManager') #42 /var/www/nextcloud/lib/private/legacy/app.php(346): OC\Server->getAppManager() #43 /var/www/nextcloud/lib/private/legacy/app.php(114): OC_App::getEnabledApps() #44 /var/www/nextcloud/lib/base.php(640): OC_App::loadApps(Array) #45 /var/www/nextcloud/lib/base.php(1078): OC::init() #46 /var/www/nextcloud/console.php(46): require_once('/var/www/nextcl...') #47 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...') #48 {main} ```
HTTPd logs

[Mon Mar 02 00:00:00.768682 2020] [ssl:warn] [pid 927:tid 3069878800] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 02 00:00:00.770682 2020] [mpm_event:notice] [pid 927:tid 3069878800] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Mon Mar 02 00:00:00.770718 2020] [core:notice] [pid 927:tid 3069878800] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 02 07:17:17.415907 2020] [ssl:warn] [pid 711:tid 3069374992] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 02 07:17:17.506124 2020] [ssl:warn] [pid 931:tid 3069374992] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 02 07:17:17.511083 2020] [mpm_event:notice] [pid 931:tid 3069374992] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Mon Mar 02 07:17:17.511256 2020] [core:notice] [pid 931:tid 3069374992] AH00094: Command line: '/usr/sbin/apache2'

Database logs


2020-03-02  7:26:28 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
2020-03-02  7:26:28 0 [Note] InnoDB: Using Linux native AIO
2020-03-02  7:26:28 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-03-02  7:26:28 0 [Note] InnoDB: Uses event mutexes
2020-03-02  7:26:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-03-02  7:26:28 0 [Note] InnoDB: Number of pools: 1
2020-03-02  7:26:28 0 [Note] InnoDB: Using generic crc32 instructions
2020-03-02  7:26:28 0 [Note] InnoDB: Initializing buffer pool, total size = 896M, instances = 1, chunk size = 128M
2020-03-02  7:26:28 0 [Note] InnoDB: Completed initialization of buffer pool
2020-03-02  7:26:28 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-03-02  7:26:28 0 [ERROR] InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1372579681 and the end 1372579328.
2020-03-02  7:26:28 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-03-02  7:26:28 0 [Note] InnoDB: Starting shutdown...
2020-03-02  7:26:29 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-03-02  7:26:29 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-03-02  7:26:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-03-02  7:26:29 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-03-02  7:26:29 0 [ERROR] Aborting