Imported Upstream version 2.5.2p1
[debian/amanda] / docs / howto-cygwin.txt
1
2 Chapter 12. Amanda on Cygwin HOWTO
3 Prev  Part III. HOWTOs        Next
4
5 -------------------------------------------------------------------------------
6
7 Chapter 12. Amanda on Cygwin HOWTO
8
9
10 Doug Kingston
11
12 Original text<dpk@randomnotes.org>
13
14 Stefan G. Weichinger
15
16 XML-conversion
17 AMANDA Core Team
18 <sgw@amanda.org>
19 Table of Contents
20
21
22   Install_Cygwin
23
24   Other_Preparation
25
26   Compile_Amanda
27
28   Configure_Cygwin_files
29
30   Configure_Windows_System_Files
31
32   Configure_inetd_to_run_automatically_as_a_service
33
34   Windows_98/ME
35
36   Windows_NT/2000/XP
37
38   Notes_on_Amanda_backup_options
39
40
41         Compression
42
43         Exclude_Lists
44
45         Debugging_Files
46
47
48 by Doug Kingston, 30 January 2003. Based on Cygwin 1.3.18, and Amanda 2.4.3-
49 20021027 and some fixes which will be in the official release by the time you
50 see this.
51 With thanks to Enrico Bernardini from whom I have borrowed some material from
52 an earlier attempt at documenting the installation of Amanda on Cygwin in 2001.
53 Please send annotations and corrections to mailto://amanda-hackers@amanda.org.
54 I can be reached as dpk (at) randomnotes.org (do the obvious).
55
56  Install Cygwin
57
58 The following Cygwin packages are required for binary installation (may be
59 incomplete):
60
61 * Category BASE: standard
62 * Category MISC: gzip
63 * Category MISC: tar
64 * Category NET: inetutils
65
66 You need also these packages to build from source (may be incomplete):
67
68 * Category DEVELOP: ALL
69 * Category INTERPRETERS: m4, gawk ?
70 * Category LIBS:default selection? (libc, libiconv, others?)
71
72 I have most or the basic utilities and libraries installed so I cannot give you
73 a more specific list of what is required. If someone has a more definitive
74 list, I would appreciate and email to mailto://amanda-hackers@amanda.org.
75 One user reported some problems with access rights when running under Cygwin,
76 which he solved by setting the CYGWIN environment variable to nontsec. I do not
77 believe this is necessary if you run the Amanda daemon as System (see below).
78
79  Other Preparation
80
81 When doing backups on a NT, Windows 2000 or Windows XP system, the choice of
82 user and group will be important if you are to properly interact with the
83 security mechanisms of these more modern Microsoft product. For Windows 95/98/
84 ME this is probably a non-issue. The most privileged account on the Windows
85 systems is 'System', and I have chosen to use this account for Amanda backups
86 to ensure that I can access the widest set of files. On Unix we would run as
87 root, with equivalent access permissions. I have also chose to run under the
88 'Administrators' group, another standard Windows group. Ensure these exist
89 before you continue - or identify another account to use. The Cygwin
90 installation postinstall script should have already populated /etc/passwd and
91 etc/group with these entries.
92
93 * Make sure that System (or SYSTEM) has a home directory specified in /etc/
94   passwd.
95
96 I used _/home/root_. You'll need to put the file .amandahosts here later. The
97 relevant lines from my file /etc/passwd are:
98
99   SYSTEM:*:18:18:,S-1-5-18:/home/root:
100   root:*:18:18:,S-1-5-18:/home/root:
101
102
103  Compile Amanda
104
105 After installing Cygwin, unpack the Amanda sources, typically in /usr/src/
106 Amanda or something similar. In the Amanda directory, you will need to execute:
107
108   automake  # this may not be necessary in the official release
109   autoconf  # this may not be necessary in the official release
110
111   ./configure --without-server \
112     --without-force-uid \
113     --with-user=yourlogin \
114     --with-group=Administrators
115   make
116   make       # yes, I needed to run it a second time
117   make install
118
119 The use of your own login instead of SYSTEM requires some explanation. If you
120 were to call runconfigure with SYSTEM instead of your own login id as part of
121 the -with-user parameter, the installation process will fail due to the way
122 Cygwin and the NT/W2K/XP security system interact. Once you chown a file to
123 another user (like SYSTEM) you are no longer able to chgrp or chmod the file.
124 The installation process will abort at this point. By installing the files
125 owned by yourself, you will be able to chgrp and chmod them as expected. Note
126 that you still RUN as SYSTEM from /etc/inetd.conf (see below).
127
128  Configure Cygwin files
129
130 You have to modify some config files:
131
132 * /etc/inetd.conf: cleanup un-needed entries: Comment out any entries you do
133   not need by placing a '#' at the start of the lines. This is just good
134   practice, and if any of the entries reference non- existent users (e.g. uucp)
135   inetd may not start up.
136
137
138 * /etc/inetd.conf: add
139
140                amanda dgram udp wait System /usr/local/libexec/amandad amandad
141
142   ATTENTION: Use tabs, don't use spaces.
143
144
145 * create _/home/root/.amandahosts_ (or whereever System's home directory is):
146   <amanda server> <amanda user>
147
148 Then create the following Amanda directories and the file amandates:
149
150        mkdir -p /usr/local/var/amanda/gnutar-lists
151
152        mkdir /tmp/amanda
153
154        touch /etc/amandates
155
156
157  Configure Windows System Files
158
159 Update the Windows services list
160
161 * WINDIR\Services: add
162
163                amanda   10080/udp       # Amanda backup services
164                amandaidx        10082/tcp       # Amanda backup services
165                amidxtape        10083/tcp       # Amanda backup services
166
167
168 where WINDIR is C:\WINNT\system32\drivers\etc or something similar. The last
169 two lines are needed if you want to use amrecover.
170 Ensure that the default Windows PATH environment variable include your Cygwin /
171 bin directory. This is necessary since inetd and hence the amandad that it
172 spawns will not have the advantage of being started by the standard bash shell
173 startup script and won't find the needed dynamic libraries (e.g. cygwin1.dll).
174 My PATH is:
175
176   _%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin_
177
178 This is on XP; My Computer, right click Properties, click on Environment
179 Variables (at the bottom). Yours may vary, but make sure the Cygwin bin
180 directory is represented somewhere in the PATH.
181
182  Configure inetd to run automatically as a service
183
184 If you want to test your installation, you can call inetd from bash prompt:
185
186   /usr/sbin/inetd -d
187
188
189  Windows 98/ME
190
191
192 * To start after the user logs in: Create a shortcut to c:
193   \cygwin\usr\sbin\inetd.exe in WINDIR\start menu\programs\startup
194
195
196 * To start before the user logs in: Add the string key
197
198     CygwinInetd=C:\cygwin\usr\sbin\inetd.exe
199
200   under
201
202     HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
203
204   in the registry. You'll see a dos-like window on the startup: I did not find
205   a solution to iconize or to make invisible (suggestions are welcome).
206
207
208  Windows NT/2000/XP
209
210 From bash prompt, type:
211
212   /usr/sbin/inetd --install-as-service
213
214 Then, to start/stop the inetd service use the Services control panel or the
215 following Windows command:
216 net start/stop inetd
217
218  Notes on Amanda backup options
219
220
221  Compression
222
223 Currently, client side compression does not work, probably due to problems in
224 pipe emulation in Cygwin. I have not tried to debug this yet. This may be
225 addressed in a subsequent release, or it could be fixed in later releases of
226 Cygwin. Due to this issue, we recommend that if you want compressed dumps from
227 Windows clients, you configure Amanda for server compression in amanda.conf on
228 your Amanda server:
229
230   define dumptype srv-comp-tar {
231       global
232       comment "partitions dumped via tar with server compression"
233       program "GNUTAR"
234       compress server fast
235       exclude list ".Amanda.exclude"
236   }
237
238
239  Exclude Lists
240
241 A note on exclude lists is also in order. If you specify a relative path, it
242 will be expected that the file is in or relative to the root of the directory
243 you are planning to dump. Typically this will not be '/' but '/cygdrive/c' or
244 something similar if you want to get the Windows files and the Cygwin files. '/
245 ' is taken to be the root of the Cygwin tree, normally something like C:
246 \cygwin or possibly C:\Program Files\cygwin.
247
248  Debugging Files
249
250 Amanda will leave debugging files in /tmp/amanda if it exists. I have
251 recommended to create this directory above.
252
253 Note
254
255 Refer to http://www.amanda.org/docs/howto-cygwin.html for the current version
256 of this document.
257 -------------------------------------------------------------------------------
258
259 Prev               Up                                            Next
260 Part III. HOWTOs  Home  Chapter 13. How to use the Amanda file-driver
261