Hello,
I'm trying to migrate from a mysql backend to a postgresql backend and
I'm getting an error importing the RestoreObject table. Specifically I'm
getting :
ERROR: invalid input syntax for type bytea
LINE 1: ...bjectCompression) VALUES (1588,'job_metadata.xml','<B\0A\0C\...
Googling around leads me to believe that Postgres isn't liking the
format of RestoreObject field, but I'm stumped as to how to change it.
So my questions: Can anyone suggest a way to modify the INSERT
statement to one Postgres will understand? Do I actually need to import this
table, or will the entries get re-populated as successful backups are completed?
Additional Info:
This is on Fedora 27, Bacula version is 9.0.5, the MySQL database is MariaDB
10.2.9, the PostgreSQL database is 9.6.6. The mysqldump command used to
generate the import file is :
mysqldump -t -n -c -e --compatible=postgresql --skip-quote-names --skip-opt
--disable-keys --lock-tables -u bacula -pXXXXX bacula | grep -v "INSERT INTO
Status" | sed -e 's/0000-00-00 00:00:00/1970-01-01 00:00:00/g' | sed -e
's/\\0//' | sed -e "s#\\\'#\'\'#g" > bacula-export.sql
The pqsl command used to import the dump is:
psql -Ubacula bacula < bacula-export.sql
Thanks,
Michel
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users