Database Backup SSH

Hello,
i need to Backup my Database from OSMC installed on a RPI 3.
But sadly the PI´s HDMI Port is broken.
Iam able to acces via SSH.
Could someone explain how to Backup my Database.
I want to import it afterwards on a RPI 4.

https://kodi.wiki/view/MySQL/Backup_and_restore_databases#MySQLdump

If your using the regular non-MySQL database I’d just copy the entire /home/osmc/.kodi folder from your current install. If you had enabled Samba you could just pull that over from windows or alternatively you can plug in a storage device and just copy it over in the terminal. One you move to the Rpi 4 what you will want to do is “systemctl stop mediacenter” then delete the .kodi folder on the new install and then copy over the .kodi you pulled from the RPi 3. You will need to then delete .kodi/userdata/guisettings.xml as the RPi 4 has some settings in there that are different than the RPi 3 and this will cause problems. Once you have done that then just “systemctl start mediacenter” and you should be good other than needing to setup everything in Kodi’s settings again.