Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 244

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>DVD Volumes</TITLE>
<META NAME="description" CONTENT="DVD Volumes">
<META NAME="keywords" CONTENT="misc">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="misc.css">

<LINK REL="next" HREF="Bacula_Projects.html">
<LINK REL="previous" HREF="Using_Stunnel_Encrypt_Commu.html">
<LINK REL="up" HREF="Bacula_Miscellaneous_Guide.html">
<LINK REL="next" HREF="Bacula_Projects.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html223"
  HREF="Bacula_Projects.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html217"
  HREF="Bacula_Miscellaneous_Guide.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html211"
  HREF="Using_Stunnel_Encrypt_Commu.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html219"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html221"
  HREF="Index.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html224"
  HREF="Bacula_Projects.html">Bacula Projects</A>
<B> Up:</B> <A NAME="tex2html218"
  HREF="Bacula_Miscellaneous_Guide.html">Bacula Miscellaneous Guide</A>
<B> Previous:</B> <A NAME="tex2html212"
  HREF="Using_Stunnel_Encrypt_Commu.html">Using Stunnel to Encrypt</A>
 &nbsp; <B>  <A NAME="tex2html220"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html222"
  HREF="Index.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html225"
  HREF="DVD_Volumes.html#SECTION00510000000000000000">DVD Specific SD Directives</A>
<LI><A NAME="tex2html226"
  HREF="DVD_Volumes.html#SECTION00520000000000000000">Edit Codes for DVD Directives</A>
<LI><A NAME="tex2html227"
  HREF="DVD_Volumes.html#SECTION00530000000000000000">DVD Specific Director Directives</A>
<LI><A NAME="tex2html228"
  HREF="DVD_Volumes.html#SECTION00540000000000000000">Other Points</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00500000000000000000"></A>
<A NAME="_DVDChapterStart"></A>
<BR>
DVD Volumes
</H1>
<A NAME="848"></A>
<A NAME="849"></A>
<A NAME="850"></A>
<A NAME="851"></A>

<P>
Bacula allows you to specify that you want to write to DVD. However,
this feature is implemented only in version 1.37 or later.
You may in fact write to DVD+RW, DVD+R, DVD-R, or DVD-RW 
media. The actual process used by Bacula is to first write
the image to a spool directory, then when the Volume reaches
a certain size or,  at your option, at the end of a Job, Bacula
will transfer the image from the spool directory to the
DVD.  The actual work of transferring the image is done
by a script <B>dvd-handler</B>, and the heart of that
script is a program called <B>growisofs</B> which allows
creating or adding to a DVD ISO filesystem.

<P>
You must have <B>dvd+rw-tools</B> loaded on your system for DVD writing to
work.  Please note that the original <B>dvd+rw-tools</B> package does <B>NOT</B> work with Bacula.  You must apply a patch which can be found in the
<B>patches</B> directory of Bacula sources with the name
<B>dvd+rw-tools-5.21.4.10.8.bacula.patch</B> for version 5.21 of the tools,
or patch bf dvd+rw-tools-6.1.bacula.patch if you have version 6.1       
on your system. Unfortunately, this requires you to build the dvd_rw-tools
from source.

<P>
Note, some Linux distros such as Debian dvd+rw-tools-7.0-4 package already
have the patch applied, so please check.

<P>
The fact that Bacula cannot use the OS to write directly
to the DVD makes the whole process a bit more error prone than
writing to a disk or a tape, but nevertheless, it does work if you
use some care to set it up properly. However, at the current time
(version 1.39.30 - 12 December 2006) we still consider this code to be
BETA quality.  As a consequence, please do careful testing before relying
on DVD backups in production.

<P>
The remainder of this chapter explains the various directives that you can
use to control the DVD writing.

<P>
<A NAME="DVDdirectives"></A>
<H1><A NAME="SECTION00510000000000000000">
DVD Specific SD Directives</A>
</H1> 
<A NAME="862"></A>
<A NAME="863"></A>

<P>
The following directives are added to the Storage daemon's
Device resource.

<P>
<DL>
<DT><STRONG>Requires Mount = <I>Yes|No</I></STRONG></DT>
<DD><A NAME="866"></A>
   You must set this directive to <B>yes</B> for DVD-writers,  and to <B>no</B> for
   all other devices (tapes/files).  This directive indicates if the device
   requires to be mounted using the <B>Mount Command</B>.
   To be able to write a DVD, the following directives must also be
   defined: <B>Mount Point</B>,  <B>Mount Command</B>, <B>Unmount Command</B> and
   <B>Write Part Command</B>.

<P>
</DD>
<DT><STRONG>Mount Point = <I>directory</I></STRONG></DT>
<DD><A NAME="875"></A>
   Directory where the device can be mounted. 

<P>
</DD>
<DT><STRONG>Mount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="877"></A>
   Command that must be executed to mount the device. Although the
   device is written directly, the mount command is necessary in
   order to determine the free space left on the DVD. Before the command is 
   executed, %a is replaced with the Archive Device, and %m with the Mount 
   Point.

<P>
Most frequently, you will define it as follows:  

