Troy Daniels wrote:
> Hi,
>
>> I want to make sure that after the last scheduled job for the day 
>> runs, that the mounted tape is changed to a status of 'used'.  How 
>> can I run a job to do this?
>>
>
> You can try using any one of the following options:
>
> Maximum Volume Jobs = <positive-integer>
> Volume Use Duration = <time-period-specification>
>
> Info on them is available at:
>
> http://www.bacula.org/rel-manual/FileSet_Resource.html#SECTION001580000000000000000
>  
>
>
> However, Bacula might not immediately set the volume to used. It is 
> more likely to do so the next time it goes to access that volume when 
> it realises it's past it's threshold. It still wont use the volume 
> after the first day however.
>
> If this is a concern, it's it's also possible to add a run after job 
> script that updates the volume status as part of the last job.
>
> Something like the following would work:
> ----------------------------------------
> #!/bin/bash
> #
> # Determine the currently loaded volume via bconsole
> #
> CURRVOL=`echo "status storage=Tape" | /usr/sbin/bconsole -c 
> /etc/bacula/bconsole.conf | grep "is mounted with Volume" | awk -F\" 
> '{print $4}'`
>
> #
> # Mark the volume used.
> #
> /usr/sbin/bconsole -c /etc/bacula/bconsole.conf <<EOCMDS2
> gui off
> @#
> @# Marking Volume $CURRVOL as Used
> @#
> update volume="$CURRVOL" VolStatus="Used"
> .
> @output /dev/null
> EOCMDS2
>
> exit 0
> ----------------------------------------
>
> Cheers,
>
>
> Troy.
Hi,  Thanks for the starting point as I'm using windows.  Maximum Volume 
Jobs does not work because I cannot guarantee the number of jobs on a 
tape, when the schedule backup spans multiple tapes.  Volume Use 
Duration would not expire the tape fast enough after the last backup, 
and if it expired before the backup is complete, then a new tape is used.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to