Hello,

2017-11-30 17:14 GMT+01:00 Wanderlei Huttel <wanderleihut...@gmail.com>:

> Hello Radoslaw
>
> Could you explain better about "mysqldump --hex-blob"?
>
>
The default mysqldump will export any blob in the form which cannot be used
to import it into a postgresql. It looks something like this:

INSERT INTO RestoreObject (RestoreObjectId, ObjectName, RestoreObject,
PluginName, ObjectLength, ObjectFullLength, ObjectIndex, ObjectType,
FileIndex, JobId, ObjectCompression) VALUES
(2088,'job_metadata.xml','<B\0A\0C\0K\0U\0P\0_\0C\0O\0M\0P\0O\0N\0E\0N\0T\0S\0
\0x\0m\0l\0n\0s\0=\0\"\0x\0-\0s\0c\0h\0e\0m\0a\0:\0#\0V\0s\0s\0C\0o\0m\0p\0o\0n\0e\0n\0t\0M\0e\0t\0a\0d\0a\0t\0a\0\"\0
\0v\0e\0r\0s\0i\0o\0n\0=\0\"\01\0.\02\0\"\0
\0b\0o\0o\0t\0a\0b\0l\0e\0S\0y\0s\0t\0e\0m\0S\0t\0a\0t\0e\0B\0a\0c\0k\0u\0p\0=\0\"\0y\0e\0s\0\"\0
\0s\0e\0l\0e\0c\0t\0C\0o\0m\0p\0o\0n\0e\0n\0t\0s\0=\0\"\0y\0e\0s\0\"\0
\0b\0a\0c\0k\0u\0p\0T\0y\0p\0e\0=\0\"\0i\0n\0c\0r\0e\0m\0e\0n\0t\0a\0l\0\"\0
\0p\0a\0r\0t\0i\0a\0l\0F\0i\0l\0e\0S\0u\0p\0p\0o\0r\0t\0=\0\"\0n\0o\0\"\0
\0s\0n\0a\0p\0s\0h\0o\0t\0S\0e\0t\0I\0d\0=\0\"\09\03\0d\0a\08\02\0c\0f\0-\0a\03\0e\0e\0-\04\0c\0b\06\0-\0a\08\02\03\0-\02\0c\0f\00\02\02\01\0d\09\06\0d\08\0\"\0/\0>\0\0\0','job',462,462,1506024766,25,596,26229,0);

what you could import into postgresql should be prepared as:

insert into restoreobject values
(2088,'job_metadata.xml',decode('3C004200410043004B00550050005F0043004F004D0050004F004E0045004E0054005300200078006D006C006E0073003D00220078002D0073006300680065006D0061003A00230056007300730043006F006D0070006F006E0065006E0074004D00650074006100640061007400610022002000760065007200730069006F006E003D00220031002E0032002200200062006F006F007400610062006C006500530079007300740065006D00530074006100740065004200610063006B00750070003D00220079006500730022002000730065006C0065006300740043006F006D0070006F006E0065006E00740073003D002200790065007300220020006200610063006B007500700054007900700065003D00220069006E006300720065006D0065006E00740061006C00220020007000610072007400690061006C00460069006C00650053007500700070006F00720074003D0022006E006F002200200073006E0061007000730068006F007400530065007400490064003D002200390033006400610038003200630066002D0061003300650065002D0034006300620036002D0061003800320033002D0032006300660030003200320031006400390036006400380022002F003E000000','hex'),'job',462,462,1506024766,25,596,26229,0);

best regards
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to