database-migrator icon indicating copy to clipboard operation
database-migrator copied to clipboard

Some parts of the export contain to few backslashes

Open klein-sipgate opened this issue 2 years ago • 0 comments
trafficstars

Hi

we use grafana as a part of percona's monitoring and management tool. While migrating that grafana (9.2.13) from sqlite to mysql backend, we faced the following issue:

Some dashboards have this in their data:

"regex":"/(([0-9\\.]+)\\.([0-9\\.]+)\\.([0-9\\.]+)-?([0-9?]+))/"

This is also exactly what goes into the dumped sql file.

However, after importing it into mysql, the data looks like this:

"regex":"/(([0-9\.]+)\.([0-9\.]+)\.([0-9\.]+)-?([0-9?]+))/"

Which ends up in a parse error and non-functional dashboard.

We manually edited the dump file so that it said

"regex":"/(([0-9\\\\.]+)\\\\.([0-9\\\\.]+)\\\\.([0-9\\\\.]+)-?([0-9?]+))/"

The dump could then be imported just fine.

klein-sipgate avatar May 12 '23 11:05 klein-sipgate