]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual-de/restore.tex
updates
[bacula/docs] / docs / manual-de / restore.tex
index 79487cf9f275ffc971d8cb139728d76861057352..4443d4c0ef81dc1508a15f39530d8414dcada817 100644 (file)
@@ -898,10 +898,6 @@ problems that can come up making restoring more difficult. I'll try to
 provide a few ideas how to get out of these problem situations.
 
 \begin{description}
-\item [Problem]
-   Your catalog has been damaged and Bacula either doesn't work or prints
-   errors.
-\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.
@@ -943,27 +939,25 @@ Priority:   10
 OK to run? (yes/mod/no): 
 \end{verbatim}
 \normalsize
-   A number of the items will be different in your case. What you want
-   to do is: to use the mod option to change the Bootstrap to point to 
-   your saved bootstrap file; and to make sure all the other items
-   such as 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 type to
-   recreate the database from the ASCII backup file.
+   A number of the items will be different in your case.  What you want to
+   do is: to use the mod option to change the Bootstrap to point to your
+   saved bootstrap file; and to make sure all the other items such as
+   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 type to recreate the database from the ASCII backup file.
 
       
 \item[Solution]
-   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 listing of the job report from the last catalog
-   backup.  It has important information that will allow you to quickly find
-   your database file.  For example, in the job report for the CatalogBackup
-   shown below, the critical items are the Volume name(s), the Volume Session Id
-   and the Volume Session Time.  If you know those, you can easily restore your
+   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
+   listing of the job report from the last catalog backup.  It has
+   important information that will allow you to quickly find your database
+   file.  For example, in the job report for the CatalogBackup shown below,
+   the critical items are the Volume name(s), the Volume Session Id and the
+   Volume Session Time.  If you know those, you can easily restore your
    Catalog.
 \footnotesize
 \begin{verbatim}
@@ -1010,19 +1004,16 @@ 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 there was only one file
-  backed up in the job.
+  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
+  there was only one file backed up in the job.
   
-  The disadvantage of this bootstrap file compared to what is created when you
-  ask for one to be written, is that there is no File and Block 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:
+  The disadvantage of this bootstrap file compared to what is created when
+  you ask for one to be written, is that there is no File and Block
+  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"
@@ -1033,6 +1024,67 @@ VolBlock=0-4053
 FileIndex=1-1
 \end{verbatim}
 \normalsize
+
+\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 
+   then reports:
+
+\footnotesize
+\begin{verbatim}
+   1 Job 0 Files
+\end{verbatim}
+\normalsize
+   and restores nothing.
+\item[Solution]
+   Most likely the File records were pruned from the database either due
+   to the File Retention period expiring or by explicitly purging the
+   Job. By using the "llist jobid=nn" command, you can obtain all the
+   important information about the job:
+\footnotesize
+\begin{verbatim}
+llist jobid=120
+           JobId: 120
+             Job: save.2005-12-05_18.27.33
+        Job.Name: save
+     PurgedFiles: 0
+            Type: B
+           Level: F
+    Job.ClientId: 1
+     Client.Name: Rufus
+       JobStatus: T
+       SchedTime: 2005-12-05 18:27:32
+       StartTime: 2005-12-05 18:27:35
+         EndTime: 2005-12-05 18:27:37
+        JobTDate: 1133803657
+    VolSessionId: 1
+  VolSessionTime: 1133803624
+        JobFiles: 236
+       JobErrors: 0
+ JobMissingFiles: 0
+      Job.PoolId: 4
+       Pool.Name: Full
+   Job.FileSetId: 1
+ FileSet.FileSet: BackupSet
+\end{verbatim}
+\normalsize
+
+   Then you can find the Volume(s) used by doing:
+\footnotesize
+\begin{verbatim}
+sql
+select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.MediaId;
+\end{verbatim}
+\normalsize
+   Finally, you can create a bootstrap file as described in the previous
+   problem above using this information.
+
+   If you are using Bacula version 1.38.0 or greater, when you select
+   item 3 from the menu and enter the JobId, it will ask you if
+   you would like to restore all the files in the job, and it will
+   collect the above information and write the bootstrap file for
+   you.
+
 \item [Problem]
   You don't have a bootstrap file, and you don't have the Job report for
   the backup of your database, but you did backup the database, and you
@@ -1076,16 +1128,12 @@ Volume "DLT-22Apr05"
   How can I find where a file is stored.
 \item[Solution]
   Normally, it is not necessary, you just use the {\bf restore} command to
-restore the 
-  most recently saved version (menu option 5), or a version saved before a given
-date (menu
-  option 8).  If you know the JobId of the job in which it was saved, you can
-use menu 
-  option 3 to enter that JobId.
+  restore the most recently saved version (menu option 5), or a version
+  saved before a given date (menu option 8).  If you know the JobId of the
+  job in which it was saved, you can use menu option 3 to enter that JobId.
 
-  If you would like to know the JobId where a file was saved, select restore
-menu option
-  2.
+  If you would like to know the JobId where a file was saved, select
+  restore menu option 2.
 
   You can also use the {\bf query} command to find information such as: 
 \footnotesize
@@ -1111,4 +1159,5 @@ Choose a query (1-15):
 \end{verbatim}
 \normalsize
 
+
 \end{description}