[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Copy jobs and restore job selection


Hi,

30.06.2008 14:28, Kern Sibbald wrote:
> On Monday 30 June 2008 13:21:26 Ulrich Leodolter wrote:
>> Hello Developers,
>>
>> when it comes to restore copy jobs should be ordered by
>> some criteria.   assuming that restore from copy (on Tape)
>> is more expensive than restore from original job (on Disk)
>> extra ordering by PriorJobId in uar_last_full, uar_dif and
>> uar_inc would do the job.
>>
>> what do u think about?
> 
> Well, it is always better to show us a diff, or to explicitly tell us what you 
> changed -- in this case, I think I know.
> 
> If I understand your proposal correctly (maybe not), it seems to me that you 
> are making some assumption about what is on Tape and what is on Disk.
> 
> I like the basic idea of trying to restore from disk prior to using tape, but 
> I am not sure that what you are proposing really accomplishes that.  Also, it 
> seems to me that it would be better to let the user specify what set he want.
> 
> For example, it might be better to take a look at the jobs and to see if they 
> have a copy somewhere, and if so, then propose to the user to select between 
> them.
> 
> What do you think?

I'd recommend to use the 'Location' table - it has a Cost included.

As of now, it's not used AFAIK, but imagine you choose the set of 
media to use so that it minimizes the 'Cost' this would work ok.

Of course we'd need sopport for the Location eventuall... one of those 
years I'll finish my front-end for handling it ;-)

Until then, collect the Cost information, and include it when 
prompting the user which set of media to use.

How does that sound?

(As a reminder: the Location table is a start to implement more 
flexible volume handling. I.e., you define a number of locations - 
like 'disk storage (Cost 0), autochanger (Cost 1), on-site shelf 
storage (cost 10) and off-site storage (Cost 100) and can not only 
track the movement of media, but also predict which volumes will be 
preferred (those with lower Cost)).

Arno


>>
>>
>>
>> src/cats/sql_cmds.c:284
>>
>> const char *uar_last_full =
>>    "INSERT INTO temp1 SELECT Job.JobId,JobTdate "
>>    "FROM Client,Job,JobMedia,Media,FileSet WHERE Client.ClientId=%s "
>>    "AND Job.ClientId=%s "
>>    "AND Job.StartTime<'%s' "
>>    "AND Level='F' AND JobStatus='T' AND Type='B' "
>>    "AND JobMedia.JobId=Job.JobId "
>>    "AND Media.Enabled=1 "
>>    "AND JobMedia.MediaId=Media.MediaId "
>>    "AND Job.FileSetId=FileSet.FileSetId "
>>    "AND FileSet.FileSet='%s' "
>>    "%s"
>>    "ORDER BY Job.JobTDate DESC,Job.PriorJobId LIMIT 1";
>>
>> const char *uar_dif =
>>    "INSERT INTO temp SELECT Job.JobId,Job.JobTDate,Job.ClientId,"
>>    "Job.Level,Job.JobFiles,Job.JobBytes,"
>>    "Job.StartTime,Media.VolumeName,JobMedia.StartFile,"
>>    "Job.VolSessionId,Job.VolSessionTime "
>>    "FROM Job,JobMedia,Media,FileSet "
>>    "WHERE Job.JobTDate>%s AND Job.StartTime<'%s' "
>>    "AND Job.ClientId=%s "
>>    "AND JobMedia.JobId=Job.JobId "
>>    "AND Media.Enabled=1 "
>>    "AND JobMedia.MediaId=Media.MediaId "
>>    "AND Job.Level='D' AND JobStatus='T' AND Type='B' "
>>    "AND Job.FileSetId=FileSet.FileSetId "
>>    "AND FileSet.FileSet='%s' "
>>    "%s"
>>    "ORDER BY Job.JobTDate DESC,Job.PriorJobId LIMIT 1";
>>
>> const char *uar_inc =
>>    "INSERT INTO temp SELECT Job.JobId,Job.JobTDate,Job.ClientId,"
>>    "Job.Level,Job.JobFiles,Job.JobBytes,"
>>    "Job.StartTime,Media.VolumeName,JobMedia.StartFile,"
>>    "Job.VolSessionId,Job.VolSessionTime "
>>    "FROM Job,JobMedia,Media,FileSet "
>>    "WHERE Job.JobTDate>%s AND Job.StartTime<'%s' "
>>    "AND Job.ClientId=%s "
>>    "AND Media.Enabled=1 "
>>    "AND JobMedia.JobId=Job.JobId "
>>    "AND JobMedia.MediaId=Media.MediaId "
>>    "AND Job.Level='I' AND JobStatus='T' AND Type='B' "
>>    "AND Job.FileSetId=FileSet.FileSetId "
>>    "AND FileSet.FileSet='%s' "
>>    "%s"
>>    "ORDER BY Job.PriorJobId";
>>
>>
>>
>> Regards
>> Ulrich
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
> 

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.