Bacula-users

Re: [Bacula-users] get_file_record want 1 got rows=2 after migration from MySQL to PostgreSQL

2010-10-18 07:04:57
Subject: Re: [Bacula-users] get_file_record want 1 got rows=2 after migration from MySQL to PostgreSQL
From: Rory Campbell-Lange <rory AT campbell-lange DOT net>
To: Robert Oschwald <roos AT symentis DOT com>
Date: Mon, 18 Oct 2010 12:02:48 +0100
On 18/10/10, Robert Oschwald (roos AT symentis DOT com) wrote:
> I migrated Bacula 5.0.2 from MySQL to Bacula 5.0.3 PostgreSQL 8.1, 
> and then migrated to PostgreSQL 8.2 using dump/restore.

> Speed is dramatically better than with MySQL (I will post my
> postgresql settings if one is interested).
> 
> Now when I  use BAT to simulate a restore to recent, I get this messages in 
> stderr when I klick on one of the files:
> 
> sql_get.c:156-0 === Problem!  sql_get.c:155 get_file_record want 1 got rows=2 
> PathId=80991 FilenameId=439

Hi Robert

I haven't experienced this issue myself, but what is happening is that in
sql_get.c the following error is being triggered:

   if (QUERY_DB(jcr, mdb, mdb->cmd)) {
      mdb->num_rows = sql_num_rows(mdb);
      Dmsg1(050, "get_file_record num_rows=%d\n", (int)mdb->num_rows); 
      if (mdb->num_rows > 1) {
         Mmsg1(mdb->errmsg, _("get_file_record want 1 got rows=%d\n"), <--- 
error
            mdb->num_rows);
      }

Bacula is getting 2 records for the database records for the specified paths 
and files.

It may be that you have inadvertently imported the data twice.

-- 
Rory Campbell-Lange
rory AT campbell-lange DOT net

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users