Client, Storage, Catalog, and Where are correct. The FileSet is not
used when you specify a bootstrap file. Once you have set all the
correct values, run the Job and it will restore the backup of your
- database. You will then need to follow the instructions for your
+ database, which is most likely an ASCII dump.
+
+ You will then need to follow the instructions for your
database type to recreate the database from the ASCII backup file.
+ See the \ilink {Catalog Maintenance}{_ChapterStart12} chapter of
+ this manual for examples of the command needed to restore a
+ database from an ASCII dump (they are shown in the Compacting Your
+ XXX Database sections).
+
+ Also, please note that after you restore your database from an ASCII
+ backup, you do NOT want to do a {\bf make_bacula_tables} command, or
+ you will probably erase your newly restored database tables.
\item[Solution]
\end{verbatim}
\normalsize
+
From the above information, you can manually create a bootstrap file,
and then follow the instructions given above for restoring your database.
A reconstructed bootstrap file for the above backup Job would look
like the following:
+
\footnotesize
\begin{verbatim}
Volume="DLT-22Apr05"
FileIndex=1-1
\end{verbatim}
\normalsize
+
Where we have inserted the Volume name, Volume Session Id, and Volume
Session Time that correspond to the values in the job report. We've also
used a FileIndex of one, which will always be the case providing that
specified, so the restore code must search all data in the Volume to find
the requested file. A fully specified bootstrap file would have the File
and Blocks specified as follows:
+
\footnotesize
\begin{verbatim}
Volume="DLT-22Apr05"
\end{verbatim}
\normalsize
+ Once you have restored the ASCII dump of the database,
+ you will then to follow the instructions for your
+ database type to recreate the database from the ASCII backup file.
+ See the \ilink {Catalog Maintenance}{_ChapterStart12} chapter of
+ this manual for examples of the command needed to restore a
+ database from an ASCII dump (they are shown in the Compacting Your
+ XXX Database sections).
+
+ Also, please note that after you restore your database from an ASCII
+ backup, you do NOT want to do a {\bf make_bacula_tables} command, or
+ you will probably erase your newly restored database tables.
+
+
\item [Problem]
I try to restore the last known good full backup by specifying
item 3 on the restore menu then the JobId to restore. Bacula
error. Bacula will re-attempt to open the drive the next time a Job
starts that needs the the drive.
+\label{removablemedia}
\item [Removable media = {\it Yes|No}]
\index[sd]{Removable media}
\index[sd]{Directive!Removable media}
If {\bf Yes}, this device supports removable media (for example, tapes
or CDs). If {\bf No}, media cannot be removed (for example, an
- intermediate backup area on a hard disk).
+ intermediate backup area on a hard disk). If {\bf Removable media} is
+ enabled on a File device (as opposed to a tape) the Storage daemon will
+ assume that device may be something like a USB device that can be
+ removed or a simply a removable harddisk. When attempting to open
+ such a device, if the Volume is not found (for File devices, the Volume
+ name is the same as the Filename), then the Storage daemon will search
+ the entire device looking for likely Volume names, and for each one
+ found, it will ask the Director if the Volume can be used. If so,
+ the Storage daemon will use the first such Volume found. Thus it
+ acts somewhat like a tape drive -- if the correct Volume is not found,
+ it looks at what actually is found, and if it is an appendable Volume,
+ it will use it.
+
+ If the removable medium is not automatically mounted (e.g. udev), then
+ you might consider using additional Storage daemon device directives
+ such as {\bf Requires Mount}, {\bf Mount Point}, {\bf Mount Command},
+ and {\bf Unmount Command}, all of which can be used in conjunction with
+ {\bf Removable Media}.
+
\item [Random access = {\it Yes|No}]
\index[sd]{Random access}
\index[sd]{Directive!Random access}
If {\bf Yes}, the archive device is assumed to be a random access medium
which supports the {\bf lseek} (or {\bf lseek64} if Largefile is enabled
- during configuration) facility.
+ during configuration) facility. This should be set to {\bf Yes} for all
+ file systems such as DVD, USB, and fixed files. It should be set to
+ {\bf No} for non-random access devices such as tapes and named pipes.
+
+
+\item [Requires Mount = {\it Yes|No}]
+ \index[sd]{Requires Mount }
+ When this directive is enabled, the Storage daemon will submit
+ a {\bf Mount Command} before attempting to open the device.
+ You must set this directive to {\bf yes} for DVD-writers and removable
+ file systems such as USB devices that are not automatically mounted
+ by the operating system when plugged in or opened by Bacula.
+ It should be set to {\bf no} for
+ all other devices such as tapes and fixed filesystems. It should also
+ be set to {\bf no} for any removable device that is automatically
+ mounted by the operating system when opened (e.g. USB devices mounted
+ by udev or hotplug). This directive
+ indicates if the device requires to be mounted using the {\bf Mount
+ Command}. To be able to write a DVD, the following directives must also
+ be defined: {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount
+ Command} and {\bf Write Part Command}.
+
+\item [Mount Point = {\it directory}]
+ \index[sd]{Mount Point}
+ Directory where the device can be mounted.
+ This directive is used only
+ for devices that have {\bf Requires Mount} enabled such as DVD or
+ USB file devices.
+
+\item [Mount Command = {\it name-string}]
+ \index[sd]{Mount Command}
+ This directive specifies the command that must be executed to mount
+ devices such as DVDs and many USB devices. For DVDs, the
+ device is written directly, but 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.
+
+ Most frequently, for a DVD, you will define it as follows:
+
+\footnotesize
+\begin{verbatim}
+ Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
+\end{verbatim}
+\normalsize
+
+However, if you have defined a mount point in /etc/fstab, you might be
+able to use a mount command such as:
+
+\footnotesize
+\begin{verbatim}
+ Mount Command = "/bin/mount /media/dvd"
+\end{verbatim}
+\normalsize
+
+See the \ilink {Edit Codes}{mountcodes} section below for more details of
+the editing codes that can be used in this directive.
+
+
+\item [Unmount Command = {\it name-string}]
+ \index[sd]{Unmount Command}
+ This directive specifies the command that must be executed to unmount
+ devices such as DVDs and many USB devices. Before the command is
+ executed, \%a is replaced with the Archive Device, and \%m with the Mount
+ Point.
+
+ Most frequently, you will define it as follows:
+
+\footnotesize
+\begin{verbatim}
+ Unmount Command = "/bin/umount %m"
+\end{verbatim}
+\normalsize
+
+See the \ilink {Edit Codes}{mountcodes} section below for more details of
+the editing codes that can be used in this directive.
+
\item [Minimum block size = {\it size-in-bytes}]
\index[sd]{Minimum block size}
\end{description}
+\label{mountcodes}
+\subsection*{Edit Codes for Mount and Unmount Directives}
+\index[general]{Directives!Edit Codes}
+\index[general]{Edit Codes for Mount and Unmount Directives }
+\addcontentsline{toc}{subsection}{Edit Codes for Mount and Unmount Directives}
+
+Before submitting the {\bf Mount Command}, {\bf Unmount Command},
+{\bf Write Part Command}, or {\bf Free Space Command} directives
+to the operating system, Bacula performs character substitution of the
+following characters:
+
+\footnotesize
+\begin{verbatim}
+ %% = %
+ %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)
+\end{verbatim}
+\normalsize
+
+
\subsection*{Devices that require a mount (DVD)}
\index[general]{Devices that require a mount (DVD)}
\index[general]{DVD!Devices that require a mount}