Bacula-users

Re: [Bacula-users] Migrating from MySQL to Postgres

2015-07-04 11:22:38
Subject: Re: [Bacula-users] Migrating from MySQL to Postgres
From: Alan Brown <ajb2 AT mssl.ucl.ac DOT uk>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 04 Jul 2015 16:16:13 +0100
On 04/07/15 13:09, Jari Fredriksson wrote:

On 29.6.2015 16.47, tballin wrote:
Hi

I try to migrate from am mysql db to postgres. I am failing to import
thy mysql dump into the postrgres :
(according to these instructions:
http://www.bacula.org/7.0.x-manuals/en/main/Installing_Configuring_Post.html#SECTION004150000000000000000
bacula 7.1 / CentOS )
lots of
psql:/tmp/bacula-backup2pg.sql:46485014: invalid command
\'].sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:46485018: invalid command
\'].sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:46485025: invalid command
\'].sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:46485027: invalid command
\'].sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:46485042: invalid command
\'].sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:46485194: invalid command
\'-Marker.sublime-snippet');
psql:/tmp/bacula-backup2pg.sql:62088431: out of memory

The point is - I do not need really the big file table (33M+ rows) since
we will start the migration - or better finish the migration with a new
full backup and could keep the old mysql until no longer needed.

But I would like to keep as much information as possible. e.g. the
volume labels/pools. Is there a easy way to just do that?

If any one had a good Idea or documentation how to do that I would
depreciate any help.

Timo



I think it is not possible to run the dump (created by mysqldump) as is.

There are several database conversion tools available for this. That 
said, I have never yet done this... it is in my mind to do, but have not 
yet had the time.


First step: mysql dumps are not directly compatible with pgsql.

You must make a compatible mysql dump.

man mysqldump and look at the archives of this list. Several people have posted howtos over the years.


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>