Nextcloud change database?

Hi guys,

I’m hoping someone can help. I installed Nextcloud using the instructions here: https://doc.turris.cz/doc/en/howto/nextcloud, which worked fine. I’ve got the NAS perk, so I have 2 10tb drives inside my enclosure, but they already have data on (part) of them, so I didn’t want to use the method of formatting and mounting as described in the HOWTO.

I have some questions:

  1. Assuming my tinkering has screwed things up, what’s the easiest way to uninstall Nextcloud, installed per the tutorial, so I can start from scratch?

  2. How can I change the database to a folder on one of my mounted drives? (i.e. /mnt/sdb1/NextCloud/mysql? I’ve tried modifying the directory in /etc/my.cnf without success.

Any help appreciated, thanks!

–Chris

Nobody has any insight on changing Nextcloud database on openwrt?

You can try to create a dump of the db (mysqldump database nc_dbname > dump.sql), stopping mysql (/etc/init.d/mysqld stop) and then follow https://wiki.openwrt.org/doc/howto/http.lamp#mysql to set it up again.
After that start with /etc/init.d/mysqld start, restore the db from the dump mysql < dump.sql. After that you may have to adjust the database permissions for the nextcloud user (credentials should be written in the config.php of the nextcloud web root).

I’m not using nextcloud or mysql on my TO and so I didn’t test it.

Thank you, I’ll give that a shot!