[Spacewalk-list] Migration question

Sean Roe Sean.Roe at cnanational.com
Mon Aug 21 17:49:49 UTC 2017


I found a solution that I am sharing with you. Because the linux postgresql database would barf on the ALF32UTF8 input file generated by doing the spacewalk-dump-schema command I had to take the output from that command and I ran it through the following command:

iconv -c -t utf-8 migrate-to-postgres.sql > migrate-to-postgres2.sql

and then do the:

spacewalk-sql -verbose migrate-to-postgres2.sql

Just thought I would share my solution.

Thanks,
Sean

From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Sean Roe
Sent: Friday, August 18, 2017 8:45 AM
To: spacewalk-list at redhat.com
Subject: [Spacewalk-list] Migration question

Hi All,


I have updated my spacewalk install to 2.6 and it appears to be running fine at this point.  We wish to migrate it off of Oracle and on to its own internal postgres instance.  I am following the document https://github.com/spacewalkproject/spacewalk/wiki/DatabaseMigrations and I have completed the dump of the database using



spacewalk-dump-schema --to=postgresql > blahblahblah.sql .



When I went to import it into postgres it appears there is some incompatibilities between AL32UTF8 and UTF8.  It appears to be an issue with \x0a characters in the data.  Has anybody come across this and how did they solve it?  Right now I am running the dump through sed like this:



sed 's/\\x0a/\\N/g' blahblahblah.sql  > postconv.sql



Any input would be helpful.



Thanks,

Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20170821/37dc98ae/attachment.htm>


More information about the Spacewalk-list mailing list