Bacula-users

Re: [Bacula-users] [Bacula-devel] Copy jobs in Bacula version 3.0.0

2008-12-15 18:20:05
Subject: Re: [Bacula-users] [Bacula-devel] Copy jobs in Bacula version 3.0.0
From: Marc Schiffbauer <marc AT schiffbauer DOT net>
To: bacula-devel AT lists.sourceforge DOT net, bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 16 Dec 2008 00:17:40 +0100
* Kern Sibbald schrieb am 15.12.08 um 21:52 Uhr:
> Hello,

Hi Kern,

> I've been discussing with Eric how we might handle Copy jobs in our 
> development version.
[...]

> A few things seem obvious:
> 
> 1. Any restore where Bacula automatically selects the jobs to be restored 
> (e.g. a restore to the current state -- #5 on the restore prompt menu) should 
> be done by default using the original backups.
> 
> 2. If a job has been copied, Bacula should probably display an information 
> message during the restore that indicates that the JobIds to be used have 
> Copies.
> 
> 3. The restore command should allow the user to select any Copy job or jobs.

1..3 ACK!

> I am proposing to change the current way that Copy jobs are handled.
[...]
> 
> I propose that we modify the Jobs to look like the following:
> 
> +-------+--------------+---------------------+------+-------+----------+-----------+-----------+
> | JobId | Name         | StartTime           | Type | Level | JobFiles | 
> +-------+--------------+---------------------+------+-------+----------+-----------+-----------+
> | 1     | CopyJobSave  | 2008-12-15 20:38:28 | B    | F     | 7020     | 
> | 5     | CopyJobSave  | 2008-12-15 20:38:28 | C    | F     | 7020     | 
> | 2     | CopyJobSave  | 2008-12-15 20:38:32 | B    | I      | 999     | 
> | 6     | CopyJobSave  | 2008-12-15 20:38:32 | C    | I      | 999     | 
> | 3     | copy-job     | 2008-12-15 20:41:05 | c    | F     | 0        | 
> | 4     | copy-job     | 2008-12-15 20:41:50 | c    | F     | 0        | 
> | 8     | RestoreFiles | 2008-12-15 20:42:39 | R    | F     | 7020     | 
> +-------+--------------+---------------------+------+-------+----------+-----------+-----------+
> 
> Now here, JobIds 5 and 6 no longer appear to Bacula like they are Backup 
> jobs, 
> rather they are marked as Type=C (i.e. a Copy job), and so they will never be 
> considered for restoration by default.

This is just what I thought before reading your proposal to this:
So ACK!

> I've give the Copy control jobs the 
> Type 'c' to distinguish them from the real copy -- they exist just to record 
> the actual time the copy was made.


Some thoughts on this:
 * How can you be 100% sure that 5 is a copy of 1?
   On a really fast machine two Origian jobs might be created within the
   same second... not?

 * How can the copy-job (c) be associated to the real Copy (C)?
   Especially if there are two or more copies of the original.

 * Will a Copy of a Copy be possible? How will this be done then?

 * There should always be a "real" association between the Origianl and a
   Copy that will always make it clear which job is a copy of what job.
   This might be done only by connecting the JobIds somehow, right?

 * How about adding a new Table that is used to store these
   associations? That way it will be possible in the future to have
   more complex dependencies between jobs like
   * Copies of Copies
   * More than one Copy of an Original
   * VirtualFullBackups (sorry i do not know the current state of
     these) might work this way...

Table "JobAssociations"
 +-------+--------------+---------------------+
 | JobId | AssocJobId   | AssocTime           |
 +-------+--------------+---------------------+
 | 5     | 1            | 2008-12-15 20:41:05 |
 | 6     | 2            | 2008-12-15 20:41:50 |
 +-------+--------------+---------------------+

 This will tell us clearly that Job 5 is a Copy of Job 1 and Job 6
 is a Copy of Job 2 given the Facts that Job 5 and 6 are of Type "C".

 This might sound a bit too much for what should be done right know,
 but OTOH it might make future features easier to implement if
 different jobs can have a direct association to each other.

> Now by modifying the restore code in Bacula, we should be able to provide 
> features that allow the user to know that there is a Copy of JobId 1 (i.e. 5) 
> and a copy of JobId 2 (i.e. 6) and allow him/her to choose which copy to use.

It just tells that there actually *is* a copy. But how do you
determine which copy is choosen if you have more than one copy and
want to know which copy has been made at which time?

[...]
> 
> Any comments?
> 
> Best regards,
> 
> Kern
> 

-Marc
-- 
+------------------------------------------------------------------+
|              --> http://www.links2linux.de <--                   |
|                                                                  |
+---Registered-Linux-User-#136487------------http://counter.li.org +

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users