]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/help/restore.html
Tweak Windows tray monitor build
[bacula/bacula] / bacula / src / qt-console / help / restore.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>Bat User's Guide</TITLE>
5 <META NAME="description" CONTENT="Bat User's Guide">
6 <META NAME="keywords" CONTENT="bacula">
7 <META NAME="resource-type" CONTENT="document">
8 <META NAME="distribution" CONTENT="global">
9 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
10 </HEAD>
11
12 <BODY>
13 <h1 align="center">Bat User's Guide</h1>
14 <br>
15 <font size=+1>
16
17 <h2>The Two Restore Interfaces</h2>
18
19 <p>Both interfaces accomplish the same three steps.
20 The steps are to select jobs to restore from, give the user the
21 opportunity to select files/directories, then indicate details such as
22 the host and path to restore to and trigger the job to run.
23
24 <h2>The Standard Restore Interface</h2>
25
26 <p>Start the standard restore procedure by pressing the restore button
27 in the task bar.  There are also two options in the joblist context sensitive 
28 menu to start a restore.  They are Restore From Time or Restore From Job.
29
30 <p>This restore method is intended as a high performance option.
31 It is a server side process.  These interfaces assist the user in utilizing the
32 text based restore capabilities of the standard console.  It interprets the text
33 to display the information in a way that simplifies the restore procedure.
34
35 <p>The Opening interface allows the user to choose selection criterion to
36 inform the server how to determine the set of backup job ids to use in the
37 restore.  This best possible set is he most recent full backup, the most
38 recent differential backup done since the most recent full, and all the
39 incremental backups done since the most recent full or differential.  Then the
40 server uses this set of jobs to create a file structure that is the
41 most recent version of each file found in this job list.
42
43 <p>The second interface allows the user to browse this file structure and
44 choose the files and directories to restore.  This is done in an explorer
45 type interface with a directory tree on the left.  In the right pane of a
46 splitter is a table showing a list of files and directories that are the
47 contents of the directory selected in the left pane.  The user can mark and
48 unmark either with the buttons on the top or by double clicking on the check
49 mark icon to toggle whether an item is selected or not.  Double clicking an
50 item which is a directory on a part of the table which is not the check icon
51 opens that directory.  Clicking 'OK' completes the selection process.
52
53 <p>The third step is the Restore Run interface.  It's purpose is to allow the
54 user to inform the bacula server details of the host and path to restore to, the
55 replacement rules, when to restore and what priority to give the restore job.
56
57 <h2>The Version Browser Restore Interface</h2>
58
59 <p>This restore interface is <b>NOT</b> intended to perform major restores of directory
60 structures with large numbers of directories and files.  It should work, however
61 it is a chatty interface.  This is due to the number of sql queries made of the server
62 which is proportional to the number of files and directories selected plus the number of
63 exceptions to defaults selected.  It <b>IS</b> intended to allow the user to browse for 
64 specific files and choose between the different versions of those files that
65 are available in the catalog to restore.
66
67 <p>The interface contains a horizontal splitter.  The bottom pane contains
68 some controls for the interface.
69 The top portion contains a vertical splitter with 4 panes for viewing the 
70 cataloged information.  The left pane is for viewing and further sub selecting
71 of jobs.  The second pane is for viewing the directory tree.  The third is for
72 viewing a list of files in a directory that has been selected.  Then
73 lastly the fourth pane is for viewing a table of versions of a single file
74 that has been selected from the file table.
75
76 <p>The version browser accomplishes the three restore steps differently.
77
78 <p>To select jobs and populate the directory tree, press the refresh button.
79 The job table contains selected jobs.  The selection criterion of the three
80 dropdowns and the two limits are used as the filtering criterion for
81 populating the job table the first time the refresh button is pushed.
82 After the refresh button has been pushed, the job table has check marks that
83 can selects and unselects jobs.  Re-pressing the refresh button does one of two
84 things.  What occurs is dependent on if the controls in the bottom pane 
85 display the same data as the previous time the refresh button was pressed.  If
86 changed the jobs table is repopulated from the selection criterion.  If
87 unchanged any jobs that have been unchecked are excluded from the 
88 process of selecting directories, files and versions.  The directory tree does get
89 repopulated when the refresh button is pushed.  There is a text label underneath the
90 refresh button to inform the user as to which occurs when refresh is pressed.
91
92 <p>The user can browse the directory tree and click on a directory folder which
93 then populates the file table with the files that are contained in the
94 selected directory path.  Selecting or unselecting a directory does also select or
95 unselect all files and all directories in the tree hierarchy beneath it.  If
96 there are any exceptions already selected beneath that directory, those
97 exceptions do get deleted.
98
99 <p>With the file table populated, the user can unselect a file in a selected 
100 directory and also select a file in an unselected directory.
101
102 <p>With a file selected the version table populates with all the instances
103 a file has been written to tape.  The user can choose a specific version of a
104 file for restore and override the default which is to restore the most recent
105 version. 
106
107 <p>Pressing the restore button initiates a procedure preparing to
108 perform the restore of the requested files.  The same Restore Run interface
109 that was the third step in the standard restore is then displayed.  It
110 allows the user to instruct the bacula server of the details of what host
111 and what path to restore the files to.  This part of the restore does take control
112 of the connection to the server and does not allow any other communication
113 to the server by the other interfaces.
114
115 <p>There are two progress bars that appear when refreshing or after pressing
116 Restore.  These indicate to the user the time it may take to complete any tasks
117 that could take a long time period.
118
119 <h2>A Version Browser Limitation</h2>
120
121 There is an important limitation of the version browser.  If a fileset
122 specifically points to a file instead of a directory that contains files, it
123 will not be seen in the version browser.  This is due to the way that the
124 version browser searches for directories first, then for files contained in
125 those directories.  A common example is with the catalog job.
126 It by default points directly to one file created in a databse dump.
127
128 <h2>Version Browser Performance</h2>
129
130 <p>If you have used the version browser with a large database, you may have
131 noticed that the performance can begin to be quite slow.  A way to improve the
132 response time of the database server is to add indexes that will assist a 
133 couple of the specific queries that are made.
134
135 <p>For postgresql add 2 indexes with the following commands in psql:
136 <br>CREATE INDEX file_filenameid_jobid ON file USING btree (filenameid,
137 jobid);
138 <br>CREATE INDEX file_pathid_idx ON file USING btree (pathid);
139
140 <p>For mysql add 2 indexes with the following commands in mysql:
141 <br>CREATE INDEX file_filenameid_jobid ON File (FilenameId, JobId);
142 <br>CREATE INDEX file_pathid_idx ON File (PathId);
143
144 <p>There is one way to make the first of those two indexes perform just a 
145 little better.  It is to create a partial index.  First, at least one backup 
146 must be in the database that has at least one directory.  Then in psql or mysql
147 perform the command:
148 <br>SELECT FilenameId FROM Filename WHERE name='';
149 <br>Use the results of this command and replace for XXX in the following command:
150 <br>CREATE INDEX file_filenameid_jobid2 ON File (JobId) WHERE FilenameId=XXX;
151 <br>This index will use less disk space and will perform better.  Don't forget to
152 remove the index it replaces, file_filenameid_jobid.
153
154 <p>If you have sqlite and would be willing to test out the creation of these
155 indexes to see if they work, please let me know the commands.
156
157 </BODY>
158 </HTML>