Hello Uwe Could you send me the dumps of MySQL that script had generated?
Best regards *Wanderlei Hüttel* Em seg., 5 de set. de 2022 às 06:21, Uwe Schuerkamp < uwe.schuerk...@nionex.net> escreveu: > Hi folks, > > I've now tried to migrate my mariadb bacula db to postgres using > Wanderlei's scripts linked below. Sadly I end up with the same "hex > value" volume names in the media table. :.( It looks like newer > mariadb / mysql catalogs might require some extra steps to enable a > successful migration to postgresql. > > I've tried casting "blob" and "tinyblob" (the mariadb column types for > VolumeName, for example) to "text", but pgloader just hangs when > including those cast statements. > > Also, Dima wrote earlier: > > > Because it's a hex text, presumably ;) > > > This is likely happening when pulling the data out of mysql, not when > > displaying it in bconsole. > > > You could try `select encode(Volume, 'hex') from` whatever table it's > in, in > > psql. If that looks OK: `update $table set Volume=encode(Volume, 'hex')` > would > > be quick fix. Maybe add a guard along the lines of "where Volume like > '\x%'" > > or something. > > When doing the "select" outlined above I simply end up with the same > volume names minus the leading "\x": > > bacula=# select encode(VolumeName, 'hex') from media; > encode > ---------------------------- > 7a69662d66756c6c2d30303031 > 7a69662d696e63722d30303032 > 7a69662d696e63722d30303033 > ... > > > All the best, Uwe > > > > > On Tue, Aug 30, 2022 at 08:12:53PM -0300, Wanderlei Huttel wrote: > > Hello Uwe > > I've made a script to migrate MySQL/MariaDB to PostgreSQL > > [1] > https://github.com/wanderleihuttel/bacula-utils/tree/master/convert_mysql_to_postgresql > > I've found errors only in the Log table. > > I've looked for chars with wrong encoding and make an update in > MySQL, did > > a dump and import again for PostgreSQL only this table > > Best regards > > -- > Uwe Schürkamp // email: <uwe.schuerk...@bertelsmann.de> > > > >
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users