Hi, I have a raspberry pi 4 with a NCP image installed. After I mounted a second USB drive for backup, the path to dbdir seems to be changed. NextcloudPi Panel shows:
âdbdir: /media/USBdrive/ncdatabase (doesnât exist)â
This path should be /media/myCloudDrive/ncdatabase. If I try to change it via âconfig nc-databaseâ I get this result:
I followed the steps described in this post: https://github.com/nextcloud/nextcloudpi/issues/419 and changed the path to datadir in /etc/mysql/mariadb.conf.d/50-server.cnf to /media/myCloudDrive/ncdatabase.
However, the problem still exists: MariaDB remains down.
Iâm running NextcloudPi 1.24.0 and Nextcloud 18.0.3.0. This is whatâs inside /media/USBdrive/ncdatabase:
How can I change the path to the database so my Nextcloud will be up and running again?
You will likely need to edit NCâs config file.
sudo nano /var/www/nextcloud/config/config.php
and edit/check valueâs of:
âdatadirectoryâ =>
âtempdirectoryâ =>
âlogfileâ =>
Hi OliverV, Thanks for your quick reply!
I have checked the config.php and the values are:
âdatadirectoryâ => â/media/myCloudDrive/ncdata/tmpâ
âtempdirectoryâ => â/media/myCloudDrive/ncdata/tmpâ
âlogfileâ => â/media/myCloudDrive/ncdata/nextcloud.logâ
This is whatâs inside my â/media/myCloudDriveâ folder:
My NextcloudPi chrashed in march, so Iâve configured a new NexcloudPi. Is it possible that the new value must be âncdata-03-18-20â?
There is a typo/error in the datadirectory PATH, remove /tmp !
It should be:
âdatadirectoryâ => â/media/myCloudDrive/ncdataâ
ncdata-03-18-20 could be your backup, so no harm in trying it.
Thanks for your help and your really good eye for typos. Iâm sorry: I made a typo in the message itself - my config.php has the correct path (without /tmp). I have just checked /etc/mysql/mariadb.conf.d/50-server.cnf and these are the values in that file:
After a reboot MariaDB is still down.
I was expecting that the path for âdatadirâ in '/etc/mysql/mariadb.conf.d/50-server.cnf â would be visible in the NextcloudPi System info, but the âdbdirâ still points to â/media/USBdrive/ncdatabaseâ. Could this be the problem? And/or is there another config-file that I should change?
Check nc-database (NCP>>CONFIG)
USBdrive is itâs default example PATH.
Simply run it again using the myCloudDrive instead of USBdrive
and reboot or start the mariadb.service from terminal
I fixed the problem. After I changed the path to the database in etc/mysql/mariadb.conf.d/90-ncp.cnf and a reboot everything is working again.
@OliverV Many thanks for your help. Your suggestions made me repeat all the necessary steps and think a bit further.