Bacula-users

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

2015-07-06 07:39:33
Subject: Re: [Bacula-users] Migrating from MySQL to Postgres
From: Kern Sibbald <kern AT sibbald DOT com>
To: tballin <t.ballin AT studiorakete DOT de>, bacula-users AT lists.sourceforge DOT net
Date: Mon, 06 Jul 2015 13:37:19 +0200
Hello,

Why don't you simply use the backup option that comes with Bacula -- (make_catalog_backup script or make_catalog_backup.pl, perl script).  I believe that the script lists in comments how to restore the Bacula catalog backup.  The make_catalog_backup shell script has always worked perfectly for me.

Best regards,
Kern

On 06.07.2015 12:33, tballin wrote:
Thanks for the replys.

I did a partial import without the file information. I can keep the mysql for as long as I have to keep the old backups.

The main problem are the quotaitons of file names and log messages. I of course did have a look at the man page of mysqldump - but did not find any hint for better quotation. I'd used the option --compatible=postgresql and several sed command afterwards (correcting the timestamps) but that was was not sufficient.

Anyway. Since we do not rely on incrementals long time but mostly on full backups its for us more a questions of real perfomance testing with the new database server - with a empty file table even the old mysql configuration was very fast.

Timo



On 07/04/2015 05:16 PM, Alan Brown wrote:
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.




____ ESET 11889 (20150704) ____
The message was checked by ESET Mail Security.

------------------------------------------------------------------------------
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/


____ ESET 11889 (20150704) ____
The message was checked by ESET Mail Security.


_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users



____ ESET 11889 (20150704) ____
The message was checked by ESET Mail Security.


-- 
STUDIO RAKETE GmbH
Timo Ballin, System Administration
Schomburgstr. 120
D - 22767 Hamburg

t.ballin AT studiorakete DOT de
Tel:+49 (0)40 - 380 375 69 - 0
Fax:+49 (0)40 - 380 375 69 - 99

------------------------------------------------------
Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:

STUDIO RAKETE GmbH
Schomburgstr. 120 D - 22767 Hamburg

www.studiorakete.de / info AT studiorakete DOT de

Geschaeftsfuehrerin: Jana Bohl

Die Gesellschaft ist eingetragen im Handelregister des
Amtsgerichts Hamburg unter der Nummer HR B 95660
USt.-ID Nr.: DE 245787817 


____ ESET 11894 (20150706) ____
The message was checked by ESET Mail Security.

------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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>