]> git.sur5r.net Git - bacula/docs/blob - docs/manual/bimagemgr-chapter.tex
ebl update sqlite convertion doc
[bacula/docs] / docs / manual / bimagemgr-chapter.tex
1 %%
2 %%
3 %%  The following characters must be preceded by a backslash
4 %%    to be entered as printable characters:
5 %%
6 %%   # $ % & ~ _ ^ \ { }
7 %%  
8
9 \section{bimagemgr}
10 \label{bimagemgr}
11 \index[general]{Bimagemgr }
12
13 {\bf bimagemgr} is a utility for those who backup to disk volumes in order to
14 commit them to CDR disk, rather than tapes. It is a web based interface
15 written in Perl and is used to monitor when a volume file needs to be burned to
16 disk. It requires: 
17
18 \begin{itemize}
19 \item A web server running on the bacula server 
20 \item A CD recorder installed and configured on the bacula server 
21 \item The cdrtools package installed on the bacula server. 
22 \item perl, perl-DBI module, and either DBD-MySQL DBD-SQLite or DBD-PostgreSQL modules 
23    \end{itemize}
24
25 DVD burning is not supported by {\bf bimagemgr} at this
26 time, but both are planned for future releases. 
27
28 \subsection{bimagemgr installation}
29 \index[general]{bimagemgr!Installation }
30 \index[general]{bimagemgr Installation }
31
32 Installation from tarball:
33 % TODO: use itemized list for this?
34 1. Examine the Makefile and adjust it to your configuration if needed.
35 2. Edit config.pm to fit your configuration.
36 3. Do 'make install' as root.
37 4. Edit httpd.conf and change the Timeout value. The web server must not time
38 out and close the connection before the burn process is finished. The exact
39 value needed may vary depending upon your cd recorder speed and whether you are
40 burning on the bacula server on on another machine across your network. In my 
41 case I set it to 1000 seconds. Restart httpd.
42 5. Make sure that cdrecord is setuid root.
43 % TODO: I am pretty sure cdrecord can be used without setuid root
44 % TODO: as long as devices are setup correctly
45
46 Installation from rpm package:
47 \begin{enumerate}
48 \item Install the rpm package for your platform.
49
50 \item Edit /cgi-bin/config.pm to fit your configuration.
51
52 \item Edit httpd.conf and change the Timeout value. The web server must not time
53 out and close the connection before the burn process is finished. The exact
54 value needed may vary depending upon your cd recorder speed and whether you are
55 burning on the bacula server on on another machine across your network. In my 
56 case I set it to 1000 seconds. Restart httpd.
57
58 \item Make sure that cdrecord is setuid root.
59 \end{enumerate}
60
61 For bacula systems less than 1.36:
62 % TODO: use itemized list for this?
63
64 1. Edit the configuration section of config.pm to fit your configuration.
65
66 2. Run /etc/bacula/create\_cdimage\_table.pl from a console on your bacula
67 server (as root) to add the CDImage table to your bacula database.
68
69 Accessing the Volume files:
70 The Volume files by default have permissions 640 and can only be read by root. 
71 The recommended approach to this is as follows (and only works if bimagemgr and 
72 apache are running on the same host as bacula.
73
74 For bacula-1.34 or 1.36 installed from tarball -
75 % TODO: use itemized list for this?
76
77 1. Create a new user group bacula and add the user apache to the group for 
78 Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the 
79 bacula group.
80
81 2. Change ownership of all of your Volume files to root.bacula
82
83 3. Edit the /etc/bacula/bacula startup script and set SD\_USER=root and 
84 SD\_GROUP=bacula. Restart bacula.
85
86 Note: step 3 should also be done in /etc/init.d/bacula-sd but released versions
87 of this file prior to 1.36 do not support it. In that case it would be necessary after 
88 a reboot of the server to execute '/etc/bacula/bacula restart'.
89
90 For bacula-1.38 installed from tarball -
91 % TODO: use itemized list for this?
92 1. Your configure statement should include:
93 % TODO: fix formatting here
94 \begin{verbatim}
95         --with-dir-user=bacula
96         --with-dir-group=bacula
97         --with-sd-user=bacula
98         --with-sd-group=disk
99         --with-fd-user=root
100         --with-fd-group=bacula
101 \end{verbatim}
102
103 2. Add the user apache to the bacula group for Red Hat or Mandrake systems. 
104 For SuSE systems add the user wwwrun to the bacula group.
105
106 3. Check/change ownership of all of your Volume files to root.bacula
107
108 For bacula-1.36 or bacula-1.38 installed from rpm -
109 % TODO: use itemized list for this?
110
111 1. Add the user apache to the group bacula for Red Hat or Mandrake systems. 
112 For SuSE systems add the user wwwrun to the bacula group.
113
114 2. Check/change ownership of all of your Volume files to root.bacula
115
116 bimagemgr installed from rpm > 1.38.9 will add the web server user to the 
117 bacula group in a post install script. Be sure to edit the configuration 
118 information in config.pm after installation of rpm package.
119
120 bimagemgr will now be able to read the Volume files but they are still not 
121 world readable.
122
123 If you are running bimagemgr on another host (not recommended) then you will
124 need to change the permissions on all of your backup volume files to 644 in 
125 order to access them via nfs share or other means. This approach should only 
126 be taken if you are sure of the security of your environment as it exposes 
127 the backup Volume files to world read.
128
129 \subsection{bimagemgr usage}
130 \index[general]{bimagemgr!Usage }
131 \index[general]{bimagemgr Usage }
132
133 Calling the program in your web browser, e.g. {\tt
134 http://localhost/cgi-bin/bimagemgr.pl} will produce a display as shown below
135 % TODO: use tex to say figure number
136 in Figure 1. The program will query the bacula database and display all volume
137 files with the date last written and the date last burned to disk. If a volume
138 needs to be burned (last written is newer than last burn date) a "Burn"
139 button will be displayed in the rightmost column. 
140
141 \addcontentsline{lof}{figure}{Bacula CD Image Manager}
142 \includegraphics{./bimagemgr1.eps} \\Figure 1 
143 % TODO: use tex to say figure number
144
145 Place a blank CDR disk in your recorder and click the "Burn" button. This will
146 cause a pop up window as shown in Figure 2 to display the burn progress. 
147 % TODO: use tex to say figure number
148
149 \addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window}
150 \includegraphics{./bimagemgr2.eps} \\Figure 2 
151 % TODO: use tex to say figure number
152
153 When the burn finishes the pop up window will display the results of cdrecord
154 % TODO: use tex to say figure number
155 as shown in Figure 3. Close the pop up window and refresh the main window. The
156 last burn date will be updated and the "Burn" button for that volume will
157 disappear. Should you have a failed burn you can reset the last burn date of
158 that volume by clicking its "Reset" link. 
159
160 \addcontentsline{lof}{figure}{Bacula CD Image Burn Results}
161 \includegraphics{./bimagemgr3.eps} \\Figure 3 
162 % TODO: use tex to say figure number
163
164 In the bottom row of the main display window are two more buttons labeled
165 "Burn Catalog" and "Blank CDRW". "Burn Catalog" will place a copy of
166 your bacula catalog on a disk. If you use CDRW disks rather than CDR then
167 "Blank CDRW" allows you to erase the disk before re-burning it. Regularly
168 committing your backup volume files and your catalog to disk with {\bf
169 bimagemgr} ensures that you can rebuild easily in the event of some disaster
170 on the bacula server itself.