<P>
<PRE>
  Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
</PRE>
<P>
However, if you have defined a mount point in /etc/fstab, you might be
able to use a mount command such as:

<P>
<PRE>
  Mount Command = "/bin/mount /media/dvd"
</PRE>
<P>
</DD>
<DT><STRONG>Unmount Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="883"></A>
   Command that must be executed to unmount the device. Before the command  is
   executed, %a is replaced with the Archive Device, and %m with the  Mount
   Point.

<P>
Most frequently, you will define it as follows:  

<P>
<PRE>
  Unmount Command = "/bin/umount %m"
</PRE>
<P>
</DD>
<DT><STRONG>Write Part Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="887"></A>
   Command that must be executed to write a part to the device. Before the 
   command is executed, %a is replaced with the Archive Device, %m with the 
   Mount Point, %e is replaced with 1 if we are writing the first part,
   and with 0 otherwise, and %v with the current part filename.

<P>
For a DVD, you will most frequently specify the Bacula supplied  <B>   dvd-handler</B> script as follows:  

<P>
<PRE>
  Write Part Command = "/path/dvd-handler %a write %e %v"
</PRE>
<P>
Where <B>/path</B> is the path to your scripts install directory, and
  dvd-handler is the Bacula supplied script file.  
  This command will already be present, but commented out,
  in the default bacula-sd.conf file. To use it, simply remove
  the comment (#) symbol.

<P>
</DD>
<DT><STRONG>Free Space Command = <I>name-string</I></STRONG></DT>
<DD><A NAME="893"></A>
   Command that must be executed to check how much free space is left on the 
   device. Before the command is executed,%a is replaced with the Archive
   Device.

<P>
For a DVD, you will most frequently specify the Bacula supplied  <B>   dvd-handler</B> script as follows:  

<P>
<PRE>
  Free Space Command = "/path/dvd-handler %a free"
</PRE>
<P>
Where <B>/path</B> is the path to your scripts install directory, and
  dvd-handler is the Bacula supplied script file.
  If you want to specify your own command, please look at the code in
  dvd-handler to see what output Bacula expects from this command.
  This command will already be present, but commented out,
  in the default bacula-sd.conf file. To use it, simply remove
  the comment (#) symbol.

<P>
If you do not set it, Bacula will expect there is always free space on the
  device. 

<P>
</DD>
</DL>

<P>
In addition to the directives specified above, you must also
specify the other standard Device resource directives. Please see the
sample DVD Device resource in the default bacula-sd.conf file. Be sure
to specify the raw device name for <B>Archive Device</B>. It should 
be a name such as <B>/dev/cdrom</B> or <B>/media/cdrecorder</B> or
<B>/dev/dvd</B> depending on your system.  It will not be a name such
as <B>/mnt/cdrom</B>.

<P>
Finally, for <B>growisofs</B> to work, it must be able to lock
a certain amount of memory in RAM.  If you have restrictions on
this function, you may have failures.  Under <B>bash</B>, you can
set this with the following command:

<P>
<PRE>
ulimit -l unlimited
</PRE>
<P>

<H1><A NAME="SECTION00520000000000000000">
Edit Codes for DVD Directives</A>
</H1> 
<A NAME="909"></A>
<A NAME="910"></A>

<P>
Before submitting the <B>Mount Command</B>, <B>Unmount Command</B>, 
<B>Write Part Command</B>, or <B>Free Space Command</B> directives 
to the operating system, Bacula performs character substitution of the
following characters:

<P>
<PRE>
    %% = %
    %a = Archive device name
    %e = erase (set if cannot mount and first part)
    %n = part number
    %m = mount point
    %v = last part name (i.e. filename)
</PRE>
<P>

<H1><A NAME="SECTION00530000000000000000">
DVD Specific Director Directives</A>
</H1> 
<A NAME="918"></A>
<A NAME="919"></A>

<P>
The following directives are added to the Director's Job resource.

<P>
<A NAME="WritePartAfterJob"></A><DL>
<DT><STRONG>Write Part After Job = yes|no</STRONG></DT>
<DD><A NAME="924"></A>
   If this directive is set to <B>yes</B> (default <B>no</B>), the
   Volume written to a temporary spool file for the current Job will
   be written to the DVD as a new part file
   will be created after the job is finished.  

<P>
It should be set to <B>yes</B> when writing to devices that require a mount
   (for example DVD), so you are sure that the current part, containing
   this job's data, is written to the device, and that no data is left in
   the temporary file on the hard disk.  However, on some media, like DVD+R
   and DVD-R, a lot of space (about 10Mb) is lost everytime a part is
   written.  So, if you run several jobs each after another, you could set
   this directive to <B>no</B> for all jobs, except the last one, to avoid
   wasting too much space, but to ensure that the data is written to the
   medium when all jobs are finished.

<P>
This directive is ignored for devices other than DVDs.
</DD>
</DL>

<P>
<A NAME="DVDpoints"></A>
<H1><A NAME="SECTION00540000000000000000">
Other Points</A>
</H1>
<A NAME="932"></A>
<A NAME="933"></A>

<P>

<UL>
<LI>Please be sure that you have any automatic DVD mounting
   disabled before running Bacula - this includes auto mounting
   in /etc/fstab, hotplug, ...  If the DVD is automatically
   mounted by the OS, it will cause problems when Bacula tries
   to mount/unmount the DVD.
</LI>
<LI>Please be sure that you the directive <B>Write Part After Job</B>
   set to <B>yes</B>, otherwise the last part of the data to be
   written will be left in the DVD spool file and not written to
   the DVD. The DVD will then be unreadable until this last part
   is written.  If you have a series of jobs that are run one at
   a time, you can turn this off until the last job is run.
</LI>
<LI>The current code is not designed to have multiple simultaneous
   jobs writing to the DVD.  As a consequence, please ensure that
   only one DVD backup job runs at any time.
</LI>
<LI>Writing and reading of DVD+RW seems to work quite reliably
   provided you are using the patched dvd+rw-mediainfo programs.
   On the other hand, we do not have enough information to ensure
   that DVD-RW or other forms of DVDs work correctly.
</LI>
<LI>DVD+RW supports only about 1000 overwrites. Every time you
   mount the filesystem read/write will count as one write. This can
   add up quickly, so it is best to mount your DVD+RW filesystem read-only.
   Bacula does not need the DVD to be mounted read-write, since it uses
   the raw device for writing.
</LI>
<LI>Reformatting DVD+RW 10-20 times can apparently make the medium 
   unusable. Normally you should not have to format or reformat
   DVD+RW media. If it is necessary, current versions of growisofs will
   do so automatically.
</LI>
<LI>We have had several problems writing to DVD-RWs (this does NOT
  concern DVD+RW), because these media have two writing-modes: <B>  Incremental Sequential</B> and <B>Restricted Overwrite</B>.  Depending on
  your device and the media you use, one of these modes may not work
  correctly (e.g.  <B>Incremental Sequential</B> does not work with my NEC
  DVD-writer and Verbatim DVD-RW).

<P>
To retrieve the current mode of a DVD-RW, run:
<PRE>
  dvd+rw-mediainfo /dev/xxx
</PRE>
  where you replace xxx with your DVD device name.

<P>
<B>Mounted Media</B> line should give you the information.

<P>
To set the device to <B>Restricted Overwrite</B> mode, run:
<PRE>
  dvd+rw-format /dev/xxx
</PRE>
  If you want to set it back to the default <B>Incremental Sequential</B> mode, run:
<PRE>
  dvd+rw-format -blank /dev/xxx
</PRE>

<P>
</LI>
<LI>Bacula only accepts to write to blank DVDs. To quickly blank a DVD+/-RW, run
  this command:
<PRE>
  dd if=/dev/zero bs=1024 count=512 | growisofs -Z /dev/xxx=/dev/fd/0
</PRE>
  Then, try to mount the device, if it cannot be mounted, it will be considered
  as blank by Bacula, if it can be mounted, try a full blank (see below).

<P>
</LI>
<LI>If you wish to blank completely a DVD+/-RW, use the following:
<PRE>
  growisofs -Z /dev/xxx=/dev/zero
</PRE>
  where you replace xxx with your DVD device name. However, note that this
  blanks the whole DVD, which takes quite a long time (16 minutes on mine).
</LI>
<LI>DVD+RW and DVD-RW support only about 1000 overwrites (i.e. don't use the
same medium for years if you don't want to have problems...).

<P>
To write to the DVD the first time use:
<PRE>
  growisofs -Z /dev/xxx filename
</PRE>

<P>
To add additional files (more parts use):

<P>
<PRE>
  growisofs -M /dev/xxx filename
</PRE>

<P>
The option <B>-use-the-force-luke=4gms</B> was added in growisofs 5.20 to
override growisofs' behavior of always checking for the 4GB limit.
Normally, this option is recommended for all Linux 2.6.8 kernels or
greater, since these newer kernels can handle writing more than 4GB.
See below for more details on this subject.

<P>
</LI>
<LI>For more information about DVD writing, please look at the
dvd+rw-tools homepagehttp://fy.chalmers.se/&nbsp;appro/linux/DVD+RW/.

<P>
</LI>
<LI>According to bug #912, bscan cannot read multi-volume DVDs.  This is
on our TODO list, but unless someone submits a patch it is not likely to be
done any time in the near future. (9 Sept 2007).

<P>
</LI>
</UL>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html223"
  HREF="Bacula_Projects.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html217"
  HREF="Bacula_Miscellaneous_Guide.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html211"
  HREF="Using_Stunnel_Encrypt_Commu.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html219"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html221"
  HREF="Index.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html224"
  HREF="Bacula_Projects.html">Bacula Projects</A>
<B> Up:</B> <A NAME="tex2html218"
  HREF="Bacula_Miscellaneous_Guide.html">Bacula Miscellaneous Guide</A>
<B> Previous:</B> <A NAME="tex2html212"
  HREF="Using_Stunnel_Encrypt_Commu.html">Using Stunnel to Encrypt</A>
 &nbsp; <B>  <A NAME="tex2html220"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html222"
  HREF="Index.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>