Bacula-users

Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails

2012-12-28 16:31:31
Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
From: Wolfgang Denk <wd AT denx DOT de>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 28 Dec 2012 22:28:42 +0100
In message <20121228210203.4A8F5200F8F AT gemini.denx DOT de> I wrote:
> 
> There is no Windows system involved anywhere.  All are Linux boxen.
> And PostgreSQL appeas to complain about the first backtick in
> statements like
> 
>       INSERT INTO `File` VALUES (1422233176,1941692,37890,1487195,...
>                     ^
> 
> But I get the same error message when changing the ` into ' like that:
> 
>       INSERT INTO 'File' VALUES (1422233176,1941692,37890,1487195,...
> 
> So there must be some other problem...
> 
> Hm.... google tells me about some "--compatible=postgresql" argument
> to mysqldump ...
> 
> Will try that.  But then - why isn't this mentioned anywhere in the
> bacula docs?

Hm... with "--compatible=postgresql" the backtics get changed into '"'
characters, but the errors essentially remain the same:

ERROR:  syntax error at or near ""BaseFiles""
LINE 1: LOCK TABLES "BaseFiles" WRITE;
                    ^
ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
        ^
ERROR:  syntax error at or near ""CDImages""
LINE 1: LOCK TABLES "CDImages" WRITE;
                    ^
ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
        ^
ERROR:  syntax error at or near ""Client""
LINE 1: LOCK TABLES "Client" WRITE;
                    ^
ERROR:  relation "Client" does not exist
LINE 1: INSERT INTO "Client" VALUES (1,'diddl-fd','5.2.12 (12Sep12) ...
                    ^
ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
        ^
ERROR:  syntax error at or near ""Counters""
LINE 1: LOCK TABLES "Counters" WRITE;
                    ^
ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
        ^
ERROR:  syntax error at or near ""Device""
LINE 1: LOCK TABLES "Device" WRITE;
                    ^
ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
        ^
ERROR:  syntax error at or near ""File""
LINE 1: LOCK TABLES "File" WRITE;
                    ^
ERROR:  relation "File" does not exist
LINE 1: INSERT INTO "File" VALUES (1422233176,1941692,37890,1487195,...
                    ^
ERROR:  relation "File" does not exist
LINE 1: INSERT INTO "File" VALUES (1406866989,2278503,37516,1674162,...
                    ^
ERROR:  relation "File" does not exist
LINE 1: INSERT INTO "File" VALUES (1405758742,1170256,37516,907380,2...
                    ^


I have no idea what to try next.  Any pointers?  All help welcome.

Thanks in advance...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd AT denx DOT de
If you're not part of the solution, then you're part of the  precipi-
tate.

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users