2 Chapter 12. AMANDA on Cygwin HOWTO
3 Prev Part III. HOWTOs Next
5 -------------------------------------------------------------------------------
7 Chapter 12. AMANDA on Cygwin HOWTO
12 Original text<dpk@randomnotes.org>
28 Configure_Cygwin_files
30 Configure_Windows_System_Files
32 Configure_inetd_to_run_automatically_as_a_service
38 Notes_on_AMANDA_backup_options
51 Refer to http://www.amanda.org/docs/howto-cygwin.html for the current version
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
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).
63 The following Cygwin packages are required for binary installation (may be
66 * Category BASE: standard
69 * Category NET: inetutils
71 You need also these packages to build from source (may be incomplete):
73 * Category DEVELOP: ALL
74 * Category INTERPRETERS: m4, gawk ?
75 * Category LIBS:default selection? (libc, libiconv, others?)
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).
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.
98 * Make sure that System (or SYSTEM) has a home directory specified in /etc/
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:
104 SYSTEM:*:18:18:,S-1-5-18:/home/root:
105 root:*:18:18:,S-1-5-18:/home/root:
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:
113 automake # this may not be necessary in the official release
114 autoconf # this may not be necessary in the official release
116 ./configure --without-server \
117 --without-force-uid \
118 --with-user=yourlogin \
119 --with-group=Administrators
121 make # yes, I needed to run it a second time
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).
133 Configure Cygwin files
135 You have to modify some config files:
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.
143 * /etc/inetd.conf: add
145 amanda dgram udp wait System /usr/local/libexec/amandad amandad
147 ATTENTION: Use tabs, don't use spaces.
150 * create _/home/root/.amandahosts_ (or whereever System's home directory is):
151 <amanda server> <amanda user>
153 Then create the following AMANDA directories and the file amandates:
155 mkdir -p /usr/local/var/amanda/gnutar-lists
162 Configure Windows System Files
164 Update the Windows services list
166 * WINDIR\Services: add
168 amanda 10080/udp # AMANDA backup services
169 amandaidx 10082/tcp # AMANDA backup services
170 amidxtape 10083/tcp # AMANDA backup services
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).
181 _%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin_
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.
187 Configure inetd to run automatically as a service
189 If you want to test your installation, you can call inetd from bash prompt:
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
201 * To start before the user logs in: Add the string key
203 CygwinInetd=C:\cygwin\usr\sbin\inetd.exe
207 HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
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).
215 From bash prompt, type:
217 /usr/sbin/inetd --install-as-service
219 Then, to start/stop the inetd service use the Services control panel or the
220 following Windows command:
223 Notes on AMANDA backup options
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
235 define dumptype srv-comp-tar {
237 comment "partitions dumped via tar with server compression"
240 exclude list ".AMANDA.exclude"
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.
255 AMANDA will leave debugging files in /tmp/amanda if it exists. I have
256 recommended to create this directory above.
257 -------------------------------------------------------------------------------
260 Part III. HOWTOs Home Chapter 13. How to use the AMANDA file-driver