]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual/restore.tex
Update
[bacula/docs] / docs / manual / restore.tex
index c90aab8d7559cfa12b6477965764240e7949c458..4085e7748516a7c34545b1bd521a20bd9ca8fbb2 100644 (file)
@@ -956,13 +956,21 @@ Bacula}{_ChapterRescue} chapter of this manual.
 \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
@@ -1001,11 +1009,21 @@ OK to run? (yes/mod/no):
    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
@@ -1048,10 +1066,12 @@ Job=CatalogBackup.2005-04-22_01.10.0
 
 \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"
@@ -1060,6 +1080,7 @@ VolSessionTime=1114075126
 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
@@ -1070,6 +1091,7 @@ FileIndex=1-1
   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"
@@ -1081,6 +1103,29 @@ FileIndex=1-1
 \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 
@@ -1147,7 +1192,8 @@ select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.M
   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}