Data migration from Grafana 8.5.10 to 9.3.6

I am trying to take a psql grafana backup from Grafana 8.5.10 and restore it to the 9.3.6 version. I am facing this issue.

{“error”:“pq: column \“last_used_at\” does not exist”,“level”:“error”,“logger”:“context”,“msg”:“Failed to get settings”,“orgId”:0,“t”:“2023-09-05T10:51:33.675277103Z”,“uname”:“”,“userId”:0}

This column last_used_at is not present in the Grafana 8.5.10 db schema.

Whether the complete Grafana DB backup allowed from the older version to the latest Grafana version?

You have to do a proper migration of the v8 to v9. You cant just restore it as there are schema differences between the two.

You have to spin a clone of your v8 then uograde that one to v9, the upgrade provess will take care of the migration for you

Thank you for your response @yosiasz
I am looking for a scenario where I can take a backup from Grafana v8 and restore it on another cluster where Grafana v9 is installed.
In that case, Do I need to take the backup of the particular tables where the custom data is stored for example custom dashboard?

You cant. What is in v8 that you want in v9? Dashboards? Alerts?

I want to restore the dashboards. Are there any specific tables to take backup and restore?

again you cant do that as there might be schema differences. how many dashboards

The dashboard count range is between 10 to 20.