Recover mariadb database

Hello there, I had a Nextcloud instance running on a RockPro64, which seems to be fried (the board, not the system SD card). It won’t boot, even with new SD card and system, and I can still read the old SD card on another computer.

As the complete journey with this SBC was rather “adventurous”, I would like to switch back to a RPi. Exporting the database on a running system would be not problem, but how can I recover a database from the system SD card of a different computer? Is that even possible? (Backups exist, but the SBC broke in the course of creating a new one, so it is not up to date.)

Any help, ideas or hints are more than welcome!

Moving to ARM/Technical Assistance

I has been a very long time since I messed with mariadb and pretty much forgot all I knew about it but I wonder if you could put the sdcard un a usb reader and put it in your RPi and do a arch-chroot to it and run the export.

Thanks @Darksky, I will try that. Should that also work with Manjaro on another platform (e.g. x86 instead of ARM)?

Not with out having to jump through some hoops if you are meaning putting the aarch64 OS sdcard in your x86; different architectures.

Damn, I was hoping to prepare things before the RPi is here. Then I’ll have to wait and try.

Just wondering while I’m installing the basics on the RPi, I’m following this guide - Install LEMP stack (Nginx, MariaDB, PHP7) on Arch Linux Server in 2019 - which instructs to set a data directory for mariadb:

sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Could I just copy the data directory from the old system to the new one, given I keep the setup (username & password) identical? :thinking:

That was going to be my last ditch effort to suggest.


Just to round things up: I have given up on exporting the database from the previous install and am currently setting up a completely fresh install.

So a reminder to everyone else out there: Do your backups! :wink:

Best regards,

1 Like