I would think a pool specified on a Schedule resource's Run line should override the pool specified in the Job resource. The problem is that only Pool= can be specified as a Run option. So when a Run line specifies a pool and the job level is upgraded to full from differential or incremental, the pool specified on the Run line still overrides the Job resource specification. I think this is incorrect. For a job started by a Run line with Level=Differential, when the level is upgraded to Full, any Pool= specified on the Run line should be considered to be a DifferentialPool= override, not a Pool= override.

For example, given:

Job {
 ...
 Pool = "full-pool"
}

Schedule {
 Run = Level=Full 1st fri at 01:01
 Run = Level=Incremental Pool="incremental-pool" daily at 04:01
}

A job started by the second Run line should do a incremental backup to pool "incremental-pool". If no existing full backup is found in the catalog then, with the current pool selection scheme, a full backup will be written to pool "incremental-pool". I would rather see the pool selection start over from the beginning, taking the new run level into consideration and also considering any Pool= specified on the Run line to override only the DifferentialPool= or IncrementalPool= specified in the Job resource, not the Pool=.

A pool selection scheme might be:

1. If Pool is not specified then set Pool = default pool
2. If DifferentialPool is not specified then set DifferentialPool = Pool
3. If IncrementalPool is not specified then set IncrementalPool = Pool
4. If FullPool is not specified then set FullPool = Pool
5. If Run line has no Pool= override then goto 9
6. If Run has Level=Full then set FullPool = pool from Run's Pool= override
7. If Run has Level=Differential then set DifferentialPool = pool from Run's Pool= override 8. If Run has Level=Incremental then set IncrementalPool = pool from Run's Pool= override 9. Set pool to value of FullPool, DifferentialPool, or IncrementalPool based on actual current run level

Josh Fisher

Kern Sibbald wrote:

Hello,

From time to time, I've heard some complaints about the way Bacula selects
pools, but it has never been specific enough for me to do something. Now, I have an example where I have defined an Incremental Pool, and in using the "run" command, even though the job is an Incremental job, the pool show is the Full Pool.
In looking at the code, I see the following:

1. When (if) a job is scheduled, the Run pool overrides are applied to the
   pool.

2.  If you manually run a job, it starts here.

3. When the backup is initialized, the Job pool specifications are applied,
   if any.

4. If the backup is Diff or Inc, and no Full backup is found in the catalog,
  the job is upgraded to Full.

Now, I haven't looked at this in detail, but it seems to me that at least in 1.37, the Job pool specifications are not working as I intended, since step 4 should logically be done before step 3.

Also, I haven't checked the documentation, but it should clearly indicate that Job Pool specifications (other than the Pool = ) override any run overrides.

Comments would be appreciated as I would like to fix this problem.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to