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
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
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).
58 The following Cygwin packages are required for binary installation (may be
61 * Category BASE: standard
64 * Category NET: inetutils
66 You need also these packages to build from source (may be incomplete):
68 * Category DEVELOP: ALL
69 * Category INTERPRETERS: m4, gawk ?
70 * Category LIBS:default selection? (libc, libiconv, others?)
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).
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.
93 * Make sure that System (or SYSTEM) has a home directory specified in /etc/
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:
99 SYSTEM:*:18:18:,S-1-5-18:/home/root:
100 root:*:18:18:,S-1-5-18:/home/root:
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:
108 automake # this may not be necessary in the official release
109 autoconf # this may not be necessary in the official release
111 ./configure --without-server \
112 --without-force-uid \
113 --with-user=yourlogin \
114 --with-group=Administrators
116 make # yes, I needed to run it a second time
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).
128 Configure Cygwin files
130 You have to modify some config files:
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.
138 * /etc/inetd.conf: add
140 amanda dgram udp wait System /usr/local/libexec/amandad amandad
142 ATTENTION: Use tabs, don't use spaces.
145 * create _/home/root/.amandahosts_ (or whereever System's home directory is):
146 <amanda server> <amanda user>
148 Then create the following Amanda directories and the file amandates:
150 mkdir -p /usr/local/var/amanda/gnutar-lists
157 Configure Windows System Files
159 Update the Windows services list
161 * WINDIR\Services: add
163 amanda 10080/udp # Amanda backup services
164 amandaidx 10082/tcp # Amanda backup services
165 amidxtape 10083/tcp # Amanda backup services
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).
176 _%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin_
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.
182 Configure inetd to run automatically as a service
184 If you want to test your installation, you can call inetd from bash prompt:
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
196 * To start before the user logs in: Add the string key
198 CygwinInetd=C:\cygwin\usr\sbin\inetd.exe
202 HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
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).
210 From bash prompt, type:
212 /usr/sbin/inetd --install-as-service
214 Then, to start/stop the inetd service use the Services control panel or the
215 following Windows command:
218 Notes on Amanda backup options
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
230 define dumptype srv-comp-tar {
232 comment "partitions dumped via tar with server compression"
235 exclude list ".Amanda.exclude"
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.
250 Amanda will leave debugging files in /tmp/amanda if it exists. I have
251 recommended to create this directory above.
255 Refer to http://www.amanda.org/docs/howto-cygwin.html for the current version
257 -------------------------------------------------------------------------------
260 Part III. HOWTOs Home Chapter 13. How to use the Amanda file-driver