What's the best practice to upgrade grafana when db user do not have DDL permission

we have grafana 7.5.7 installed using mysql to store all config data, and now we want to upgrade grafana to latest 8.3.x.

the problem is our db user is read-only, and do not have create/update permission of schema, what we can only do is prepare DDL sql and using CI/CD tools to execute.

so, I’m wondering is there any way to generate upgrade SQL, or backup all data and restore them to a new db schema?

look forward any kinds of response, thanks first.

welcome to the :grafana: community @nylqd!

I’m not sure if this is what you’re looking for, but there are some database backup instructions in the upgrade guide: database backup

for MySQL it recommends:

backup:
> mysqldump -u root -p[root_password] [grafana] > grafana_backup.sql

restore:
> mysql -u root -p grafana < grafana_backup.sql