I want to safely restore My ERPNext site by replacing MariaDB’s data

I had to reinstall MariaDB on my Frappe/ERPNext instance (site1.local) and successfully restored the site from a .sql.gz backup (about 900 MB). After the reinstallation, I noticed that newer SQL backups were significantly smaller (around 50 MB), and when I restored one of these, the site loaded but contained no data—almost like a clean install. Fortunately, before doing any of this, I made a full backup of the MariaDB data directory by copying /var/lib/mysql to /home/erpnext/mysql_backup/. Now I want to restore the site using that raw MySQL data folder instead of relying on the possibly incomplete .sql backups. What’s the correct and safe way to restore the original data from /home/erpnext/mysql_backup/ so that my ERPNext site is fully functional again?