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.
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)
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.