Hello Andreas,
This is a rather ugly solution, but as long as it is working, I am
happy. One problem I have found is when I 'force' bacula to unmount
and eject the tape, it will not automatically mount the new tape. So
I have two jobs, one to do the unmount, and one to do a mount before
backups are scheduled to begin.
First, the unmount and eject job. This job calls a batch file, which
uses the command line "bconsole" to instruct bacula to unmount the
tape drive, and then "mt" to rewind and eject the tape
Job {
Name = "EjectTape"
Type = Admin
# runsonclient=no is the key here
RunScript {
Runs When = Before
AbortJobOnError = No
Command = "c:/ejecttape.bat"
RunsOnClient=no
}
Schedule = "EjectTape"
Client = third-fd
Messages = Standard
Pool = "Tape"
# a dummy fileset, with no selections
Fileset = "Empty"
# make sure this job runs after everything else!
Priority = 100
}
c:\ejecttape.bat:
"c:\program files\bacula\bin\bconsole" < c:\eject
sleep 10
"c:\program files\bacula\bin\mt" -f Tape0 rewoffl
exit 0
c:\eject:
unmount LTO3
quit
Now, to make bacula mount a newly inserted tape, I run an inject tape job:
Job {
Name = "InjectTape"
Type = Admin
RunScript {
Runs When = Before
AbortJobOnError = No
Command = "c:/injecttape.bat"
RunsOnClient=no
}
Schedule = "InjectTape"
Client = third-fd
Messages = Standard
Pool = "Tape"
Storage = LTO3
Fileset = "Empty"
# this job has top priority
Priority = 1
}
c:\injecttape.bat:
"c:\program files\bacula\bin\bconsole" < c:\inject
sleep 10
exit 0
c:\inject:
mount LTO3
quit
My backups run on a weekly schedule, full on monday nights,
incremental tue-fri. The eject job runs friday after everything else,
and the inject job runs monday before the nightly backups begin.
I will point out, this only works because my director and storage
daemon (with the tape drive) run on the same windows host.
I hope this helps!
Gordon
On 4/3/07, Andreas Lüdtke <[EMAIL PROTECTED]> wrote:
> > Everything worked pretty much right out of the box. Took a lot of
> > messing around to get bacula to do a scheduled ejection of the tape,
> > but that's "beta software" for you!
> >
> > Gordon
>
> Hi Gordon,
>
> could you please tell me your suggestions/hints/examples about a "scheduled
> tape
> ejection"? I'm trying to do that, but so far I didn't succeed.
>
> Thanks
>
> Andreas
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users