Debian Codegraph @

manuals/en/main/win32.tex

raw
1 \chapter{The Windows Version of \bacula{}}
2 \label{blb:Win32Chapter}
3 \index[general]{Windows Version of \bacula{}}
4
5 At the current time the File daemon or Client program has been thoroughly tested on Windows and is suitable for a production environment. A Windows version of the \bacula{} Storage daemon is also included in the installer, but it has not been extensively tested in a production environment. As a consequence, when we speak of the Windows version of \bacula{} below, we are referring to the File daemon (client) only.
6
7 The Windows version of the \bacula{} File daemon has been tested on WinXP,
8 Windows 2000, Windows Server 2003, Windows Server 2008, Vista, Windows 7, Windows 8, Windows 10, and Windows 2012 systems. The Windows version of \bacula{} is a native Windows port, but there are very few source code changes to the Unix code, which means that the Windows version is for the most part running code that has long proved stable on Unix systems. When running, it is perfectly integrated with Windows. See section \vref{blb:sec:windows-supported-versions} for supported versions.
9 \smallskip
10
11 Once installed \bacula{} normally runs as a system service. This means that
12 it is immediately started by the operating system when the system is
13 booted, and runs in the background even if there is no user logged into the
14 system.
15
16 \section{Windows Supported Versions}\label{blb:sec:windows-supported-versions}
17 \index[general]{Supported Windows Versions}
18 \index[general]{Windows!Supported Versions}
19
20 It should be noted that as of 2016, the following Windows versions are no longer supported by Microsoft: Windows XP, Windows Vista, Windows 7, Windows Server 2000, and Windows Server 2003. As a consequence, these systems are no longer officially supported by \bacula{}. That said, we will make a best effort to support them, but cannot not guarantee that new \baculaenterprise{} software developed after the support expiration date of each Microsoft \acs{OS} will be supported.
21
22 \section{Windows Installation}
23 \label{blb:installation}
24 \index[general]{Installation}
25 \index[general]{Windows!Installation}
26
27 Normally, you will install the Windows version of \bacula{} from the binaries.
28 This install is standard Windows .exe that runs an install wizard using the
29 \acs{NSIS} Free Software installer, so if you have already installed Windows
30 software, it should be very familiar to you.
31
32 If you have a previous version of \bacula{} installed, you should stop the service, uninstall it, and remove the \bacula{} installation directory possibly saving your \bfilename{bacula-fd.conf}, \bfilename{bconsole.conf}, and \bfilename{bat.conf} files for use with the new version you will install. The \btool{Uninstall} program is normally found in \bfilename{c:\textbackslash{}bacula\textbackslash{}Uninstall.exe}. We also recommend that you completely remove the directory \bdirectoryname{c:\textbackslash{}bacula} because the current installer uses a different directory structure (see below).
33
34 Providing you do not already have \bacula{} installed,
35 the installer installs the binaries and dlls in
36 \bdirectoryname{c:\textbackslash{}Program Files\textbackslash{}Bacula\textbackslash{}bin}
37 and the configuration files
38 in \bdirectoryname{c:\textbackslash{}Documents and Settings\textbackslash{}All Users\textbackslash{}Application Data\textbackslash{}Bacula}
39 In addition, the \textbf{Start \textrightarrow{} All Programs \textrightarrow{} Bacula} menu item
40 will be created during the installation, and on that menu, you
41 will find items for editing the configuration files, displaying
42 the document, and starting \btool{bwx-console} or \btool{bconsole}.
43
44
45 Finally, proceed with the installation.
46
47 \begin{bitemize}
48 \item You must be logged in as Administrator to the local machine
49 to do a correct installation, if not, please do so before continuing.
50 Some users have attempted to install logged in as a domain administrator
51 account and experienced permissions problems attempting to run
52 \bacula{}, so we don't recommend that option.
53
54 \item Simply double click on the \bfilename{bacula-enterprise-win64-8.x.x.exe} \acs{NSIS} install
55 icon. The actual name of the icon will vary from one release version to
56 another.
57
58 \raisebox{-2.5ex}{\includegraphics[height=6ex]{nsis}} bacula-enterprise-win64-8.x.x.exe
59
60 \item Once launched, the installer wizard will ask you if you want to install
61 \bacula{}.
62
63 \bimageH{win32-welcome}{Windows Client Setup Wizard}{fig:win32clientsetupwizard}
64
65 \item Next you will be asked to select the installation type.
66
67 \bimageH{win32-installation-type}{Windows Installation Type}{fig:win32installationtype}
68
69 \item If you proceed, you will be asked to select the components to be
70 installed. You may install the \bacula{} program (\bacula{} File Service) and or
71 the documentation. Both will be installed in sub-directories of the install
72 location that you choose later. The components dialog looks like the
73 following:
74
75 \bimageH{win32-pkg}{Win32 Component Selection Dialog}{fig:win32componentselectiondialog}
76 \index[general]{Upgrading}
77
78 \item If you are installing for the first time, you will be asked to
79 enter some very basic information about your configuration. If
80 you are not sure what to enter, or have previously saved configuration
81 files, you can put anything you want into the fields, then either
82 replace the configuration files later with the ones saved, or edit
83 the file.
84
85 If you are upgrading an existing installation, the following will
86 not be displayed.
87
88
89 \bimageH{win32-config}{Win32 Configure}{fig:win32configure}
90
91 \item While the various files are being loaded, you will see the following
92 dialog:
93
94 \bimageH{win32-installing}{Windows Install Progress}{fig:win32installing}
95
96 \item Finally, the finish dialog will appear:
97
98 \bimageH{win32-finish}{Windows Client Setup Completed}{fig:win32setupcompleted}
99
100 \end{bitemize}
101
102 That should complete the installation process.
103
104 \section{Tray Icon}
105 \index[general]{Tray Icon}
106
107 Note: this section does not apply to all Windows versions
108 later than Windows XP, since in those later versions Microsoft
109 explicitly prohibits a system service such as \bacula{} from interacting
110 with the user.
111
112 When the \bacula{} File Server is
113 ready to serve files, an icon \raisebox{-1ex}{\includegraphics{k7-idle}} representing a
114 cassette (or tape) will appear in the system tray
115 \raisebox{-2ex}{\includegraphics{tray-icon}}; right click on it and a menu will appear.\\
116 \bimageN{menu}{Menu on right click}{fig:win32menuonrightclick}\\
117 The \textbf{Events} item is currently unimplemented, by selecting the
118 \textbf{Status} item, you can verify whether any jobs are running or not.
119
120 When the \bacula{} File Server begins saving files, the color of the holes in the
121 cassette icon will change from white to green \raisebox{-1ex}{\includegraphics{k7-ok}},
122 and if there is an error, the holes in the cassette icon will change to red
123 \raisebox{-1ex}{\includegraphics{k7-error}}.
124
125 If you are using remote desktop connections between your Windows boxes, be
126 warned that that tray icon does not always appear. It will always be visible
127 when you log into the console, but the remote desktop may not display it.
128
129 \section{Post Windows Installation}
130 \index[general]{Post Windows Installation}
131 \index[general]{Windows!Post Installation}
132
133 After installing \bacula{} and before running it, you should check the contents
134 of the configuration files to ensure that they correspond to your
135 installation. You can get to them by using:
136 the \textbf{Start \textrightarrow{} All Programs \textrightarrow{} Bacula} menu item.
137
138 Finally, but pulling up the Task Manager (\texttt{CTRL-ALT-DEL}), verify that \bacula{}
139 is running as a process (not an Application) with User Name SYSTEM. If this is
140 not the case, you probably have not installed \bacula{} while running as
141 Administrator, and hence it will be unlikely that \bacula{} can access
142 all the system files.
143
144 \section{Uninstalling \bacula{} on Windows}
145 \index[general]{Windows!Uninstalling \bacula{}}
146 \index[general]{Uninstalling \bacula{} on Windows}
147
148 Once \bacula{} has been installed, it can be uninstalled using the standard
149 Windows Add/Remove Programs dialog found on the Control panel.
150
151 \section{Dealing with Windows Problems}
152 \label{blb:problems}
153 \index[general]{Windows!Dealing with Problems}
154 \index[general]{Dealing with Windows Problems}
155
156 Sometimes Windows machines the File daemon may have very slow
157 backup transfer rates compared to other machines. To you might
158 try setting the Maximum Network Buffer Size to 32,768 in both the
159 File daemon and in the Storage daemon. The default size is larger,
160 and apparently some Windows ethernet controllers do not deal with
161 a larger network buffer size.
162 \smallskip
163
164 Many Windows ethernet drivers have a tendency to either run slowly
165 due to old broken firmware, or because they are running in half-duplex
166 mode. Please check with the ethernet card manufacturer for the latest
167 firmware and use whatever techniques are necessary to ensure that the
168 card is running in duplex.
169 \smallskip
170
171 If you are not using the portable option, and you have \acs{VSS}
172 (Volume Shadow Copy) enabled in the Director, and you experience
173 problems with \bacula{} not being able to open files, it is most
174 likely that you are running an antivirus program that blocks
175 \bacula{} from doing certain operations. In this case, disable the
176 antivirus program and try another backup. If it succeeds, either
177 get a different (better) antivirus program or use something like
178 RunClientJobBefore/After to turn off the antivirus program while
179 the backup is running.
180 \smallskip
181
182 If turning off anti-virus software does not resolve your \acs{VSS}
183 problems, you might have to turn on \acs{VSS} debugging. The following
184 link describes how to do this:
185 \bref{http://support.microsoft.com/kb/887013/en-us}{support.microsoft.com/kb/887013/en-us}.
186 \smallskip
187
188 In Microsoft Windows Small Business Server 2003 the \acs{VSS} Writer for Exchange
189 is turned off by default. To turn it on, please see the following link:
190 \bref{http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q838183}{support.microsoft.com/default.aspx?scid=kb;EN-US;Q838183}
191 \smallskip
192
193 The most likely source of problems is authentication when the Director
194 attempts to connect to the File daemon that you installed. This can occur if
195 the names and the passwords defined in the File daemon's configuration file
196 \bfilename{bacula-fd.conf} file on
197 the Windows machine do not match with the names and the passwords in the
198 Director's configuration file \bfilename{bacula-dir.conf} located on your Unix/Linux
199 server.
200 \smallskip
201
202 More specifically, the password found in the \textbf{Client} resource in the
203 Director's configuration file must be the same as the password in the
204 \textbf{Director} resource of the File daemon's configuration file. In addition, the
205 name of the \textbf{Director} resource in the File daemon's configuration file
206 must be the same as the name in the \textbf{Director} resource of the Director's
207 configuration file.
208 \smallskip
209
210 It is a bit hard to explain in words, but if you understand that a Director
211 normally has multiple Clients and a Client (or File daemon) may permit access
212 by multiple Directors, you can see that the names and the passwords on both
213 sides must match for proper authentication.
214 \smallskip
215
216 One user had serious problems with the configuration file until he realized
217 that the Unix end of line conventions were used and \bacula{} wanted them in
218 Windows format. This has not been confirmed though, and \bacula{} version 2.0.0
219 and above should now accept all end of line conventions (Windows,
220 Unix, Mac).
221 \smallskip
222
223 Running Unix like programs on Windows machines is a bit frustrating because
224 the Windows command line shell (DOS Window) is rather primitive. As a
225 consequence, it is not generally possible to see the debug information and
226 certain error messages that \bacula{} prints. With a bit of work, however, it is
227 possible. When everything else fails and you want to \textbf{see} what is going
228 on, try the following:
229
230 \begin{bVerbatim}
231 Start a DOS shell Window.
232 c:\Program Files\bacula\bacula-fd -t >out
233 type out
234 \end{bVerbatim}
235
236 The precise path to bacula-fd depends on where it is installed.
237 The \textbf{-t} option will cause \bacula{} to read the configuration file, print
238 any error messages and then exit. the \textbf{\gt{}} redirects the output to the
239 file named \bfilename{out}, which you can list with the \btool{type} command.
240
241 If something is going wrong later, or you want to run \textbf{\bacula{}} with a
242 debug option, you might try starting it as:
243
244 \begin{bVerbatim}
245 c:\Program Files\bacula\bin\bacula-fd -d 100 >out
246 \end{bVerbatim}
247
248 In this case, \bacula{} will run until you explicitly stop it, which will give
249 you a chance to connect to it from your Unix/Linux server. When you start
250 the File daemon in debug mode it can write the output to a trace file \bfilename{bacula.trace}
251 in the current directory. To enable this, before running a
252 job, use the console, and enter:
253
254 \begin{bVerbatim}
255 trace on
256 \end{bVerbatim}
257
258 then run the job, and once you have terminated the File daemon, you will find
259 the debug output in the \bfilename{bacula.trace} file, which will probably be
260 located in the same directory as \bfilename{bacula-fd.exe}.
261
262 In addition, you should look in the System Applications log on the Control
263 Panel to find any Windows errors that \bacula{} got during the startup process.
264 \smallskip
265
266 Finally, due to the above problems, when you turn on debugging, and specify
267 \bhighlight{trace=1} on a \bcommandname{setdebug} command in the Console, \bacula{} will write the debug
268 information to the file \bfilename{bacula.trace} in the directory from which \bacula{}
269 is executing.
270 \smallskip
271
272 If you are having problems with ClientRunBeforeJob scripts randomly dying,
273 it is possible that you have run into an Oracle bug. See bug number 622 in
274 the \bref{http://bugs.bacula.org}{bugs.bacula.org} database. The following information has been
275 provided by a user on this issue:
276
277 \begin{bVerbatim}
278 The information in this document applies to:
279 Oracle HTTP Server - Version: 9.0.4
280 Microsoft Windows Server 2003
281 Symptoms
282 When starting an OC4J instance, the System Clock runs faster, about 7
283 seconds per minute.
284
285 Cause
286
287 + This is caused by the Sun JVM bug 4500388, which states that "Calling
288 Thread.sleep() with a small argument affects the system clock". Although
289 this is reported as fixed in JDK 1.4.0_02, several reports contradict this
290 (see the bug in
291 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4500388).
292
293 + Also reported by Microsoft as "The system clock may run fast when you
294 use the ACPI power management timer as a high-resolution counter on Windows
295 2000-based computers" (See http://support.microsoft.com/?id=821893)
296 \end{bVerbatim}
297
298 You may wish to start the daemon with debug mode on rather than doing it
299 using bconsole. To do so, edit the following registry key:
300
301 \begin{bVerbatim}
302 HKEY_LOCAL_MACHINE\HARDWARE\SYSTEM\CurrentControlSet\Services\Bacula-dir
303 \end{bVerbatim}
304
305 using regedit, then add \bhighlight{-dnn} after the /service option, where nn represents
306 the debug level you want.
307
308 \label{blb:Compatibility}
309 \section{Windows Compatibility Considerations}
310 \index[general]{Windows Compatibility Considerations}
311 \index[general]{Considerations!Windows Compatibility}
312
313 If you are not using the \acs{VSS} (Volume Shadow Copy) option described in the
314 next section of this chapter, and if any applications are running during
315 the backup and they have files opened exclusively, \bacula{} will not be able
316 to backup those files, so be sure you close your applications (or tell your
317 users to close their applications) before the backup. Fortunately, most
318 Microsoft applications do not open files exclusively so that they can be
319 backed up. However, you will need to experiment. In any case, if \bacula{}
320 cannot open the file, it will print an error message, so you will always
321 know which files were not backed up. See the section below on Volume
322 Shadow Copy Service that permits backing up any file.
323
324 During backup, \bacula{} doesn't know about the system registry, so you will
325 either need to write it out to an \acs{ASCII} file using \textbf{regedit~~/e} or use
326 a program specifically designed to make a copy or backup the registry.
327
328 \bacula{} uses Windows backup \acs{API} calls by default. Typical of Windows,
329 programming these special BackupRead and BackupWrite calls is a real
330 nightmare of complications. The end result gives some distinct advantages
331 and some disadvantages.
332
333 First, the advantages are that Windows systems, the security and
334 ownership information is now backed up. In addition, with the exception of
335 files in exclusive use by another program, \bacula{} can now access all system
336 files. This means that when you restore files, the security and ownership
337 information will be restored on Windows along with the data.
338
339 The disadvantage of the Windows backup \acs{API} calls is that it produces
340 non-portable backups. That is files and their data that are backed up on
341 Windows using the native \acs{API} calls (BackupRead/BackupWrite) cannot be
342 directly restored on Linux or Unix systems. \bacula{} should be able to read
343 non-portable backups on any system and restore the data appropriately.
344 However, on a system that does not have the BackupRead/BackupWrite calls
345 (older Windows versions and all Unix/Linux machines), though the file data
346 can be restored, the Windows security and access control data will not be
347 restored. This means that a standard set of access permissions will be set
348 for such restored files.
349
350
351 As a default, \bacula{} backs up Windows systems using the Windows \acs{API} calls.
352 If you want to backup data on a Windows system and restore it on a
353 Unix or Linux system, we have provided a special \textbf{portable} option
354 that backs up the data in a portable fashion by using portable \acs{API} calls.
355 See the \bilink{portable option}{blb:portable} on the Include statement in a
356 FileSet resource in the Director's configuration chapter for the details on
357 setting this option. However, using the portable option means you may have
358 permissions problems accessing files, and none of the security and
359 ownership information will be backed up or restored. The file data can,
360 however, be restored on any system.
361
362 You should always be able to restore any file backed up on Unix or
363 Win95/98/Me to any other system. On some older Windows systems, you may
364 have to reset the ownership of such restored files.
365
366 Finally, if you specify the \textbf{portable=yes} option on the files you back
367 up. \bacula{} will be able to restore them on any other system. However, any
368 Windows specific security and ownership information will be lost.
369
370 The following matrix will give you an idea of what you can expect. Thanks to
371 Marc Brueckner for doing the tests:
372
373 \LTXtable{\linewidth}{t-main-restore-portability-status}
374
375 Note: Non-portable Windows data can be restore to any machine. In
376 addition, with recent \bacula{} versions, \bacula{} is able to extract data
377 part from Windows backup streams when restoring on a non-Windows
378 machine.
379
380 \label{blb:VSS}
381 \section{Volume Shadow Copy Service}
382 \index[general]{Volume Shadow Copy Service}
383 \index[general]{VSS}
384 Microsoft added \acs{VSS} to Windows XP and Windows 2003. From the perspective of
385 a backup-solution for Windows, this is an extremely important step. \acs{VSS}
386 allows \bacula{} to backup open files and even to interact with applications like
387 RDBMS to produce consistent file copies. \acs{VSS} aware applications are called
388 \acs{VSS} Writers, they register with the OS so that when \bacula{} wants to do a
389 Snapshot, the OS will notify the register Writer programs, which may then
390 create a consistent state in their application, which will be backed up.
391 Examples for these writers are ``\acs{MSDE}'' (\acl{MSDE}),
392 ``Event Log Writer'', ``Registry Writer'' plus 3rd
393 party-writers. If you have a non-vss aware application (e.g.
394 SQL Anywhere or probably MySQL), a shadow copy is still generated
395 and the open files can be backed up, but there is no guarantee
396 that the file is consistent.
397
398 \bacula{} produces a message from each of the registered writer programs
399 when it is doing a \acs{VSS} backup so you know which ones are correctly backed
400 up.
401
402 Technically \bacula{} creates a shadow copy as soon as the backup process
403 starts. It does then backup all files from the shadow copy and destroys the
404 shadow copy after the backup process. Please have in mind, that \acs{VSS}
405 creates a snapshot and thus backs up the system at the state it had
406 when starting the backup. It will disregard file changes which occur during
407 the backup process.
408
409 \acs{VSS} can be turned on by placing an
410
411 \index[dir]{Enable VSS}
412 \index[general]{Enable VSS}
413
414 \begin{bVerbatim}
415 Enable VSS = yes
416 \end{bVerbatim}
417
418 in your FileSet resource.
419
420 The \acs{VSS} aware File daemon has the letters \acs{VSS} on the signon line that
421 it produces when contacted by the console. For example:
422
423 \begin{bVerbatim}
424 Tibs-fd Version: 1.37.32 (22 July 2005) VSS Windows XP MVS NT 5.1.2600
425 \end{bVerbatim}
426
427 the \acs{VSS} is shown in the line above. This only means that the File daemon
428 is capable of doing \acs{VSS} not that \acs{VSS} is turned on for a particular backup.
429 There are two ways of telling if \acs{VSS} is actually turned on during a backup.
430 The first is to look at the status output for a job, e.g.:
431
432 \begin{bVerbatim}
433 Running Jobs:
434 JobId 1 Job NightlySave.2005-07-23_13.25.45 is running.
435 VSS Backup Job started: 23-Jul-05 13:25
436 Files=70,113 Bytes=3,987,180,650 Bytes/sec=3,244,247
437 Files Examined=75,021
438 Processing file: c:/Documents and Settings/kern/My Documents/My Pictures/Misc1/Sans titre - 39.pdd
439 SDReadSeqNo=5 fd=352
440 \end{bVerbatim}
441
442 Here, you see under Running Jobs that JobId 1 is ``VSS Backup Job started \ldots{}''
443 This means that \acs{VSS} is enabled for that job. If \acs{VSS} is not enabled, it will
444 simply show ``Backup Job started \ldots{}'' without the letters \acs{VSS}.
445
446 The second way to know that the job was backed up with \acs{VSS} is to look at the
447 Job Report, which will look something like the following:
448
449 \begin{bVerbatim}
450 23-Jul 13:25 rufus-dir: Start Backup JobId 1, Job=NightlySave.2005-07-23_13.25.45
451 23-Jul 13:26 rufus-sd: Wrote label to prelabeled Volume "TestVolume001" on device "DDS-4" (/dev/nst0)
452 23-Jul 13:26 rufus-sd: Spooling data ...
453 23-Jul 13:26 Tibs: Generate VSS snapshots. Driver="VSS WinXP", Drive(s)="C"
454 23-Jul 13:26 Tibs: VSS Writer: "MSDEWriter", State: 1 (VSS_WS_STABLE)
455 23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Bootable State)", State: 1 (VSS_WS_STABLE)
456 23-Jul 13:26 Tibs: VSS Writer: "WMI Writer", State: 1 (VSS_WS_STABLE)
457 23-Jul 13:26 Tibs: VSS Writer: "Microsoft Writer (Service State)", State: 1 (VSS_WS_STABLE)
458 \end{bVerbatim}
459
460 In the above Job Report listing, you see that the \acs{VSS} snapshot was generated for drive C (if
461 other drives are backed up, they will be listed on the \textbf{Drive(s)="C"} You also see the
462 reports from each of the writer program. Here they all report VSS\_WS\_STABLE, which means
463 that you will get a consistent snapshot of the data handled by that writer.
464
465 \section{\acs{VSS} Problems}
466 \index[general]{Problems!VSS}
467 \index[fd]{Problems!VSS}
468 \index[general]{VSS Problems}
469 \index[fd]{VSS Problems}
470
471 If you are experiencing problems such as \acs{VSS} hanging on \acs{MSDE}, first try
472 running \btool{vssadmin} to check for problems, then try running \btool{ntbackup}
473 which also uses \acs{VSS} to see if it has similar problems. If so, you
474 know that the problem is in your Windows machine and not with \bacula{}.
475
476 The \acs{FD} hang problems were reported with \textbf{MSDEwriter} when:
477 \begin{bitemize}
478 \item a local firewall locked local access to the \acs{MSDE} \acs{TCP} port (MSDEwriter
479 seems to use \acs{TCP}/\acs{IP} and not Named Pipes).
480 \item \btool{msdtcs} was installed to run under ``localsystem'': try running \btool{msdtcs}
481 under networking account (instead of local system) (com+ seems to work
482 better with this configuration).
483 \end{bitemize}
484
485
486 \section{Windows Firewalls}
487 \index[general]{Firewalls!Windows}
488 \index[general]{Windows Firewalls}
489
490 If you turn on the firewalling feature on Windows (default in WinXP SP2),
491 you are likely to find that the \bacula{} ports are blocked and you cannot
492 communicate to the other daemons. This can be deactivated through the
493 \textbf{Security Notification} dialog, which is apparently somewhere in the
494 \textbf{Security Center}. I don't have this on my computer, so I cannot give the
495 exact details.
496
497 The command:
498
499 \begin{bVerbatim}
500 netsh firewall set opmode disable
501 \end{bVerbatim}
502
503 is purported to disable the firewall, but this command is not accepted on my
504 WinXP Home machine.
505
506 \section{Windows Port Usage}
507 \index[general]{Windows Port Usage}
508 \index[general]{Usage!Windows Port}
509
510 If you want to see if the File daemon has properly opened the port and is
511 listening, you can enter the following command in a shell window:
512
513 \begin{bVerbatim}
514 netstat -an | findstr 910[123]
515 \end{bVerbatim}
516
517 \btool{TopView} is another program that has been recommend, but it is not a
518 standard Windows program, so you must find and download it from the Internet.
519
520 \section{Windows Disaster Recovery}
521 \index[general]{Recovery!Windows Disaster}
522 \index[general]{Windows Disaster Recovery}
523
524 \bacula{} Systems provides a special Win\acs{BMR} (Windows Bare Metal Recovery)
525 program that allows you to perform a bare metal disaster recovery
526 of your system.
527
528 If you do not have the Win\acs{BMR} program, we do not have a good solution for
529 disaster recovery on Windows. The main piece lacking, which is available
530 in the \bacula{} Enterprise Win\acs{BMR}, is a Windows boot floppy or a Windows boot
531 \acs{CD}. Microsoft releases a Windows Pre-installation Environment (\textbf{WinPE})
532 that could possibly work, but we have not investigated it. This means that
533 until someone figures out the correct procedure, you must restore the \acs{OS}
534 from the installation disks, then you can load a \bacula{} client and restore
535 files. Please don't count on using \btool{bextract} to extract files from
536 your backup tapes during a disaster recovery unless you have backed up
537 those files using the \textbf{portable} option. \btool{bextract} does not run
538 on Windows, and the normal way \bacula{} saves files using the Windows \acs{API}
539 prevents the files from being restored on a Unix machine. Once you have an
540 operational Windows \acs{OS} loaded, you can run the File daemon and restore your
541 user files.
542
543 \section{Windows FD Restrictions}
544 \index[general]{Windows FD Restrictions}
545 In recent versions of Windows, Microsoft has implemented
546 Volume Mount Points, Encrypted Volumes, and Deduplicated Volumes.
547 Current versions of the Windows File daemon support Volume Mount
548 Points much like on Linux systems. That is you must explicitly
549 add a \bhighlight{File=} line in your FileSet so that it will decend into the
550 mount point. In addition, during the restore of a mount point, the
551 mount point must already be defined.
552
553 Current \bacula{} File daemons do not support Encrypted Volumes
554 or Deduplicated Volumes.
555
556
557 \section{Windows Restore Problems}
558 \index[general]{Problems!Windows Restore}
559 \index[general]{Windows Restore Problems}
560 Please see the
561 \bilink{Restore Chapter}{blb:Windows} of this manual for problems
562 that you might encounter doing a restore.
563
564 section{Windows Backup Problems}
565 \index[general]{Problems!Windows Backup}
566 \index[general]{Windows Backup Problems}
567 If during a Backup, you get the message:
568 \textbf{ERR=Access is denied} and you are using the portable option,
569 you should try both adding both the non-portable (backup \acs{API}) and
570 the Volume Shadow Copy options to your Director's conf file.
571
572 In the Options resource:
573 \begin{bVerbatim}
574 portable = no
575 \end{bVerbatim}
576
577 In the FileSet resource:
578 \begin{bVerbatim}
579 EnableVSS = yes
580 \end{bVerbatim}
581
582 In general, specifying these two options should allow you to backup
583 any file on a Windows system. However, in some cases, if users
584 have allowed to have full control of their folders, even system programs
585 such a \bacula{} can be locked out. In this case, you must identify
586 which folders or files are creating the problem and do the following:
587
588 \begin{benumerate}
589 \item Grant ownership of the file/folder to the Administrators group,
590 with the option to replace the owner on all child objects.
591 \item Grant full control permissions to the Administrators group,
592 and change the user's group to only have Modify permission to
593 the file/folder and all child objects.
594 \end{benumerate}
595
596 Thanks to Georger Araujo for the above information.
597
598 \section{Windows Ownership and Permissions Problems}
599 \index[general]{Problems!Windows Ownership and Permissions}
600 \index[general]{Windows Ownership and Permissions Problems}
601
602 If you restore files backed up from Windows to an alternate directory,
603 \bacula{} may need to create some higher level directories that were not saved
604 (or restored). In this case, the File daemon will create them under the
605 SYSTEM account because that is the account that \bacula{} runs under as a
606 service. As of version 1.32f-3, \bacula{} creates these files with full
607 access permission. However, there may be cases where you have problems
608 accessing those files even if you run as administrator. In principle,
609 Microsoft supplies you with the way to cease the ownership of those files
610 and thus change the permissions. However, a much better solution to
611 working with and changing Windows permissions is the program \btool{SetACL},
612 which can be found at
613 \bref{http://setacl.sourceforge.net/}{setacl.sourceforge.net}.
614
615 If you have not installed \bacula{} while running as Administrator
616 and if \bacula{} is not running as a Process with the userid (User Name) SYSTEM,
617 then it is very unlikely that it will have sufficient permission to
618 access all your files.
619
620 Some users have experienced problems restoring files that participate in
621 the Active Directory. They also report that changing the userid under which
622 \bacula{} (\btool{bacula-fd.exe}) runs, from SYSTEM to a Domain Admin userid, resolves
623 the problem.
624
625
626 \section{Manually resetting the Permissions}
627 \index[general]{Manually resetting the Permissions}
628 \index[general]{Permissions!Manually resetting the}
629
630 The following solution was provided by Dan Langille \bbracket{dan at langille in the dot org domain}.
631 The steps are performed using Windows 2000 Server but
632 they should apply to most Windows platforms. The procedure outlines how to deal
633 with a problem which arises when a restore creates a top-level new directory.
634 In this example, ``top-level'' means something like \bdirectoryname{c:\textbackslash{}src},
635 not \bdirectoryname{c:\textbackslash{}tmp\textbackslash{}src}
636 where \bdirectoryname{c:\textbackslash{}tmp} already exists. If a restore job specifies \bdirectoryname{/}
637 as the \textbf{Where:} value, this problem will arise.
638
639 The problem appears as a directory which cannot be browsed with Windows
640 Explorer. The symptoms include the following message when you try to click on
641 that directory:
642
643 \bimageN[0.35\linewidth]{access-is-denied}{Popup on permission issue}{fig:accessdenied}
644
645 If you encounter this message, the following steps will change the permissions
646 to allow full access.
647
648 \begin{benumerate}
649 \item right click on the top level directory (in this example, \bdirectoryname{c:/src})
650 and select \textbf{Properties}.
651 \item click on the Security tab.
652 \item If the following message appears, you can ignore it, and click on \textbf{OK}.
653
654 \bimageH{view-only}{Message to ignore}{fig:messagetoignore}
655
656 You should see something like this:
657
658 \bimageH{properties-security}{Properties security}{fig:propertiessecurity}
659 \item click on Advanced
660 \item click on the Owner tab
661 \item Change the owner to something other than the current owner (which is
662 \textbf{SYSTEM} in this example as shown below).
663
664 \bimageH{properties-security-advanced-owner}{Properties security advanced owner}{fig:propertiessecurityadvancedowner}
665 \item ensure the ``Replace owner on subcontainers and objects'' box is
666 checked
667 \item click on OK
668 \item When the message ``You do not have permission to read the contents of
669 directory \bdirectoryname{c:\textbackslash{}src} basis. Do you wish to replace
670 the directory permissions with permissions granting you Full Control?'', click
671 on Yes.
672
673 \bimageH{confirm}{Confirm granting permissions}{fig:confirmgrantingpermissions}
674 \item Click on OK to close the Properties tab
675 \end{benumerate}
676
677 With the above procedure, you should now have full control over your restored
678 directory.
679
680 In addition to the above methods of changing permissions, there is a Microsoft
681 program named \btool{cacls} that can perform similar functions.
682
683 \section{Backing Up the WinNT/XP/2K System State}
684 \index[general]{State!Backing Up the WinNT/XP/2K System}
685 \index[general]{Backing Up the WinNT/XP/2K System State}
686
687 Note, most of this section applies to the older Windows OSes that
688 do not have \acs{VSS}. On newer Windows OSes that have \acs{VSS}, all files
689 including the System State will by default be properly backed
690 up by \bacula{}. In addition, if you want special Backup of the
691 System State (rather than just backup of everything) or backup
692 of MSSQL or MS Exchange, you should consider the \bacula{} Systems
693 \acs{VSS} plugin (not to be confused with enabling \acs{VSS} snapshots in the
694 FileSet). The \acs{VSS} plugin has explicit knowledge that allow
695 you to make special backups of Microsoft System components that
696 have \acs{VSS} writers. \bacula{} Systems provides specific white papers
697 on the components that are available for the \acs{VSS} plugin.
698
699 If you want to do this on your own, a suggestion by Damian Coutts using
700 Microsoft's NTBackup utility in conjunction with \bacula{} should permit a
701 full restore of any damaged system files on Win2K/XP. His suggestion is to
702 do an NTBackup of the critical system state prior to running a \bacula{}
703 backup with the following command:
704
705 \begin{bVerbatim}
706 ntbackup backup systemstate /F c:\systemstate.bkf
707 \end{bVerbatim}
708
709 The \textbf{backup} is the command, the \textbf{systemstate} says to backup only
710 the system state and not all the user files, and the
711 \textbf{/F c:\textbackslash{}systemstate.bkf} specifies where to write the state file.
712 this file must then be saved and restored by \bacula{}.
713
714 To restore the system state, you first reload a base operating system if
715 the \acs{OS} is damaged, otherwise, this is not necessary, then you would use
716 \bacula{} to restore all the damaged or lost user's files and to recover the
717 \bfilename{c:\textbackslash{}systemstate.bkf} file. Finally if there are any
718 damaged or missing system files or registry problems, you run \btool{NTBackup}
719 and \textbf{catalogue} the system statefile, and then select it for
720 restore. The documentation says you can't run a command line restore of
721 the systemstate.
722
723 To the best of my knowledge, this has not yet been tested. If you test it,
724 please report your results to the \bacula{} email list.
725
726 Note, \bacula{} uses \acs{VSS} to backup and restore open files and
727 system files, but on older Windows machines such as WinNT and
728 Win2000, \acs{VSS} is not implemented by Microsoft so that you must
729 use some special techniques to back them up as described
730 above. On new Windows machines, \bacula{} will backup and restore
731 all files including the system state providing you have
732 \acs{VSS} enabled in your \bacula{} FileSet (default).
733
734 \section{Fixing the Windows Boot Record}
735 \index[general]{Fixing the Windows Boot Record}
736 \index[general]{Windows!Fixing the Boot Record}
737 A tip from a user:
738 An effective way to restore a Windows backup for
739 those who do not purchase the bare metal restore
740 capability is to install Windows on a different
741 hard drive and restore the backup. Then run the
742 recovery \acs{CD} and run
743
744 \begin{bVerbatim}
745 diskpart
746 select disk 0
747 select part 1
748 active
749 exit
750
751 bootrec /rebuldbcd
752 bootrec /fixboot
753 bootrec /fixmbr
754 \end{bVerbatim}
755
756
757 \section{Considerations for Filename Specifications}
758 \index[general]{Windows!Considerations for Filename Specifications}
759
760 Please see the \bilink{Director's Configuration chapter}{blb:win32} of this
761 manual for important considerations on how to specify Windows paths in
762 \bacula{} FileSet Include and Exclude directives.
763
764 \index[general]{Unicode}
765 The Window \bacula{} File daemon as well as
766 \btool{bconsole} and \btool{bwx-console} support Windows
767 Unicode filenames. There may still be some problems with multiple byte
768 characters (e.g. Chinese, \ldots{}) where it is a two byte character but the
769 displayed character is not two characters wide.
770
771 \index[general]{Windows Path Length Restriction}
772 Path/filenames longer than 260 characters (up to 32,000) are supported.
773
774 \section{Windows Specific File daemon Command Line}
775 \index[general]{Client!Windows Specific File daemon Command Line Options}
776 \index[general]{Windows Specific File daemon Command Line Options}
777
778 These options are not normally seen or used by the user, and are documented
779 here only for information purposes. At the current time, to change the default
780 options, you must either manually run \textbf{\bacula{}} or you must manually edit
781 the system registry and modify the appropriate entries.
782
783 In order to avoid option clashes between the options necessary for
784 \textbf{\bacula{}} to run on Windows and the standard \bacula{} options, all Windows
785 specific options are signaled with a forward slash character (/), while as
786 usual, the standard \bacula{} options are signaled with a minus (\texttt{-}), or a minus
787 minus (\texttt{{-}{-}}). All the standard \bacula{} options can be used on the Windows
788 version. In addition, the following Windows only options are implemented:
789
790 \begin{bdescription}
791
792 \item [/service ]
793 \index[fd]{/service}
794 Start \bacula{} as a service
795
796 \item [/run ]
797 \index[fd]{/run}
798 Run the \bacula{} application
799
800 \item [/install ]
801 \index[fd]{/install}
802 Install \bacula{} as a service in the system registry
803
804 \item [/remove ]
805 \index[fd]{/remove}
806 Uninstall \bacula{} from the system registry
807
808 \item [/about ]
809 \index[fd]{/about}
810 Show the \bacula{} about dialogue box
811
812 \item [/status ]
813 \index[fd]{/status}
814 Show the \bacula{} status dialogue box
815
816 \item [/events ]
817 \index[fd]{/events}
818 Show the \bacula{} events dialogue box (not yet implemented)
819
820 \item [/kill ]
821 \index[fd]{/kill}
822 Stop any running \textbf{\bacula{}}
823
824 \item [/help ]
825 \index[fd]{/help}
826 Show the \bacula{} help dialogue box
827 \end{bdescription}
828
829 It is important to note that under normal circumstances the user should never
830 need to use these options as they are normally handled by the system
831 automatically once \bacula{} is installed. However, you may note these options in
832 some of the \bfilename{.bat} files that have been created for your use.
833
834 \section{Shutting down Windows Systems}
835 \index[general]{Shutting down Windows Systems}
836 \index[general]{Systems!Shutting down Windows}
837
838 Some users like to shutdown their Windows machines after a backup using a
839 Client Run After Job directive. If you want to do something similar, you might
840 take the shutdown program from the
841 \bfootref{http://www.apcupsd.com}{apcupsd project} or one from the
842 \bfootref{http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx}{Sysinternals project}.