From: Arno L. <al...@it...> - 2006-02-28 16:26:24
|
Hi, On 2/27/2006 2:32 PM, Baptiste Malguy wrote: > Hello, >=20 > Anyone willing to advise me for my specific issue please ? For the > moment, I hold on blocked by this problem, unfortunately, and I would > appreciate so much some help. >=20 > Thanks guys. >=20 > Baptiste Malguy a =E9crit : >=20 >>Hello, >> >>I have a question related to cloning jobs. >> >>I've just re-read my mail before pushing the "Send" button, and ... a >>little long I'm afraid. >> >>I want to write my full backups on two different storages (disk + DLT4)= =2E >> >>To achieve this goal, I use the Run attribute of the Job resource, >>providing the same job name: that's job cloning. >> >>The job is normally an incremental one, that becomes a full one once a >>month thanks to the corresponding schedule. >> >>Only the monthly full backups have to go on the tapes. Not the >>incremental ones neither the potential full ones that may occur because= >>FileSet resource has been modified. >> >>And that's the point: how to avoid these random full backups to go on >>the tape, that is, how to prevent the original job (writing to disk) to= >>clone itself (to write on tape). I've never actually used the python interface, but it might be possible=20 to do this using python events. >>I thought about using Run Before Job attribute, to prevent the cloned >>job to work returning a non-zero value, but I don't know what to provid= e >>to the run command to let it know to return 0 or non-zero. >> >>The command needs: >> - "I'm a clone" or "I'm writing to tapes" No idea if this is possible, but you mght look for a running job,=20 started a short time ago, with the same name in the catalog. The=20 destination should be easier to find. >> - and "I'm a full backup" Thats already possible with the objects Bacula provides to its events, I = think. >> - and "current date" (because of random full backups) Rather simple in python :-) although having access to the schedules=20 might be the more thorough solution. >>I can't provide to the command, as long as I know, "I'm a clone" neithe= r >>"I'm writing to tapes". This might not be much help, but perhaps a starting point for you. Arno >>Here are some pieces of the setup: >> >> >>Job { >> Name =3D server-test >> Write Bootstrap =3D /var/lib/bacula/server-test.bsr >> JobDefs =3D default >> FileSet =3D server-test >> Client =3D server-fd >> Run =3D "server-test-etc level=3D\"%l\" since=3D\"%s\" pool=3Dcart-mo= nth >>storage=3Ddlt-storage" >> Type =3D Backup >> Storage =3D file-storage >> Messages =3D standard >> Priority =3D 10 >> Pool =3D file-full >>} >> >>Schedule { >> Name =3D weekly-cycle >> Run =3D Full Pool=3Dfile-full 1st sat at 1:05 >> Run =3D Differential Pool=3Dfile-diff 2nd-5th sat at 1:05 >> Run =3D Incremental Pool=3Dfile-inc sun-fri at 1:05 >>} >> >>JobDefs { >> Name =3D default >> Type =3D Backup >> Level =3D Incremental >> FileSet =3D full >> Schedule =3D weekly-cycle >> Storage =3D file-storage >> Messages =3D standard >> Priority =3D 10 >> Pool =3D default >>} >> >>I've added this to see what I obtain: >> >> RunBeforeJob =3D "/etc/bacula/scripts/cloned-inc-not-on-tape \"%c\" >>\"%d\" \"%i\" \"%e\" \"%j\" \"%l\" \"%n\" \"%t\" \"%v\"" >> >>And the command line is something like: >> >>$1=3D"server-fd" >>$2=3D"" >>$3=3D"634" >>$4=3D"Unknown term code" >>$5=3D"server-test-etc.2006-02-22_11.30.31" >>$6=3D"Full" >>$7=3D"Backup" >>$8=3D"Backup" >>$9=3D"" >> >>>From this point, hoping I've been clear enought (not sure), does anyon= e >>has an idea ? >> >>Bye the way, I use Bacula 1.38.3. I'm looking forward for the project >>item #2 "Implement Migration that moves Jobs from one Pool to >>another". >> >>Thank you and keep on improving this great software ! >> >=20 >=20 >=20 --=20 IT-Service Lehmann al...@it... Arno Lehmann http://www.its-lehmann.de |