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

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


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?

>
>
>
>
> 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


This mailing list archive is a service of Copilotco.