Backup HASS history of devices data

I have AIO HASS 0.56 running with some nice graphs created and wanted to know how can i backup those history data and restore it on another RPi with clean install. I had lot of other things installed on current RPi and wanted to keep HASS alone.

For config i believe i would copy all those config files.

There should be a sqlite3 db file in your config. That’s the database. If you copy over your entire config directory it should follow your install.

I prefer to point my Home Assistant to a real database running postgresql or MySQL.

I already use MariaDB on my RPi3 can i use that and where would i specify the alternative database configuration and would it start clean or it can copy all my existing data from sqllite to MariaDB?

You are already running all your HASS data through the database? Your comment isn’t really clear on what you’re using mariadb for.

If you want to specify a different database for your home assistant to use, you do that in the recorder component.

I am using tt-rss server on RPi that uses MariaDB (I believe RPi3 comes pre-installed).
Anyway i will try the config you mentioned. thanks so much.