Hosted instance - Database Backup Options

I am using a (paid) hosted instance of NextCloud and need to backup the database. I’ve reached out to the provider and they haven’t given me a way to do this. They said, ā€œPlease try using the Nextcloud import/export app in the store.ā€ - I am not able to find this app. They have not gotten back to me.

After putting NextCloud into maintenance mode, it possible for me to get a backup using mysqldump:
mysqldump --single-transaction -h [hostname] -u [username] -p[password] [db_name]

But I don’t have the hostname. I think I was able to get the username, password and db_name using config:system:get dbuser, but I could be wrong. Is there any other way to get the hostname of the database? The hosting provider just isn’t responding to my emails.

What I don’t understand is: You have a managed Nextcloud, and yet you still have access to mysqldump? So, to the console via SSH? That seems a little strange/unusual to me.

But I’m not familiar with your setup / the setup of your Nextcloud provider.

But if you actually do have access:

  • You can find all MySQL data in config/config.php (yes, also the hostname)
  • Next, you can use mysqldump to dump the database, as you described

Is there a way for me to see the contents of config/config.php within the NextCloud UI? The hosting provider has not given me access to backend files using SSH or any other means.

I’m afraid not, not that I know of.

I’m little confused with your statements

but at the same time you can run occ and mysqldump commands?

so did you recieve data or not? if yes there is no difference what you see using occ and config.php (you need a special parameter to expose sensitive content in with occ)

but at the end in terms of backup only your hosting provider can help How To: Get Help on Shared Webhosting - Nextcloud community and definitely they must - if they don’t help you i would switch immediately.

The OCCWeb app allows me to run occ commands from a front end interface.
I am not able to run mysqldump commands from occweb. I do not have SSH access to run mysqldump commands.

I have not received the data. Yesterday, by email, the hosting provider said, ā€œWe can provide with a database dump every once in a while if you would like that.ā€ - So we will see if they give me a dump of the database.

The lesson learned… Before spending a lot of time tagging faces in NextCloud Memories, make sure you can readily get a database dump, to backup the time investment, especially when you learn that the app lacks fundamental capabilities that warrants discontinued use.