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

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


On Mon, 2008-06-30 at 14:28 +0200, 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.
> 

sorry, until now i'd not modify the source,
i was only thinking about after a quick look at
src/dird/ua_restore.c:select_backups_before_date()

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

yes u right,  my assumption is that it is "more expensive" to restore
from copy than from original.   this would be true for "normal setup",
but bacuala also allows backup to tape and then copy from tape to 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.
> 

that would be also ok,  but there should be an easy and almost automatic
way where user interaction is minimized.

Ulrich

> 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
> 
> 
> 
-- 
Ulrich Leodolter <ulrich.leodolter@xxxxxxxx>
Oesterreichische Bibliothekenverbund und Service GmbH
Bruennlbadgasse 17/2A, A-1090 Wien
Fax +43 1 4035158-30
Tel +43 1 4035158-21
Web http://www.obvsg.at


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