]> git.sur5r.net Git - bacula/docs/blob - docs/manual/dvd.tex
- Litle fix
[bacula/docs] / docs / manual / dvd.tex
1 %%
2 %%
3
4 \section*{DVD Volumes}
5 \label{_DVDChapterStart}
6 \index[general]{DVD Volumes}
7 \index[general]{Writing DVDs}
8 \index[general]{DVD Writing}
9 \index[general]{Volumes!DVD}
10 \addcontentsline{toc}{section}{DVD Volumes}
11
12 Bacula allows you to specify that you want to write to DVD. However,
13 this feature is implemented only in version 1.37 or later.
14 You may in fact write to DVD+RW, DVD+R, DVD-R, or DVD-RW 
15 media. The actual process used by Bacula is to first write
16 the image to a spool directory, then when the Volume reaches
17 a certain size or,  at your option, at the end of a Job, Bacula
18 will transfer the image from the spool directory to the
19 DVD.  The actual work of transferring the image is done
20 by a script {\bf dvd-writepart}, and the heart of that
21 script is a program called {\bf growisofs} which allows
22 creating or adding to a DVD ISO filesystem. growisofs is
23 normally found in the {\bf dvd+rw-tools} package or rpm.
24 You must have it loaded on your system for DVD writing to
25 work.
26
27 The fact that Bacula cannot use the OS to write directly
28 to the DVD makes the whole process a bit more error prone than
29 writing to say a disk, but nevertheless, it does work if you
30 use some care to set it up properly.
31
32 The remainder of this chapter explains the various directives that you can
33 use to control the DVD writing.
34
35 \label{DVDdirectives}
36
37 \subsection*{DVD Specific SD Directives} 
38 \index[general]{Directives!DVD}
39 \index[general]{DVD Specific SD Directives }
40 \addcontentsline{toc}{subsection}{DVD Specific SD Directives}
41
42 The following directives are added to the Storage daemon's
43 Device resource.
44
45 \begin{description}
46
47 \item [Requires Mount = {\it Yes|No}]
48    \index[sd]{Requires Mount  }
49    You must set this directive to {\bf yes} for DVD-writers,  and to {\bf no} for
50    all other devices (tapes/files).  This directive indicates if the device
51    requires to be mounted to be read,  and if it must be written in a special way.
52    If it set, {\bf Mount Point},  {\bf Mount Command}, {\bf Unmount Command} and
53    {\bf Write Part Command}  directives must also be defined. 
54
55 \item [Mount Point = {\it directory}]
56    \index[sd]{Mount Point  }
57    Directory where the device can be mounted. 
58
59 \item [Mount Command = {\it name-string}]
60    \index[sd]{Mount Command  }
61    Command that must be executed to mount the device. Although the
62    device is written directly, the mount command is necessary in
63    order to determine the free space left on the DVD. Before the command is 
64    executed, \%a is replaced with the Archive Device, and \%m with the Mount 
65    Point.
66
67    Most frequently, you will define it as follows:  
68
69 \footnotesize
70 \begin{verbatim}
71   Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
72 \end{verbatim}
73 \normalsize
74
75 \item [Unmount Command = {\it name-string}]
76    \index[sd]{Unmount Command  }
77    Command that must be executed to unmount the device. Before the command  is
78    executed, \%a is replaced with the Archive Device, and \%m with the  Mount
79    Point.
80
81    Most frequently, you will define it as follows:  
82
83 \footnotesize
84 \begin{verbatim}
85   Unmount Command = "/bin/umount %m"
86 \end{verbatim}
87 \normalsize
88
89 \item [Write Part Command = {\it name-string}]
90    \index[sd]{Write Part Command  }
91    Command that must be executed to write a part to the device. Before the 
92    command is executed, \%a is replaced with the Archive Device, \%m with the 
93    Mount Point, \%n with the current part number (0-based), and \%v with the 
94    current part filename.
95
96    For a DVD, you will most frequently specify the Bacula supplied  {\bf
97    dvd-writepart} script as follows:  
98
99 \footnotesize
100 \begin{verbatim}
101   Write Part Command = "/path/dvd-writepart %n %a %v"
102 \end{verbatim}
103 \normalsize
104
105   Where {\bf /path} is the path to your scripts install directory, and
106   dvd-writepart is the Bacula supplied script file.  
107   This command will already be present, but commented out,
108   in the default bacula-sd.conf file. To use it, simply remove
109   the comment (#) symbol.
110
111
112 \item [Free Space Command = {\it name-string}]
113    \index[sd]{Free Space Command  }
114    Command that must be executed to check how much free space is left on the 
115    device. Before the command is executed, \%a is replaced with the Archive 
116    Device, \%m with the Mount Point, \%n with the current part number (0-based), 
117    and \%v with the current part filename.
118
119    For a DVD, you will most frequently specify the Bacula supplied  {\bf
120    dvd-freespace} script as follows:  
121
122 \footnotesize
123 \begin{verbatim}
124   Free Space Command = "/path/dvd-freespace %n %a"
125 \end{verbatim}
126 \normalsize
127
128   Where {\bf /path} is the path to your scripts install directory, and
129   dvd-freespace is the Bacula supplied script file.
130   If you want to specify your own command, please look at the code in
131   dvd-freespace to see what output Bacula expects from this command.
132   This command will already be present, but commented out,
133   in the default bacula-sd.conf file. To use it, simply remove
134   the comment (#) symbol.
135
136   If you do not set it, Bacula will expect there is always free space on the
137   device. 
138
139 \end{description}
140
141 In addition to the directives specified above, you must also
142 specify the other standard Device resource directives. Please see the
143 sample DVD Device resource in the default bacula-sd.conf file. Be sure
144 to specify the raw device name for {\bf Archive Device}. It should 
145 be a name such as {\bf /dev/cdrom} or {\bf /media/cdrecorder} or
146 {\bf /dev/dvd} depending on your system.  It will not be a name such
147 as {\bf /mnt/cdrom}.
148
149
150 \subsection*{DVD Specific Director Directives} 
151 \index[general]{Directives!DVD}
152 \index[general]{DVD Specific Director Directives }
153 \addcontentsline{toc}{subsection}{DVD Specific Director Directives}
154
155 The following directives are added to the Director's Job resource.
156     
157 \label{WritePartAfterJob}
158 \item [Write Part After Job = \lt{}yes|no\gt{}]
159    \index[dir]{Write Part After Job }
160    If this directive is set to {\bf yes} (default {\bf no}), the
161    Volume written to a temporary spool file for the current Job will
162    be written to the DVD as a new part file
163    will be created after the job is finished.  
164
165    It should be set to {\bf yes} when writing to devices that require a mount
166    (for example DVD), so you are sure that the current part, containing
167    this job's data, is written to the device, and that no data is left in
168    the temporary file on the hard disk.  However, on some media, like DVD+R
169    and DVD-R, a lot of space (about 10Mb) is lost everytime a part is
170    written.  So, if you run several jobs each after another, you could set
171    this directive to {\bf no} for all jobs, except the last one, to avoid
172    wasting too much space, but to ensure that the data is written to the
173    medium when all jobs are finished.
174
175    It is ignored with tape and FIFO devices.  
176 \end{description}
177
178
179
180 \label{DVDpoints}
181 \subsection*{Other Points}
182 \index[general]{Points!Other }
183 \index[general]{Other Points }
184 \addcontentsline{toc}{subsection}{Other Points}
185
186 \begin{itemize}
187 \item DVD+RW supports only about 1000 overwrites, so every time you
188    mount the filesystem read/write will count as one write. This can
189    add up quickly, so it is best to mount your DVD+RW filesystem read-only.
190    Bacula does not need the DVD to be mounted read-write, since it uses
191    the raw device for writing.
192 \item Reformating DVD+RW 10-20 time can apparently make the medium 
193    unusable. Normally you should not have to format or reformat
194    DVD+RW media. If it is necessary, current versions of growisofs will
195    do so automatically.
196 \item If you wish to blank your DVD, use the following:
197 \begin{verbatim}
198   growisofs -Z /dev/xxx=/dev/zero
199 \end{verbatim}
200   where you replace xxx with your DVD device name. However, note that this
201   blanks the whole DVD, which takes quite a long time (16 minutes on mine).
202 \end{itemize}