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