Bacula-users

Re: [Bacula-users] Bacula-users Digest, Vol 80, Issue 16

2012-12-31 12:44:50
Subject: Re: [Bacula-users] Bacula-users Digest, Vol 80, Issue 16
From: Eric Santelices <ericsante AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 31 Dec 2012 12:40:39 -0500
unsubscribe

On Dec 30, 2012, at 9:50 PM, bacula-users-request AT lists.sourceforge DOT net 
wrote:

> Send Bacula-users mailing list submissions to
>       bacula-users AT lists.sourceforge DOT net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/bacula-users
> or, via email, send a message with subject or body 'help' to
>       bacula-users-request AT lists.sourceforge DOT net
> 
> You can reach the person managing the list at
>       bacula-users-owner AT lists.sourceforge DOT net
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bacula-users digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: PostgreSQL - how to exclude bacula database? (Dan Langille)
>   2. PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>   3. Re: PostgreSQL: import of DB from MySQL fails (Bryan Harris)
>   4. Re: PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>   5. Re: PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>   6. Re: PostgreSQL: import of DB from MySQL fails
>      (Marco van Wieringen)
>   7. Re: PostgreSQL: import of DB from MySQL fails (Andrea Conti)
>   8. Re: PostgreSQL: import of DB from MySQL fails (Dan Langille)
>   9. Re: PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>  10. Re: PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>  11. Re: PostgreSQL: import of DB from MySQL fails (Wolfgang Denk)
>  12. Re: PostgreSQL: import of DB from MySQL fails
>      (Marco van Wieringen)
>  13. Re: PostgreSQL: import of DB from MySQL fails (Dan Langille)
>  14. How is "the c" (st_ctime) option letter for the
>      accurate/basejob/verify FileSet options interpreted on Windows
>      clients? (Ken Healy (Outgoing mail only, please reply to list))
>  15. With "Ignore FileSet Changes = yes", how long are the changes
>      ignored for? Is the behavior different when using base jobs?
>      (Ken Healy (Outgoing mail only,  please reply to list))
>  16. Interaction of "signature" option with "accurate" and
>      "basejob" FileSet options
>      (Ken Healy (Outgoing mail only,  please reply to list))
>  17. Re: With "Ignore FileSet Changes = yes", how long are the
>      changes ignored for? Is the behavior different   when using base
>      jobs? (Dan Langille)
>  18. director fails with "undefined symbol:   mysql_thread_safe"
>      (Jeff Dickens)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 28 Dec 2012 10:02:26 -0500
> From: Dan Langille <dan AT langille DOT org>
> Subject: Re: [Bacula-users] PostgreSQL - how to exclude bacula
>       database?
> To: J?r?me Blion <jerome.blion AT free DOT fr>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <6A28FB05-DD62-46E9-90C0-8A95ADACA3A2 AT langille DOT org>
> Content-Type: text/plain; charset=iso-8859-1
> 
> On Dec 28, 2012, at 6:12 AM, J?r?me Blion wrote:
> 
>> Le 2012-12-28 11:19, lst_hoe02 AT kwsoft DOT de a ?crit :
>>> Zitat von Dan Langille <dan AT langille DOT org>:
>>> 
>>>> On Dec 27, 2012, at 8:40 PM, J?r?me Blion wrote:
>>>> 
>>>>> You can use pg_dump to backup databases separately. (as far as I 
>>>>> know,
>>>>> the pg_dump creates consistent backup by defaults, whereas 
>>>>> mysqldump
>>>>> does not by default)
>>>> 
>>>> 
>>>> Say what?  mysqldump doesn't produce a valid backup?
>>> 
>>> Back in ancient times there where problems with some backends doesn't
>>> produce valid *online* backups with mysqldump, but that's a long gone
>>> story as far as i know.
>>> 
>>> Regards
>>> 
>>> Andreas
>> 
>> http://dba.stackexchange.com/questions/6363/consistent-logical-backup-of-databases-that-use-myisam-and-innodb-engines
>> http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_single-transaction
>> 
>> And another reason not to use mysqldump on production systems: the 
>> nightmare begins when you have to restore a huge dump.
>> 
>> http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/
>> 
>> As long as Mysql uses non transactional engines, if you want a 
>> consistent backup of all databases, you will have to create an outage 
>> during the whole duration of the backup.
>> 
>> (that's why I use other tools like mylvmbackup and mydumper when I can 
>> afford to loose some records)
> 
> That's why I use PostgreSQL.  No hoops.  No gotchas.  
> 
> -- 
> Dan Langille - http://langille.org
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 28 Dec 2012 17:06:51 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID: <20121228160651.74877200F79 AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> Hi,
> 
> now that I got the PostgreSQL setup working, I try to import my data
> from the old MySQL configuration.  I'm following the instructions at
> http://www.bacula.org/manuals/en/catalog/catalog/Installi_Configur_PostgreS.html
> especially section "Converting from MySQL to PostgreSQL".
> 
> However, when trying to run the commands exported by MySQL, I get a
> ton of syntax errors:
> 
> ERROR:  syntax error at or near "`"
> LINE 1: LOCK TABLES `BaseFiles` WRITE;
>                    ^
> ERROR:  syntax error at or near "UNLOCK"
> LINE 1: UNLOCK TABLES;
>        ^
> ERROR:  syntax error at or near "`"
> LINE 1: LOCK TABLES `CDImages` WRITE;
>                    ^
> ERROR:  syntax error at or near "UNLOCK"
> LINE 1: UNLOCK TABLES;
>        ^
> ERROR:  syntax error at or near "`"
> LINE 1: LOCK TABLES `Client` WRITE;
>                    ^
> ERROR:  syntax error at or near "`"
> 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 "`"
> LINE 1: LOCK TABLES `Counters` WRITE;
>                    ^
> ERROR:  syntax error at or near "UNLOCK"
> LINE 1: UNLOCK TABLES;
>        ^
> ERROR:  syntax error at or near "`"
> LINE 1: LOCK TABLES `Device` WRITE;
>                    ^
> ERROR:  syntax error at or near "UNLOCK"
> LINE 1: UNLOCK TABLES;
>        ^
> ERROR:  syntax error at or near "`"
> LINE 1: LOCK TABLES `File` WRITE;
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1422233176,1941692,37890,1487195,...
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1406866989,2278503,37516,1674162,...
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1405758742,1170256,37516,907380,2...
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1405736710,1148224,37516,935293,1...
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1405744738,1156252,37516,935661,1...
>                    ^
> ERROR:  syntax error at or near "`"
> LINE 1: INSERT INTO `File` VALUES (1414375645,393904,37886,7163,1817...
>                    ^
> ...
> 
> It appears that the file formats are not compatible. Is there
> anything I'm missing, or some simple fix (like substituting all "`"
> charatcers with "'" or so) ?
> 
> 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
> Until you walk a mile in another man's moccasins, you  can't  imagine
> the smell.
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 28 Dec 2012 14:39:58 -0500
> From: Bryan Harris <bryanlharris AT me DOT com>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Wolfgang Denk <wd AT denx DOT de>
> Cc: "bacula-users AT lists.sourceforge DOT net"
>       <bacula-users AT lists.sourceforge DOT net>
> Message-ID: <29D76671-F52F-403B-928A-BF6126972537 AT me DOT com>
> Content-Type: text/plain; CHARSET=US-ASCII
> 
> Just a long shot, but did you try dos2unix?
> 
> Bryan
> 
> On Dec 28, 2012, at 11:06 AM, Wolfgang Denk <wd AT denx DOT de> wrote:
> 
>> Hi,
>> 
>> now that I got the PostgreSQL setup working, I try to import my data
>> from the old MySQL configuration.  I'm following the instructions at
>> http://www.bacula.org/manuals/en/catalog/catalog/Installi_Configur_PostgreS.html
>> especially section "Converting from MySQL to PostgreSQL".
>> 
>> However, when trying to run the commands exported by MySQL, I get a
>> ton of syntax errors:
>> 
>> ERROR:  syntax error at or near "`"
>> LINE 1: LOCK TABLES `BaseFiles` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "UNLOCK"
>> LINE 1: UNLOCK TABLES;
>>       ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: LOCK TABLES `CDImages` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "UNLOCK"
>> LINE 1: UNLOCK TABLES;
>>       ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: LOCK TABLES `Client` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "`"
>> 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 "`"
>> LINE 1: LOCK TABLES `Counters` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "UNLOCK"
>> LINE 1: UNLOCK TABLES;
>>       ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: LOCK TABLES `Device` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "UNLOCK"
>> LINE 1: UNLOCK TABLES;
>>       ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: LOCK TABLES `File` WRITE;
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1422233176,1941692,37890,1487195,...
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1406866989,2278503,37516,1674162,...
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1405758742,1170256,37516,907380,2...
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1405736710,1148224,37516,935293,1...
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1405744738,1156252,37516,935661,1...
>>                   ^
>> ERROR:  syntax error at or near "`"
>> LINE 1: INSERT INTO `File` VALUES (1414375645,393904,37886,7163,1817...
>>                   ^
>> ...
>> 
>> It appears that the file formats are not compatible. Is there
>> anything I'm missing, or some simple fix (like substituting all "`"
>> charatcers with "'" or so) ?
>> 
>> 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
>> Until you walk a mile in another man's moccasins, you  can't  imagine
>> the smell.
>> 
>> ------------------------------------------------------------------------------
>> 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
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Fri, 28 Dec 2012 22:02:03 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Bryan Harris <bryanlharris AT me DOT com>
> Cc: "bacula-users AT lists.sourceforge DOT net"
>       <bacula-users AT lists.sourceforge DOT net>
> Message-ID: <20121228210203.4A8F5200F8F AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> Dear Bryan,
> 
> In message <29D76671-F52F-403B-928A-BF6126972537 AT me DOT com> you wrote:
>> Just a long shot, but did you try dos2unix?
> 
> No, I didn't (but it doesn't help either).
> 
> 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?
> 
> 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
> "When the only  tool  you  have  is  a  hammer,  you  tend  to  treat
> everything as if it were a nail."                    - Abraham Maslow
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Fri, 28 Dec 2012 22:28:42 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: "bacula-users AT lists.sourceforge DOT net"
>       <bacula-users AT lists.sourceforge DOT net>
> Message-ID: <20121228212842.75133200F93 AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> 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.
> 
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Fri, 28 Dec 2012 22:42:36 +0000 (UTC)
> From: Marco van Wieringen <mvw AT planets.elm DOT net>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID: <loom.20121228T234109-522 AT post.gmane DOT org>
> Content-Type: text/plain; charset=us-ascii
> 
> Wolfgang Denk <wd <at> denx.de> writes:
> 
>> 
>> I have no idea what to try next.  Any pointers?  All help welcome.
> Maybe try the in 2010 working solution available here
> 
> http://mtu.net/~jpschewe/blog/2010/06/migrating-bacula-from-mysql-to-postgresql/
> 
> which is way more up to date then anything in the current docs which talk
> about a 1.x version of 8+ years ago.
> 
> Marco
> 
> 
> 
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Sat, 29 Dec 2012 10:35:48 +0100
> From: Andrea Conti <alyf AT alyf DOT net>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID: <50DEB974.1070709 AT alyf DOT net>
> Content-Type: text/plain; charset=ISO-8859-1
> 
>> 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;
> 
> Postgres has a different syntax for the LOCK command, and has no UNLOCK.
> You can safely remove LOCK/UNLOCK commands as they're not needed in this
> scenario.
> 
>> ERROR:  relation "Client" does not exist
>> LINE 1: INSERT INTO "Client" VALUES (1,'diddl-fd','5.2.12 (12Sep12) ...
> 
> You must create the tables before inserting data. You can either tell
> mysqldump to also dump the db schema (but you will have to review the
> CREATE TABLE statements as there are differences in type names) or
> create the schema using the postgres SQL script which comes with bacula.
> 
> If you manage to insert all data in the new db, be sure to validate it
> by performing a test restore.
> 
> Depending on your setup, you could also consider creating an empty
> database and bscanning all existing volumes into it.
> 
> HTH
> andrea
> 
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Sat, 29 Dec 2012 10:53:25 -0500
> From: Dan Langille <dan AT langille DOT org>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Andrea Conti <alyf AT alyf DOT net>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <59739303-6CCD-4198-9F10-135CEC184503 AT langille DOT org>
> Content-Type: text/plain; charset=windows-1252
> 
> On Dec 29, 2012, at 4:35 AM, Andrea Conti wrote:
> 
>>> 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;
>> 
>> Postgres has a different syntax for the LOCK command, and has no UNLOCK.
>> You can safely remove LOCK/UNLOCK commands as they're not needed in this
>> scenario.
>> 
>>> ERROR:  relation "Client" does not exist
>>> LINE 1: INSERT INTO "Client" VALUES (1,'diddl-fd','5.2.12 (12Sep12) ...
>> 
>> You must create the tables before inserting data. You can either tell
>> mysqldump to also dump the db schema (but you will have to review the
>> CREATE TABLE statements as there are differences in type names) or
>> create the schema using the postgres SQL script which comes with bacula.
> 
> Yes.  Let the Bacula scripts create the PostgreSQL tables, then export only 
> data from MySQL.
> 
>> If you manage to insert all data in the new db, be sure to validate it
>> by performing a test restore.
>> 
>> Depending on your setup, you could also consider creating an empty
>> database and bscanning all existing volumes into it.
> 
> 
> As a last resort?.
> 
> -- 
> Dan Langille - http://langille.org
> 
> 
> 
> 
> ------------------------------
> 
> Message: 9
> Date: Sun, 30 Dec 2012 10:40:09 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Marco van Wieringen <mvw AT planets.elm DOT net>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <20121230094009.86DC8200F75 AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> Dear Marco van Wieringen,
> 
> In message <loom.20121228T234109-522 AT post.gmane DOT org> you wrote:
>> 
>>> I have no idea what to try next.  Any pointers?  All help welcome.
>> Maybe try the in 2010 working solution available here
>> 
>> http://mtu.net/~jpschewe/blog/2010/06/migrating-bacula-from-mysql-to-postgresql/
>> 
>> which is way more up to date then anything in the current docs which talk
>> about a 1.x version of 8+ years ago.
> 
> Indeed - the document says:
> 
>        This process was tested using the following software
>        versions:
> 
>            Linux Mandrake 10/Kernel 2.4.22-10 SMP
>            Mysql Ver 12.21 Distrib 4.0.15, for mandrake-linux-gnu (i586)
>            PostgreSQL 7.3.4
>            Bacula 1.34.5
> 
> No surprise this is breaking down.
> 
> 
> With your description I get no errors, but I'm still not through.
> Observations:
> 
> - With the options used here, mysqldump needs much longer, and it
>  consumes an awful lot of memory - in my case close to 14 GB.  I had
>  to add extra swp space because the 4 GB RAM / 4 GB swap I had on my
>  ol d DB server did not work.
> 
> - The generates SQL dump is about twice as large as the dumps I got
>  before.
> 
> - The import into PostgreSQL is terribly slow.  It spits out a large
>  number of lines "INSERT 0 1" on the terminal (7.7 millions such
>  lines so far, after about 20 hours of run time); but my SQL dump
>  file contains more than 72 millions 'INSERT INTO' lines.  Extra-
>  polating from that the import will take at least 190 hours or about 
>  8 days.  And this is only the smaller of my bacula databases...
> 
>  Is there something going wrong?  I guess there is no way to check
>  before the process completes, right?
> 
> 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
> "What if" is a trademark of Hewlett Packard, so stop using it in your
> sentences without permission, or risk being sued.
> 
> 
> 
> ------------------------------
> 
> Message: 10
> Date: Sun, 30 Dec 2012 10:45:36 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Andrea Conti <alyf AT alyf DOT net>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <20121230094536.0E079200F75 AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> Dear Andrea,
> 
> thanks for your help.
> 
> In message <50DEB974.1070709 AT alyf DOT net> you wrote:
>>> 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;
>> 
>> Postgres has a different syntax for the LOCK command, and has no UNLOCK.
>> You can safely remove LOCK/UNLOCK commands as they're not needed in this
>> scenario.
> 
> It appears there are more differences...
> 
>>> ERROR:  relation "Client" does not exist
>>> LINE 1: INSERT INTO "Client" VALUES (1,'diddl-fd','5.2.12 (12Sep12) ...
>> 
>> You must create the tables before inserting data. You can either tell
>> mysqldump to also dump the db schema (but you will have to review the
>> CREATE TABLE statements as there are differences in type names) or
>> create the schema using the postgres SQL script which comes with bacula.
> 
> I did create the tables before - I followed the instructions and ran
> the commands
> 
>       ./drop_bacula_tables
>       ./make_bacula_tables
>       ./grant_bacula_privileges
> 
> before attempting the DB import.
> 
>> Depending on your setup, you could also consider creating an empty
>> database and bscanning all existing volumes into it.
> 
> This is not really an option for me.  I have >700 tapes (including a
> large number of old, slow SLR100 and DDS-3 tapes) in 2 databases.
> Scanning these tapes would take ages and cause a significant amount of
> manual interaction.
> 
> 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
> "It is better for civilization to be going down the drain than to  be
> coming up it."                                          - Henry Allen
> 
> 
> 
> ------------------------------
> 
> Message: 11
> Date: Sun, 30 Dec 2012 10:50:24 +0100
> From: Wolfgang Denk <wd AT denx DOT de>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Dan Langille <dan AT langille DOT org>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <20121230095024.61963200F75 AT gemini.denx DOT de>
> Content-Type: text/plain; charset=UTF-8
> 
> Dear Dan,
> 
> In message <59739303-6CCD-4198-9F10-135CEC184503 AT langille DOT org> you 
> wrote:
>> 
>> Yes.  Let the Bacula scripts create the PostgreSQL tables, then export only
>> data from MySQL.
> 
> This is what I'm trying to do.
> 
> But the instructions at
> http://www.bacula.org/manuals/en/catalog/catalog/Installi_Configur_PostgreS.html
> simply don't work at all (no surprise, as these appear to be more than
> 8 years old and refer to ancient versions.
> 
> The description recommended by Marco:
> http://mtu.net/~jpschewe/blog/2010/06/migrating-bacula-from-mysql-to-postgresql/
> appears to work much better (at least no errors so far), albeit
> _terribly_ slow.  I did not expect import times in the order of
> _weeks_.
> 
> 
> Has anybody else successfully done an update MySQL => PostgrS!L
> recently?
> 
> 
> 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
> : ... and it's got weird formatting - Notepad, Write, Works  3  can't
> : decipher it, and it's too big to go in DOS Edit. Help!
> Install an operating system. :-)                  -- Tom Christiansen
> 
> 
> 
> ------------------------------
> 
> Message: 12
> Date: Sun, 30 Dec 2012 11:43:30 +0100
> From: Marco van Wieringen <mvw AT planets.elm DOT net>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Wolfgang Denk <wd AT denx DOT de>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <50E01AD2.5000109 AT planets.elm DOT net>
> Content-Type: text/plain; charset="utf-8"
> 
> On 12/30/12 10:40 AM, Wolfgang Denk wrote:
>> Dear Marco van Wieringen,
>> 
>> In message <loom.20121228T234109-522 AT post.gmane DOT org> you wrote:
>>>> I have no idea what to try next.  Any pointers?  All help welcome.
>>> Maybe try the in 2010 working solution available here
>>> 
>>> http://mtu.net/~jpschewe/blog/2010/06/migrating-bacula-from-mysql-to-postgresql/
>>> 
>>> which is way more up to date then anything in the current docs which talk
>>> about a 1.x version of 8+ years ago.
>> Indeed - the document says:
>> 
>>       This process was tested using the following software
>>       versions:
>> 
>>           Linux Mandrake 10/Kernel 2.4.22-10 SMP
>>           Mysql Ver 12.21 Distrib 4.0.15, for mandrake-linux-gnu (i586)
>>           PostgreSQL 7.3.4
>>           Bacula 1.34.5
>> 
>> No surprise this is breaking down.
> Yes 2.4 kernel, 7 series PostgreSQL should ring a bell. All from long 
> long ago.
> B.T.W. this info comes from the wiki which has most of the time much more
> up to data docs then the official docs. We only can do so much nobody
> seems to be interested in updating the docs and there are more interesting
> things to explore.
> 
>> 
>> With your description I get no errors, but I'm still not through.
>> Observations:
>> 
>> - With the options used here, mysqldump needs much longer, and it
>>   consumes an awful lot of memory - in my case close to 14 GB.  I had
>>   to add extra swp space because the 4 GB RAM / 4 GB swap I had on my
>>   old DB server did not work.
> Try the |--quick| 
> <http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_quick>,
>  
> |-q option.
> 
> http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_quick
> |
>> - The generates SQL dump is about twice as large as the dumps I got
>>   before.
> That could be because its using a compatible format.Its probably also not
> the smartest way of inserting data into PostgreSQLe.g. using the copy in
> PostgreSQL constructs etc.
> 
> Maybe you should look here and see if there is something better then
> mysqldump etc.
> 
> http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
> 
>> - The import into PostgreSQL is terribly slow.  It spits out a large
>>   number of lines "INSERT 0 1" on the terminal (7.7 millions such
>>   lines so far, after about 20 hours of run time); but my SQL dump
>>   file contains more than 72 millions 'INSERT INTO' lines.  Extra-
>>   polating from that the import will take at least 190 hours or about
>>   8 days.  And this is only the smaller of my bacula databases...
>> 
>>   Is there something going wrong?  I guess there is no way to check
>>   before the process completes, right?
> Did you even tune the PostgreSQL database ? With the stuff you are trying
> to insert you need to first tune your PostgreSQL database with bigger
> memory buffers etc. The defaults of PostgreSQL are like from the 80's
> and make sure you have a proper amount of RAM in the box running
> the database with this amount of data. Next to that is probably whining
> it taking a log switch every x seconds (or maybe even more per second)
> also due to the fact the defaults don't work to well for these enormous
> amounts of inserts.
> 
> If you don't know what to do you could start with pgtune which at least
> may lead to somewhat more sane settings then the defaults. But it seems
> you need to do some serious tuning to get this running.
> 
> Last option would be to look into tools like these:
> 
> http://www.enterprisedb.com/products-services-training/products-overview/postgres-plus-solution-pack/migration-toolkit
> 
> I think its free to use and probably will work for migrating to a
> normal postgresql database too (as enterprise db is just a commercial
> version of postgresql).
> 
> Marco
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> Message: 13
> Date: Sun, 30 Dec 2012 07:21:17 -0500
> From: Dan Langille <dan AT langille DOT org>
> Subject: Re: [Bacula-users] PostgreSQL: import of DB from MySQL fails
> To: Wolfgang Denk <wd AT denx DOT de>
> Cc: "bacula-users AT lists.sourceforge DOT net"
>       <bacula-users AT lists.sourceforge DOT net>
> Message-ID: <078A8CA8-46CC-46E5-AFCE-CCFDE5644FAE AT langille DOT org>
> Content-Type: text/plain;     charset=us-ascii
> 
> On Dec 30, 2012, at 4:50 AM, Wolfgang Denk <wd AT denx DOT de> wrote:
> 
>> Dear Dan,
>> 
>> In message <59739303-6CCD-4198-9F10-135CEC184503 AT langille DOT org> you 
>> wrote:
>>> 
>>> Yes.  Let the Bacula scripts create the PostgreSQL tables, then export only
>>> data from MySQL.
>> 
>> This is what I'm trying to do.
>> 
>> But the instructions at
>> http://www.bacula.org/manuals/en/catalog/catalog/Installi_Configur_PostgreS.html
>> simply don't work at all (no surprise, as these appear to be more than
>> 8 years old and refer to ancient versions.
>> 
>> The description recommended by Marco:
>> http://mtu.net/~jpschewe/blog/2010/06/migrating-bacula-from-mysql-to-postgresql/
>> appears to work much better (at least no errors so far), albeit
>> _terribly_ slow.  I did not expect import times in the order of
>> _weeks_.
> 
> I see things in there which I feel are suspect. Eg the dates; they should be 
> null. 
> 
>> 
>> 
>> Has anybody else successfully done an update MySQL => PostgrS!L
>> recently?
> 
> I would look at non-Bacula resources. What you are doing is 
> Postgresql-specific.  
> 
> -- 
> Dan Langille
> http://langille.org/
> 
> 
> ------------------------------
> 
> Message: 14
> Date: Sun, 30 Dec 2012 20:16:36 -0600
> From: "Ken Healy (Outgoing mail only, please reply to list)"
>       <kh.noreply AT gmail DOT com>
> Subject: [Bacula-users] How is "the c" (st_ctime) option letter for
>       the accurate/basejob/verify FileSet options interpreted on Windows
>       clients?
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID:
>       <CAGNBVdXmn77qFVq6NGPbkiwJMoJvnpSfsDduEJeqaxhLQvNVsQ AT mail.gmail DOT 
> com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello,
> 
> I haven't been able to find any definitive information on this topic
> (apologies if I missed something).
> 
> How is "the c" (st_ctime) option letter for the accurate/basejob/verify
> FileSet options interpreted on Windows clients?
> 
> Is it whatever the stat() call returns?
> 
> I.e. the creation time for NTFS filesystems and invalid for FAT? (See here:
> http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.80%29.aspx)
> 
> In the case of FAT, it would appear that the returned st_ctime is always
> zero (http://cygwin.com/ml/cygwin/2007-03/msg00774.html), so I assume
> Bacula will effectively ignore the "c" option letter since all files will
> match.
> 
> Regards,
> Ken
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> Message: 15
> Date: Sun, 30 Dec 2012 20:17:34 -0600
> From: "Ken Healy (Outgoing mail only, please reply to list)"
>       <kh.noreply AT gmail DOT com>
> Subject: [Bacula-users] With "Ignore FileSet Changes = yes", how long
>       are the changes ignored for? Is the behavior different when using base
>       jobs?
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID:
>       <CAGNBVdUce0A5tfaEPGuEoit2gZC=Mx6PoPDSLtrs7D3Jqm18yg AT mail.gmail DOT 
> com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello,
> 
> I haven't been able to find any definitive information on this topic
> (apologies if I missed something), so I'd appreciate it if anyone could
> clarify what happens in the following situations.
> 
> Here is the relevant documentation:
> 
> http://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION001470000000000000000
> 
> If I am interpreting it correctly, setting "Ignore FileSet Changes = yes"
> (with no base jobs involved) will cause any changes to the fileset to be
> ignored until the next full backup. Is this correct?
> 
> However, what happens when using a base job? Are the fileset changes
> ignored until the next base job?
> 
> On a slightly different note, what happens when you set "Ignore FileSet
> Changes = no" when using a base job? Is a new base level backup forced? Or
> is the base backup ignored and a non-based full backup done instead? Or
> something else?
> 
> Regards,
> Ken
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> Message: 16
> Date: Sun, 30 Dec 2012 20:18:29 -0600
> From: "Ken Healy (Outgoing mail only, please reply to list)"
>       <kh.noreply AT gmail DOT com>
> Subject: [Bacula-users] Interaction of "signature" option with
>       "accurate" and "basejob" FileSet options
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID:
>       <CAGNBVdWL_tB7iTCxb7e_Jt-LNmuTs3R6o4jr2hfUL+yv98aJhA AT mail.gmail DOT 
> com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello,
> 
> I haven't been able to find any definitive information on this topic
> (apologies if I missed something).
> 
> Does including "1" (SHA1) or "5" (MD5) in the accurate or basejob options
> cause the signature to be generated when the backup runs, or must the
> signature option be specified also?
> 
> If the signature option must be specified, what happens during a subsequent
> accurate mode incremental backup? Are the signatures generated on the fly
> from the previous backup, or is accurate mode not used?
> 
> Regards,
> Ken
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> Message: 17
> Date: Sun, 30 Dec 2012 21:32:33 -0500
> From: Dan Langille <dan AT langille DOT org>
> Subject: Re: [Bacula-users] With "Ignore FileSet Changes = yes",      how
>       long are the changes ignored for? Is the behavior different     when 
> using
>       base jobs?
> To: "Ken Healy (Outgoing mail only,   please reply to list)"
>       <kh.noreply AT gmail DOT com>
> Cc: bacula-users AT lists.sourceforge DOT net
> Message-ID: <CD063AA4-B400-4A62-AA2B-B5B6C4397752 AT langille DOT org>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 
> On Dec 30, 2012, at 9:17 PM, Ken Healy (Outgoing mail only, please reply to 
> list) wrote:
> 
>> Hello,
>> 
>> I haven't been able to find any definitive information on this topic 
>> (apologies if I missed something), so I'd appreciate it if anyone could 
>> clarify what happens in the following situations.
>> 
>> Here is the relevant documentation:
>> 
>> http://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION001470000000000000000
>> 
>> If I am interpreting it correctly, setting "Ignore FileSet Changes = yes" 
>> (with no base jobs involved) will cause any changes to the fileset to be 
>> ignored until the next full backup. Is this correct?
> 
> Yes
> 
>> However, what happens when using a base job? Are the fileset changes ignored 
>> until the next base job?
> 
>> On a slightly different note, what happens when you set "Ignore FileSet 
>> Changes = no" when using a base job? Is a new base level backup forced? Or 
>> is the base backup ignored and a non-based full backup done instead? Or 
>> something else?
> 
> I don't know.  Why are you asking?  Is there a problem you encountered?
> 
> This sounds like something that can be very easily tested.
> 
> -- 
> Dan Langille - http://langille.org
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> Message: 18
> Date: Sun, 30 Dec 2012 21:50:27 -0500
> From: Jeff Dickens <jeff AT seamanpaper DOT com>
> Subject: [Bacula-users] director fails with "undefined symbol:
>       mysql_thread_safe"
> To: bacula-users AT lists.sourceforge DOT net
> Message-ID:
>       <CABnDqATpMn=VqaRczfmNGcMXXxTRF4wwSUKAXS53+OD=7XFw9w AT mail.gmail DOT 
> com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I just built 5.2.12 on Ubuntu 12.04, ignoring one error during configure:
> 
> bpluginfo.c:50:24: fatal error: fd_plugins.h: No such file or directory
> 
> 
> Configure flags were just "./configure --with-mysql".
> 
> When I try to start the director it fails as follows:
> 
> # /sbin/bacula-dir -f -c /etc/bacula/bacula-dir.conf
> /sbin/bacula-dir: symbol lookup error: /usr/lib/libbaccats-5.2.12.so:
> undefined symbol: mysql_thread_safe
> 
> Any ideas ? What should I look at first?
> 
> 
> -- 
> *     Jeff Dickens*
>     IT Manager      978-632-1513
> -------------- next part --------------
> An HTML attachment was scrubbed...
> 
> ------------------------------
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 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_122412
> 
> ------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 
> End of Bacula-users Digest, Vol 80, Issue 16
> ********************************************


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 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_122412
_______________________________________________
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>
  • Re: [Bacula-users] Bacula-users Digest, Vol 80, Issue 16, Eric Santelices <=