\item Set "Block Positioning = no" in your Device resource and try the
restore. This is a new directive and untested.
\item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and
- try the restore. Again send me the full job report output. If you are
- able to determine the block size your drive was previously using, you
- should try that size if 512 does not work.
+ try the restore. If you are able to determine the block size your drive
+ was previously using, you should try that size if 512 does not work.
\item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt
before starting the restore job and remove all the VolBlock statements.
These are what causes Bacula to reposition the tape, and where problems
\item[Solution]
For SQLite, use the vacuum command to try to fix the database. For either
MySQL or PostgreSQL, see the vendor's documentation. They have specific tools
- that check and repair databases.
+ that check and repair databases, see the \ilink{database
+ repair}{DatabaseRepair} sections of this manual for links to vendor
+ information.
Assuming the above does not resolve the problem, you will need to restore
- or rebuild your catalog.
+ or rebuild your catalog. Note, if it is a matter of some
+ inconsistencies in the Bacula tables rather than a broken database, then
+ running \ilink{dbcheck}{dbcheck} might help, but you will need to ensure
+ that your database indexes are properly setup. Please see
+ the \ilink{Database Performance Issues}{DatabasePerformance} sections
+ of this manual for more details.
+
\item[Problem]
How do I restore my catalog?
-\item[Solution]
+\item[Solution with a Catalog backup]
If you have backed up your database nightly (as you should) and you
have made a bootstrap file, you can immediately load back your
database (or the ASCII SQL output). Make a copy of your current
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]
+\item[Solution with a Job listing]
If you did save your database but did not make a bootstrap file, then
recovering the database is more difficult. You will probably need to
use bextract to extract the backup copy. First you should locate the
\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 [Solution withou a Job Listing]
+ If you do not have a job listing, then it is a bit more difficult.
+ Either you use the \ilink{bscan}{bscan} program to scan the contents
+ of your tape into a database, which can be very time consuming
+ depending on the size of the tape, or you can use the \ilink{bls}{bls}
+ program to list everything on the tape, and reconstruct a bootstrap
+ file from the bls listing for the file or files you want following
+ the instructions given above.
+
+ There is a specific example of how to use {\bf bls} below.
+
\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
know the Volume to which it was backed up.
\item [Solution]
- Use {\bf bls} to indicate where it is on the tape. For example:
+ Either bscan the tape, or use {\bf bls} to indicate where it is on the
+ tape. For example:
\footnotesize
\begin{verbatim}