Moving to new database

Inherited an existing Nextcloud installation, version 31, but the database, Mariadb version 10.5, cannot be upgraded, let me explain. The database is running on a seperate server, Centos 7, but unable to log into the server hence unable to update the database and unable to run a backup of the database. The option I have is to spin up a new server, Ubuntu, and fresh install of Maria, current version. I understand I can run the occ utility to repopulate the tables but what is the options I need to use?

aa

T

when you say

“Centos 7, but unable to log into the server hence unable to run a backup”

You mean you can not login the centos7 server to make a backup but does the nextcloud still work?

Because if it is it seems that NC can still connect to the database and thus you can run a backup.

If you are familiar with nextcloud get your database login from the config.php or through the occ command.

When you have the login credentials you can use a one file php script to maintain sql databases. This is a powerfull tool found here Adminer

run this file locally enter the remote host ip and Database with credential. You can the pull a backup.

If you need any assistance don’t hesitate to ask

ps. You could also use

mysqldump –single-transaction --default-character-set=utf8mb4 -P 3310 -h Host-IP -u mysql_user -p database_name > database.sql

1 Like

Thanks for the help and direction. Wasn’t aware I could access the db remotely but yes unable to log into the Centos7 server but Nextcloud is connecting to the db. At some point in the servers life a misconfiguration occurred and now when you attempt to log in you get immediately logged out whether at the console of via ssh. I do have access to the Nextcloud config file but will not be able to try your suggestions until this afternoon as this is a side gig.

You state don’t hesitate to ask, are you asking me to reach out to you directly?

Well there maybe a different port normally 3306 is used but it’s unusual to have your database available on the www for security reasons!!

You can set mariadb to only allow specific IP-clients and use SSL if you have the need to make it public.

But your nextcloud server should have all the needed permissions.

For questions you can reply here.

I have adminer downloaded to an ubuntu 24.04 server with firefox and php 8.1.2-lubuntu2.22 (cli). All I get when I open the adminer.php file is text.

Thanks for your help.

Addendum, the ubuntu server has a desktop and the browser is being used on the same station.

This might be php dependency check first responds Here on OPs question.