Bacula-users

Re: [Bacula-users] Migrated Monthly Backups not seen by Dailies.

2008-05-16 17:38:54
Subject: Re: [Bacula-users] Migrated Monthly Backups not seen by Dailies.
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 16 May 2008 22:12:33 +0100
>>>>> On Fri, 16 May 2008 21:23:32 +0200, Arno Lehmann said:
> 
> Hi,
> 
> 16.05.2008 17:26, Doug Breshears wrote:
> > Martin Simmons wrote:
> >>>>>>> On Wed, 07 May 2008 16:43:43 -0700, Doug Breshears said:
> >>>>>>>             
> >>> Martin Simmons wrote:
> >>>     
> >>>>>>>>> On Wed, 07 May 2008 09:25:10 -0700, Doug Breshears said:
> >>>>>>>>>             
> >>>>>>>>>                 
>>>>> Hi all,
> >>>>>
>>>>> I have a Monthly Full backup that backs up to a DISK FILE, Then Migrate 
>>>>> to Tape. I then do a daily backup which should look at the last Full 
>>>>> backup. However the daily process is saying it cannot find a valid FULL 
>>>>> backup to compare to.
> ...
> >> The output of
> >>
> >> select jobid, ClientId, FileSetId, StartTime from job where jobid in 
> >> (4301, 4292);
> >>
> >> would be useful to check that the other important fields are correct.
> >>
> >> The actual query used by Bacula will be
> >>
> >> SELECT StartTime FROM Job WHERE JobStatus='T' AND Type='B'
> >>        AND Level='F' AND Name='Ex1'
> >>        AND ClientId=$TheClientId
> >>        AND FileSetId=$TheFileSetId
> >>        ORDER BY StartTime DESC LIMIT 1;
> >>
> >> with $TheClientId and $TheFileSetId replaced by the appropriate numbers.  
> >> It
> >> should find jobid 4301 after the migration.  Prior to the migration, it 
> >> should
> >> find jobid 4292.
> >>
> >> __Martin
> ...
> > Well I am not sure what the *correct* items for these fields would be 
> > but I ran the query.
> > It seems like the file sets should be the same but there are two 
> > FileSetID's.
> > 
> > I ran the *Bacula Query as typed and came up with the following results. 
> > It looks like it is finding everything.
> > Does anything here show up as wrong?
> > 
> > *sql
> > Automatically selected Catalog: MyCatalog
> > Using Catalog "MyCatalog"
> > Entering SQL query mode.
> > Terminate each query with a semicolon.
> > Terminate query mode with a blank line.
> > Enter SQL query: select jobid, ClientId, FileSetId, StartTime from job 
> > where jobid in (4301, 4292);
> > +-------+----------+-----------+---------------------+
> > | jobid | ClientId | FileSetId | StartTime           |
> > +-------+----------+-----------+---------------------+
> > | 4292  | 2        | 8         | 2008-05-02 17:36:40 |
> > | 4301  | 2        | 11        | 2008-05-02 17:36:40 |
> > +-------+----------+-----------+---------------------+
> 
> The FileSetId definitely has to be the same... this is not mentioned 
> in the manual as far as I can see, though.
> 
> I recommend to set the file set of the migration job to the file set 
> of the original job first, and manually change the fileset id of the 
> already migrated jobs.
> 
> Also, this makes it impossible to use one migration job for original 
> jobs with different filesets... I wonder if a migration job should set 
> the fileset id itself to the original one.

It isn't clear how Bacula gets this wrong though, because the details of the
new backup job (4301) should be a copy of the old one (4292).  The fileset in
the migration job probably is recorded for that job record (4300), but I can't
see where in the code it would pollute the record for the new job.

Can you confirm that it does go wrong if the migration job has a different
fileset?  (I don't have a setup that can work for migration at the moment.)


> 
> 
> > Enter SQL query: select StartTime FROM Job WHERE JobStatus='T' AND 
> > Type='B' AND
> > +---------------------+' AND ClientId=2 AND FileSetId=8 ORDER BY 
> > StartTime DESC
> > | StartTime           |
> > +---------------------+
> > | 2008-05-07 01:05:05 |
> > +---------------------+
> > 
> > Enter SQL query: select StartTime FROM Job WHERE JobStatus='T' AND 
> > Type='B' AND
> > Level='F' and Name='Ex1' AND ClientId=2 AND FileSetId=11 ORDER BY 
> > StartTime DESC
> > +---------------------+
> > | StartTime           |
> > +---------------------+
> > | 2008-05-02 17:36:40 |
> > +---------------------+
> > Enter SQL query:
> > 
> > 
> > 
> > Thanks for your help.
> > Doug
> > 
> 
> Arno

__Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users