]> git.sur5r.net Git - bacula/docs/blob - docs/manual-fr/win32.tex
Add new French manual
[bacula/docs] / docs / manual-fr / win32.tex
1 %%
2 %%
3
4 \section*{The Windows Version of Bacula}
5 \label{_ChapterStart7}
6 \index[general]{Windows Version of Bacula }
7 \addcontentsline{toc}{section}{Windows Version of Bacula}
8
9 \subsection*{General}
10 \index[general]{General }
11 \addcontentsline{toc}{subsection}{General}
12
13 At the current time only the File daemon or Client program has been tested on
14 Windows. As a consequence, when we speak of the Windows version of Bacula
15 below, we are referring to the File daemon only. 
16
17 The Windows version of the Bacula File daemon has been tested on Win98, WinMe,
18 WinNT, and Win2000 systems. We have coded to support Win95, but no longer have
19 a system for testing. The Windows version of Bacula is a native Win32 port,
20 but there are very few source code changes to the Unix code, which means that the Windows
21 version is for the most part running code that has long proved stable on Unix
22 systems. When running, it is perfectly integrated with Windows and displays
23 its icon in the system icon tray, and provides a system tray menu to obtain
24 additional information on how Bacula is running (status and events dialog
25 boxes). If so desired, it can also be stopped by using the system tray menu,
26 though this should normally never be necessary. 
27
28 Once installed Bacula normally runs as a system service. This means that it is
29 immediately started by the operating system when the system is booted, and
30 runs in the background even if there is no user logged into the system. 
31
32 \subsection*{Win32 Installation}
33 \label{installation}
34 \index[general]{Installation }
35 \index[general]{Win32!Installation }
36 \addcontentsline{toc}{subsection}{Win32 Installation}
37
38 Normally, you will install the Windows version of Bacula from the binaries.
39 This install is standard Windows .exe that runs an install wizard using the
40 NSIS Free Software installer, so if you have already installed Windows
41 software, it should be very familiar to you. 
42
43 If you have a previous version Cygwin of Bacula (1.32 or lower) installed,
44 you should stop the service, uninstall it, and remove the Bacula
45 installation directory possibly saving your bacula-fd.conf file for use
46 with the new version you will install.  The new native version of Bacula
47 has far fewer files than the old Cygwin version, so it is better to start
48 with a clean directory.
49
50 Finally, proceed with the installation. 
51
52 \begin{itemize}
53 \item You must be logged in as Administrator to do a correct installation,
54    if not, please do so before continuing.
55   
56 \item Simply double click on the {\bf winbacula-1.xx.0.exe}  NSIS install
57    icon. The  actual name of the icon will vary from one release version to 
58    another. 
59
60 \includegraphics{./win32-nsis.eps}  winbacula-1.xx.0.exe  
61
62 \item Once launched, the installer wizard will ask you if you want  to install
63    Bacula.  
64
65 \addcontentsline{lof}{figure}{Win32 Client Setup Wizard}
66 \includegraphics{./win32-welcome.eps}  
67
68 \item If you proceed, you will be asked to select the components to be 
69    installed. You may install the Bacula program (Bacula File Service)  and or
70    the documentation. Both will be installed in sub-directories  of the install
71    location that you choose later. The components  dialog looks like the
72    following:  
73
74 \addcontentsline{lof}{figure}{Win32 Component Selection Dialog}
75 \includegraphics{./win32-pkg.eps}  
76
77 \item Next you will be asked to select an installation directory.  
78
79    \addcontentsline{lof}{figure}{Win32 Directory Selection Dialog}
80 \includegraphics{./win32-location.eps}  
81
82 \item If you are installing for the first time, you will  be asked if you want
83    to edit the bacula-fd.conf file, and  if you respond with yes, it will be
84    opened in notepad. Note, if you have installed Bacula to a drive other
85    than C: you probably should prefix the installation drive name to each
86    of the directory references in the bacula-fd.conf file, in particular 
87    the {\bf WorkingDirectory} and the {\bf Pid Directory} directives.
88
89    Also, if you do not wish to see the full listing of all files restored
90    in the job output after running a restore job, you can add {\bf ,
91    !restored} to the {\bf director} directive in the {\bf Messages}
92    resource.
93  
94 \item Then the installer will ask if you wish to install Bacula as a service. You
95    should always choose to do so:  
96
97 \addcontentsline{lof}{figure}{Win32 Client Service Selection}
98 \includegraphics{./win32-service.eps}  
99
100  
101 \item If everything goes well, you will receive the following confirmation:  
102
103    \addcontentsline{lof}{figure}{Win32 Client Service Confirmation}
104    \includegraphics{./win32-service-ok.eps}  
105
106  
107 \item Then you will be asked if you wish to start the service.  If you respond
108    with yes, any running Bacula will be shutdown  and the new one started. You
109    may see a DOS box momentarily  appear on the screen as the service is started.
110    It should  disappear in a second or two:  
111
112 \addcontentsline{lof}{figure}{Win32 Client Start}
113 \includegraphics{./win32-start.eps}  
114
115
116 \item Finally, the finish dialog will appear:  
117    \addcontentsline{lof}{figure}{Win32 Client Setup Completed}
118    \includegraphics{./win32-finish.eps}  
119
120
121 \end{itemize}
122
123 That should complete the installation process. When the Bacula File Server is
124 ready to serve files, an icon \includegraphics{./idle.eps} representing a
125 cassette (or tape) will appear in the system tray
126 \includegraphics{./tray-icon.eps}; right click on it and a menu will appear.\\
127 \includegraphics{./menu.eps}\\
128 The {\bf Events} item is currently unimplemented, by selecting the {\bf
129 Status} item, you can verify whether any jobs are running or not. 
130
131 When the Bacula File Server begins saving files, the color of the holes in the
132 cassette icon will change from white to green \includegraphics{./running.eps},
133 and if there is an error, the holes in the cassette icon will change to red
134 \includegraphics{./error.eps}. 
135
136 If you are using remote desktop connections between your windows boxes, be
137 warned that that tray icon does not always appear. It will always be visible
138 when you log into the console, but the remote desktop may not display it. 
139
140 \subsection*{Post Win32 Installation}
141 \index[general]{Post Win32 Installation }
142 \index[general]{Win32!Post Installation }
143 \addcontentsline{toc}{subsection}{Post Win32 Installation}
144
145 After installing Bacula and before running it, you should check the contents
146 of {\bf
147 c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} to
148 ensure that it corresponds to your configuration. 
149
150 Finally, but pulling up the Task Manager (ctl-alt-del), verify that Bacula
151 is running as a process (not an Application) with User Name SYSTEM. If this is 
152 not the case, you probably have not installed Bacula while running as
153 Administrator, and hence it will be unlikely that Bacula can access
154 all the system files.
155
156 \subsection*{Uninstalling Bacula on Win32}
157 \index[general]{Win32!Uninstalling Bacula }
158 \index[general]{Uninstalling Bacula on Win32 }
159 \addcontentsline{toc}{subsection}{Uninstalling Bacula on Win32}
160
161 Once Bacula has been installed, it can be uninstalled using the standard
162 Windows Add/Remove Programs dialog found on the Control panel. 
163
164 \subsection*{Dealing with Win32 Problems}
165 \label{problems}
166 \index[general]{Win32!Dealing with Problems }
167 \index[general]{Dealing with Win32 Problems }
168 \addcontentsline{toc}{subsection}{Dealing with Win32 Problems}
169
170 The most likely source of problems is authentication when the Director
171 attempts to connect to the File daemon that you installed. This can occur if
172 the names and the passwords defined in the File daemon's configuration file
173 {\bf 
174 c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf} on
175 the Windows machine do not match with the names and the passwords in the
176 Director's configuration file {\bf bacula-dir.conf} located on your Unix/Linux
177 server. 
178
179 More specifically, the password found in the {\bf Client} resource in the
180 Director's configuration file must be the same as the password in the {\bf
181 Director} resource of the File daemon's configuration file. In addition, the
182 name of the {\bf Director} resource in the File daemon's configuration file
183 must be the same as the name in the {\bf Director} resource of the Director's
184 configuration file. 
185
186 It is a bit hard to explain in words, but if you understand that a Director
187 normally has multiple Clients and a Client (or File daemon) may permit access
188 by multiple Directors, you can see that the names and the passwords on both
189 sides must match for proper authentication. 
190
191 One user had serious problems with the configuration file until he realized
192 that the Unix end of line conventions were used and Bacula wanted them in
193 Windows format. This has not been confirmed though. 
194
195 Running Unix like programs on Windows machines is a bit frustrating because
196 the Windows command line shell (DOS Window) is rather primitive. As a
197 consequence, it is not generally possible to see the debug information and
198 certain error messages that Bacula prints. With a bit of work, however, it is
199 possible. When everything else fails and you want to {\bf see} what is going
200 on, try the following: 
201
202 \footnotesize
203 \begin{verbatim}
204    Start a DOS shell Window.
205    cd c:\bacula\bin
206    bacula-fd -t >out
207    type out
208 \end{verbatim}
209 \normalsize
210
211 The {\bf -t} option will cause Bacula to read the configuration file, print
212 any error messages and then exit. the {\bf \gt{}} redirects the output to the
213 file named {\bf out}, which you can list with the {\bf type} command. 
214
215 If something is going wrong later, or you want to run {\bf Bacula} with a
216 debug option, you might try starting it as: 
217
218 \footnotesize
219 \begin{verbatim}
220    bacula-fd -d 100 >out
221 \end{verbatim}
222 \normalsize
223
224 In this case, Bacula will run until you explicitly stop it, which will give
225 you a chance to connect to it from your Unix/Linux server. In later versions
226 of Bacula (1.34 on, I think), when you start the File daemon in debug mode it
227 can write the output to a trace file {\bf bacula.trace} in the current
228 directory. To enable this, before running a job, use the console, and enter: 
229
230 \footnotesize
231 \begin{verbatim}
232    trace on
233 \end{verbatim}
234 \normalsize
235
236 then run the job, and once you have terminated the File daemon, you will find
237 the debug output in the {\bf bacula.trace} file. 
238
239 In addition, you should look in the System Applications log on the Control
240 Panel to find any Windows errors that Bacula got during the startup process. 
241
242 Finally, due to the above problems, when you turn on debugging, and specify
243 trace=1 on a setdebug command in the Console, Bacula will write the debug
244 information to the file {\bf bacula.trace} in the directory from which Bacula
245 is executing. 
246
247 \label{Compatibility}
248 \subsection*{Windows Compatibility Considerations}
249 \index[general]{Windows Compatibility Considerations }
250 \index[general]{Considerations!Windows Compatibility }
251 \addcontentsline{toc}{subsection}{Windows Compatibility Considerations}
252
253 If any applications are running during the backup and they have files
254 opened exclusively, Bacula will not be able to backup those files, so be
255 sure you close your applications (or tell your users to close their
256 applications) before the backup. Fortunately,
257 most Microsoft applications do not open
258 files exclusively so that they can be backed up.  However, you will need to
259 experiment.  In any case, if Bacula cannot open the file, it will print an
260 error message, so you will always know which files were not backed up.
261 For version 1.37.25 and greater, see the section below on
262 Volume Shadow Copy Service.
263
264 During backup, Bacula doesn't know about the system registry, so you will
265 either need to write it out to an ASCII file using {\bf regedit~~/e} or use a
266 program specifically designed to make a copy or backup the registry. 
267
268 In Bacula version 1.31 and later, we use Windows backup API calls by
269 default.  Typical of Windows, programming these special BackupRead and
270 BackupWrite calls is a real nightmare of complications.  The end result
271 gives some distinct advantages and some disadvantages.
272
273 First, the advantages are that on WinNT/2K/XP systems, the security and
274 ownership information is now backed up.  In addition, with the exception of
275 files in exclusive use by another program (a major disaster for backup
276 programs on Windows), Bacula can now access all system files.  This means
277 that when you restore files, the security and ownership information will be
278 restored on WinNT/2K/XP along with the data.
279
280 The disadvantage of the Windows backup API calls is that it produces
281 non-portable backups.  That is files and their data that are backed up on
282 WinNT using the native API calls (BackupRead/BackupWrite) cannot be
283 restored on Win95/98/Me or Unix systems.  In principle, a file backed up on
284 WinNT can be restored on WinXP, but this remains to be seen in practice
285 (not yet tested).  In addition, the stand-alone tools such as {\bf bls} and
286 {\bf bextract} cannot be used to retrieve the data for those files because
287 those tools are not available on Windows.  All restores must use the Bacula
288 {\bf restore} command.  This restriction is mentioned for completeness, but
289 in practice should not create any problems.
290
291 As a default, Bacula backs up Windows systems using the Windows API calls.
292 If you want to backup data on a WinNT/2K/XP system and restore it on a
293 Unix/Win95/98/Me system, we have provided a special {\bf portable} option
294 that backs up the data in a portable fashion by using portable API calls.
295 See the \ilink{portable option}{portable} on the Include statement in a
296 FileSet resource in the Director's configuration chapter for the details on
297 setting this option.  However, using the portable option means you may have
298 permissions problems accessing files, and none of the security and
299 ownership information will be backed up or restored.  The file data can,
300 however, be restored on any system.
301
302 You should always be able to restore any file backed up on Unix or Win95/98/Me
303 to any other system. On some systems, such as WinNT/2K/XP, you may have to
304 reset the ownership of such restored files. Any file backed up on WinNT/2K/XP
305 should in principle be able to be restored to a similar system (i.e.
306 WinNT/2K/XP), however, I am unsure of the consequences if the owner
307 information and accounts are not identical on both systems. Bacula will not
308 let you restore files backed up on WinNT/2K/XP to any other system (i.e. Unix
309 Win95/98/Me) if you have used the defaults. 
310
311 Finally, if you specify the {\bf portable=yes} option on the files you back
312 up. Bacula will be able to restore them on any other system. However, any
313 WinNT/2K/XP specific security and ownership information will be lost. 
314
315 The following matrix will give you an idea of what you can expect. Thanks to
316 Marc Brueckner for doing the tests: 
317
318
319
320 \addcontentsline{lot}{table}{WinNT/2K/XP Restore Portability Status}
321 \begin{longtable}{|l|l|p{2.8in}|}
322  \hline 
323 \multicolumn{1}{|c| }{\bf Backup OS } & \multicolumn{1}{c| }{\bf Restore OS }
324 & \multicolumn{1}{c| }{\bf Results  } \\
325  \hline {WinMe } & {WinMe } & {Works  } \\
326  \hline {WinMe } & {WinNT } & {Works (SYSTEM permissions)  } \\
327  \hline {WinMe } & {WinXP } & {Works (SYSTEM permissions)  } \\
328  \hline {WinMe } & {Linux } & {Works (SYSTEM permissions)  } \\
329  \hline {\ } & {\ } & {\  } \\
330  \hline {WinXP } & {WinXP } & {Works  } \\
331  \hline {WinXP } & {WinNT } & {Works (all files OK, but got "The data is invalid"
332 message)  } \\
333  \hline {WinXP } & {WinMe } & {Error: Win32 data stream not supported.  } \\
334  \hline {WinXP } & {WinMe } & {Works if {\bf Portable=yes} specified during backup.} \\
335  \hline {WinXP } & {Linux } & {Error: Win32 data stream not supported.  } \\
336  \hline {WinXP } & {Linux } & {Works if {\bf Portable=yes} specified during backup.}\\
337  \hline {\ } & {\ } & {\  } \\
338  \hline {WinNT } & {WinNT } & {Works  } \\
339  \hline {WinNT } & {WinXP } & {Works  } \\
340  \hline {WinNT } & {WinMe } & {Error: Win32 data stream not supported.  } \\
341  \hline {WinNT } & {WinMe } & {Works if {\bf Portable=yes} specified during backup.}\\
342  \hline {WinNT } & {Linux } & {Error: Win32 data stream not supported.  } \\
343  \hline {WinNT } & {Linux } & {Works if {\bf Portable=yes} specified during backup.  }\\
344  \hline {\ } & {\ } & {\  } \\
345  \hline {Linux } & {Linux } & {Works  } \\
346  \hline {Linux } & {WinNT } & {Works (SYSTEM permissions)  } \\
347  \hline {Linux } & {WinMe } & {Works  } \\
348  \hline {Linux } & {WinXP } & {Works (SYSTEM permissions) }
349 \\ \hline 
350
351 \end{longtable}
352
353 \label{VSS}
354 \subsection*{Volume Shadow Copy Service}
355 \index[general]{Volume Shadow Copy Service}
356 \index[general]{VSS}
357 \addcontentsline{toc}{subsection}{Volume Shadow Copy Service}
358 In version 1.37.30 and greater, you can turn on Microsoft's Volume
359 Shadow Copy Service (VSS).      
360
361 Microsoft added VSS to Windows XP and Windows 2003. From the perspective of
362 a backup-solution for Windows, this is an extremely important step. VSS
363 allows Bacula to backup open files and even to interact with applications like
364 RDBMS to produce consistent file copies. VSS aware applications are called
365 VSS Writers, they register with the OS so that when Bacula wants to do a
366 Snapshot, the OS will notify the register Writer programs, which may then
367 create a consistent state in their application, which will be backed up.
368 Examples for these writers are "MSDE" (Microsoft database
369 engine), "Event Log Writer", "Registry Writer" plus 3rd
370 party-writers.  If you have a non-vss aware application (e.g.
371 SQL Anywhere or probably MySQL), a shadow copy is still generated
372 and the open files can be backed up, but there is no guarantee
373 that the file is consistent.
374
375 Bacula produces a message from each of the registered writer programs
376 when it is doing a VSS backup so you know which ones are correctly backed
377 up.
378
379 Bacula supports VSS on both Windows 2003 and Windows XP.
380 Technically Bacula creates a shadow copy as soon as the backup process
381 starts. It does then backup all files from the shadow copy and destroys the
382 shadow copy after the backup process. Please have in mind, that VSS
383 creates a snapshot and thus backs up the system at the state it had
384 when starting the backup. It will disregard file changes which occur during
385 the backup process.
386
387 VSS can be turned on by placing an
388
389 \index[dir]{Enable VSS}
390 \index[general]{Enable VSS}
391 \begin{verbatim}
392 Enable VSS = yes
393 \end{verbatim}
394
395 in your FileSet resource. 
396
397 Important Note!! Under the current implementation, you may only
398 run a single job at a time in any Win32 File daemon that has VSS
399 active. Running multiple simultanous jobs in the File daemon
400 will most likely cause jobs to fail. This restriction does not apply
401 to the Director, Storage daemons, or any File daemons not running
402 VSS.
403
404 The VSS aware File daemon has the letters VSS on the signon line that
405 it produces when contacted by the console. For example:
406 \begin{verbatim}
407 Tibs-fd Version: 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600
408 \end{verbatim}
409 the VSS is shown in the line above. This only means that the File daemon
410 is capable of doing VSS not that VSS is turned on for a particular backup.
411 There are two ways of telling if VSS is actually turned on during a backup.
412 The first is to look at the status output for a job, e.g.:
413 \footnotesize
414 \begin{verbatim}
415 Running Jobs:
416 JobId 1 Job NightlySave.2005-07-23_13.25.45 is running.
417     VSS Backup Job started: 23-Jul-05 13:25
418     Files=70,113 Bytes=3,987,180,650 Bytes/sec=3,244,247
419     Files Examined=75,021
420     Processing file: c:/Documents and Settings/kern/My Documents/My Pictures/Misc1/Sans titre - 39.pdd
421     SDReadSeqNo=5 fd=352
422 \end{verbatim}
423 \normalsize
424 Here, you see under Running Jobs that JobId 1 is "VSS Backup Job started ..." 
425 This means that VSS is enabled for that job.  If VSS is not enabled, it will
426 simply show "Backup Job started ..." without the letters VSS.
427
428 The second way to know that the job was backed up with VSS is to look at the 
429 Job Report, which will look something like the following:
430 \footnotesize
431 \begin{verbatim}
432 23-Jul 13:25 rufus-dir: Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45
433 23-Jul 13:26 rufus-sd: Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (/dev/nst0)
434 23-Jul 13:26 rufus-sd: Spooling data ...
435 23-Jul 13:26 Tibs: Generate VSS snapshots. Driver="VSS WinXP", Drive(s)="C"
436 23-Jul 13:26 Tibs: VSS Writer: "MSDEWriter", State: 1 (VSS_WS_STABLE)
437 23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Bootable State)", State: 1 (VSS_WS_STABLE)
438 23-Jul 13:26 Tibs: VSS Writer: "WMI Writer", State: 1 (VSS_WS_STABLE)
439 23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Service State)", State: 1 (VSS_WS_STABLE)
440 \end{verbatim}
441 \normalsize
442 In the above Job Report listing, you see that the VSS snapshot was generated for drive C (if
443 other drives are backed up, they will be listed on the {\bf Drive(s)="C"}  You also see the
444 reports from each of the writer program.  Here they all report VSS\_WS\_STABLE, which means
445 that you will get a consistent snapshot of the data handled by that writer.
446
447 \subsection*{Windows Firewalls}
448 \index[general]{Firewalls!Windows }
449 \index[general]{Windows Firewalls }
450 \addcontentsline{toc}{subsection}{Windows Firewalls}
451
452 If you turn on the firewalling feature on Windows (default in WinXP SP2), you
453 are likely to find that the Bacula ports are blocked and you cannot
454 communicate to the other daemons. This can be deactivated through the {\bf
455 Security Notification} dialog, which is apparently somewhere in the {\bf
456 Security Center}. I don't have this on my computer, so I cannot give the exact
457 details. 
458
459 The command: 
460
461 \footnotesize
462 \begin{verbatim}
463 netsh firewall set opmode disable
464 \end{verbatim}
465 \normalsize
466
467 is purported to disable the firewall, but this command is not accepted on my
468 WinXP Home machine. 
469
470 \subsection*{Windows Port Usage}
471 \index[general]{Windows Port Usage }
472 \index[general]{Usage!Windows Port }
473 \addcontentsline{toc}{subsection}{Windows Port Usage}
474
475 If you want to see if the File daemon has properly opened the port and is
476 listening, you can enter the following command in a shell window: 
477
478 \footnotesize
479 \begin{verbatim}
480    netstat -an | findstr 910[123]
481 \end{verbatim}
482 \normalsize
483
484 \subsection*{Windows Disaster Recovery}
485 \index[general]{Recovery!Windows Disaster }
486 \index[general]{Windows Disaster Recovery }
487 \addcontentsline{toc}{subsection}{Windows Disaster Recovery}
488
489 We don't currently have a good solution for disaster recovery on Windows as we
490 do on Linux. The main piece lacking is a Windows boot floppy or a Windows boot
491 CD. Microsoft releases a Windows Pre-installation Environment ({\bf WinPE})
492 that could possibly work, but we have not investigated it. This means that
493 until someone figures out the correct procedure, you must restore the OS from
494 the installation disks, then you can load a Bacula client and restore files.
495 Please don't count on using {\bf bextract} to extract files from your backup
496 tapes during a disaster recovery unless you have backed up those files using
497 the {\bf portable} option. {\bf bextract} does not run on Windows, and the
498 normal way Bacula saves files using the Windows API prevents the files from
499 being restored on a Unix machine. Once you have an operational Windows OS
500 loaded, you can run the File daemon and restore your user files. 
501
502 Please see 
503 \ilink{ Disaster Recovery of Win32 Systems}{Win3233} for the latest
504 suggestion, which looks very promising. 
505
506 It looks like Bart PE Builder, which creates a Windows PE (Pre-installation
507 Environment) Boot-CD, may be just what is needed to build a complete disaster
508 recovery system for Win32. This distribution can be found at 
509 \elink{http://www.nu2.nu/pebuilder/ }{http://www.nu2.nu/pebuilder/}. 
510
511 \subsection*{Windows Restore Problems}
512 \index[general]{Problems!Windows Restore}
513 \index[general]{Windows Restore Problems}
514 \addcontentsline{toc}{subsection}{Windows Restore Problems}
515 Please see the  
516 \ilink{Restore Chapter}{Windows} of this manual for problems
517 that you might encounter doing a restore.
518
519
520 \subsection*{Windows Ownership and Permissions Problems}
521 \index[general]{Problems!Windows Ownership and Permissions }
522 \index[general]{Windows Ownership and Permissions Problems }
523 \addcontentsline{toc}{subsection}{Windows Ownership and Permissions
524 Problems}
525
526 If you restore files backed up from WinNT/XP/2K to an alternate directory,
527 Bacula may need to create some higher level directories that were not saved
528 (or restored). In this case, the File daemon will create them under the SYSTEM
529 account because that is the account that Bacula runs under as a service. As of
530 version 1.32f-3, Bacula creates these files with full access permission.
531 However, there may be cases where you have problems accessing those files even
532 if you run as administrator. In principle, Microsoft supplies you with the way
533 to cease the ownership of those files and thus change the permissions.
534 However, a much better solution to working with and changing Win32 permissions
535 is the program {\bf SetACL}, which can be found at 
536 \elink{http://setacl.sourceforge.net/ }{http://setacl.sourceforge.net/}. 
537
538 If you have not installed Bacula while running as Administrator
539 and if Bacula is not running as a Process with the userid (User Name) SYSTEM, 
540 then it is very unlikely that it will have sufficient permission to
541 access all your files. 
542
543 Some users have experienced problems restoring files that participate in
544 the Active Directory. They also report that changing the userid under which
545 Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves
546 the problem.
547
548
549 \subsection*{Manually resetting the Permissions}
550 \index[general]{Manually resetting the Permissions }
551 \index[general]{Permissions!Manually resetting the }
552 \addcontentsline{toc}{subsection}{Manually resetting the Permissions}
553
554 The following solution was provided by Dan Langille \lt{}dan at langille in
555 the dot org domain\gt{}. The steps are performed using Windows 2000 Server but
556 they should apply to most Win32 platforms. The procedure outlines how to deal
557 with a problem which arises when a restore creates a top-level new directory.
558 In this example, "top-level" means something like {\bf
559 c:\textbackslash{}src}, not {\bf c:\textbackslash{}tmp\textbackslash{}src}
560 where {\bf c:\textbackslash{}tmp} already exists. If a restore job specifies /
561 as the {\bf Where:} value, this problem will arise. 
562
563 The problem appears as a directory which cannot be browsed with Windows
564 Explorer. The symptoms include the following message when you try to click on
565 that directory: 
566
567 \includegraphics{./access-is-denied.eps} 
568
569 If you encounter this message, the following steps will change the permissions
570 to allow full access. 
571
572 \begin{enumerate}
573 \item right click on the top level directory (in this example, {\bf c:/src})
574    and  select {\bf Properties}. 
575 \item click on the Security tab. 
576 \item If the following message appears, you can ignore it, and click on {\bf
577    OK}. 
578
579 \includegraphics{./view-only.eps} 
580
581 You should see something like this: 
582
583 \includegraphics{./properties-security.eps} 
584 \item click on Advanced 
585 \item click on the Owner tab 
586 \item Change the owner to something other than the current owner (which is
587    {\bf SYSTEM} in this example as shown below). 
588
589 \includegraphics{./properties-security-advanced-owner.eps} 
590 \item ensure the "Replace owner on subcontainers and objects" box is 
591    checked 
592 \item click on OK 
593 \item When the message "You do not have permission to read the contents of
594    directory c:\textbackslash{}src\textbackslash{}basis. Do you wish to replace
595    the directory permissions with permissions granting you Full Control?", click
596 on Yes. 
597
598 \includegraphics{./confirm.eps} 
599 \item Click on OK to close the Properties tab 
600    \end{enumerate}
601
602 With the above procedure, you should now have full control over your restored
603 directory. 
604
605 In addition to the above methods of changing permissions, there is a Microsoft
606 program named {\bf cacls} that can perform similar functions.
607
608 \subsection*{Backing Up the WinNT/XP/2K System State}
609 \index[general]{State!Backing Up the WinNT/XP/2K System }
610 \index[general]{Backing Up the WinNT/XP/2K System State }
611 \addcontentsline{toc}{subsection}{Backing Up the WinNT/XP/2K System State}
612
613 A suggestion by Damian Coutts using Microsoft's NTBackup utility in
614 conjunction with Bacula should permit a full restore of any damaged system
615 files on Win2K/XP. His suggestion is to do an NTBackup of the critical system
616 state prior to running a Bacula backup with the following command: 
617
618 \footnotesize
619 \begin{verbatim}
620 ntbackup backup systemstate /F c:\systemstate.bkf
621 \end{verbatim}
622 \normalsize
623
624 The {\bf backup} is the command, the {\bf systemstate} says to backup only the
625 system state and not all the user files, and the {\bf /F
626 c:\textbackslash{}systemstate.bkf} specifies where to write the state file.
627 this file must then be saved and restored by Bacula. 
628
629 To restore the system state, you first reload a base operating system if the
630 OS is damaged, otherwise, this is not necessary, then you would use Bacula to
631 restore all the damaged or lost user's files and to recover the {\bf
632 c:\textbackslash{}systemstate.bkf} file. Finally if there are any damaged or
633 missing system files or registry problems, you run {\bf NTBackup} and {\bf
634 catalogue} the system statefile, and then select it for restore. The
635 documentation says you can't run a command line restore of the systemstate. 
636
637 To the best of my knowledge, this has not yet been tested. If you test it,
638 please report your results to the Bacula email list. 
639
640 \subsection*{Windows Considerations for Filename Specifications}
641 \index[general]{Specifications!Windows Considerations for Filename }
642 \index[general]{Windows Considerations for Filename Specifications }
643 \addcontentsline{toc}{subsection}{Windows Considerations for Filename
644 Specifications}
645
646 Please see the 
647 \ilink{Director's Configuration chapter}{win32} of this manual
648 for important considerations on how to specify Windows paths in Bacula FileSet
649 Include and Exclude directives. 
650
651 \index[general]{Unicode}
652 Bacula versions prior to 1.37.28 do not support Windows Unicode filenames.
653 As of that version, both {\bf bconsole} and {\bf bwx-console} support Windows
654 Unicode filenames. There may still be some problems with multiple byte
655 characters (e.g. Chinese, ...) where it is a two byte character but the
656 displayed character is not two characters wide.
657
658 \index[general]{Win32 path length restriction}
659 Path/filenames longer than 260 characters are not supported. This may be
660 possible in a future version.
661
662 \subsection*{Command Line Options Specific to the Bacula Windows File
663 Daemon (Client)}
664 \index[general]{Client!Command Line Options Specific to the Bacula Windows
665 File Daemon }
666 \index[general]{Command Line Options Specific to the Bacula Windows File
667 Daemon (Client) }
668 \addcontentsline{toc}{subsection}{Command Line Options Specific to the
669 Bacula Windows File Daemon (Client)}
670
671 These options are not normally seen or used by the user, and are documented
672 here only for information purposes. At the current time, to change the default
673 options, you must either manually run {\bf Bacula} or you must manually edit
674 the system registry and modify the appropriate entries. 
675
676 In order to avoid option clashes between the options necessary for {\bf
677 Bacula} to run on Windows and the standard Bacula options, all Windows
678 specific options are signaled with a forward slash character (/), while as
679 usual, the standard Bacula options are signaled with a minus (-), or a minus
680 minus (\verb:--:). All the standard Bacula options can be used on the Windows
681 version. In addition, the following Windows only options are implemented: 
682
683 \begin{description}
684
685 \item [/servicehelper ]
686    \index[fd]{/servicehelper }
687    Run the service helper application  (don't use this it is deprecated.).  
688
689 \item [/service ]
690    \index[fd]{/service }
691    Start Bacula as a service 
692
693 \item [/run ]
694    \index[fd]{/run }
695    Run the Bacula application  
696
697 \item [/install ]
698    \index[fd]{/install }
699    Install Bacula as a service in the system registry  
700
701 \item [/remove ]
702    \index[fd]{/remove }
703    Uninstall Bacula from the system registry  
704
705 \item [/about ]
706    \index[fd]{/about }
707    Show the Bacula about dialogue box  
708
709 \item [/status ]
710    \index[fd]{/status }
711    Show the Bacula status dialogue box  
712
713 \item [/events ]
714    \index[fd]{/events }
715    Show the Bacula events dialogue box (not  yet implemented)  
716
717 \item [/kill ]
718    \index[fd]{/kill }
719    Stop any running {\bf Bacula}  
720
721 \item [/help ]
722    \index[fd]{/help }
723    Show the Bacula help dialogue box 
724 \end{description}
725
726 It is important to note that under normal circumstances the user should never
727 need to use these options as they are normally handled by the system
728 automatically once Bacula is installed. However, you may note these options in
729 some of the .bat files that have been created for your use. 
730
731 \subsection*{Shutting down Windows Systems}
732 \index[general]{Shutting down Windows Systems }
733 \index[general]{Systems!Shutting down Windows }
734 \addcontentsline{toc}{subsection}{Shutting down Windows Systems}
735
736 Some users like to shutdown their windows machines after a backup using a
737 Client Run After Job directive. If you want to do something similar, you might
738 take the shutdown program from the 
739 \elink{apcupsd project}{http://www.apcupsd.com} or one from the 
740 \elink{Sysinternals project}{http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml}.