Changed safe_fname() to output \### (octal) to escape non-printable
[rsync/rsync.git] / NEWS
1 NEWS for rsync 2.6.4 (30 March 2005)
2 Protocol: 29 (changed)
3 Changes since 2.6.3:
4
5   OUTPUT CHANGES:
6
7     - When rsync deletes a directory and outputs a verbose message about
8       it, it now appends a trailing slash to the name instead of (only
9       sometimes) outputting a preceding "directory " string.
10
11     - The --stats output will contain file-list time-statistics if both
12       sides are 2.6.4, or if the local side is 2.6.4 and the files are
13       being pushed (since the stats come from the sending side).
14       (Requires protocol 29 for a pull.)
15
16     - The "%o" (operation) log-format escape now has a third value (besides
17       "send" and "recv"):  "del." (with trailing dot to make it 4 chars).
18       This changes the way deletions are logged in the daemon's log file.
19
20     - When the --log-format option is combined with --verbose, rsync now
21       avoids outputting the name of the file twice in most circumstances.
22       As long as the --log-format item does not refer to any post-transfer
23       items (such as %b or %c), the --log-format message is output prior to
24       the transfer, so --verbose is now the equivalent of a --log-format of
25       '%n%L' (which outputs the name and any link info).  If the log output
26       must occur after the transfer to be complete, the only time the name
27       is also output prior to the transfer is when --progress was specified
28       (so that the name will precede the progress stats, and the full
29       --log-format output will come after).
30   
31   BUG FIXES:
32
33     - Restore the list-clearing behavior of "!" in a .cvsignore file (2.6.3
34       was only treating it as a special token in an rsync include/exclude
35       file).
36
37     - The combination of --verbose and --dry-run now mentions the full list
38       of changes that would be output without --dry-run.
39
40     - Avoid a mkdir warning when removing a directory in the destination
41       that already exists in the --backup-dir.
42
43     - An OS that has a binary mode for its files (such as cygwin) needed
44       setmode(fd, O_BINARY) called on the temp-file we opened with
45       mkstemp().  (Fix derived from the cygwin's 2.6.3 rsync package.)
46
47     - Fixed a potential hang when verbosity is high, the client side is
48       the sender, and the file-list is large.
49
50     - Fixed a potential protocol-corrupting bug where the generator could
51       merge a message from the receiver into the middle of a multiplexed
52       packet of data if only part of that data had been written out to the
53       socket when the message from the generator arrived.
54
55     - We now check if the OS doesn't support using mknod() for creating
56       FIFOs and sockets, and compile-in some compatibility code using
57       mkfifo() and socket() when necessary.
58
59     - Fixed an off-by-one error in the handling of --max-delete=N.  Also,
60       if the --max-delete limit is exceeded during a run, we now output a
61       warning about this at the end of the run and exit with a new error
62       code (25).
63
64     - One place in the code wasn't checking if fork() failed.
65
66     - The "ignore nonreadable" daemon parameter used to erroneously affect
67       readable symlinks that pointed to a non-existent file.
68
69     - If the OS does not have lchown() and a chown() of a symlink will
70       affect the referent of a symlink (as it should), we no longer try
71       to set the user and group of a symlink.
72
73     - The generator now properly runs the hard-link loop and the dir-time
74       rewriting loop after we're sure that the redo phase is complete.
75
76     - When --backup was specified with --partial-dir=DIR, where DIR is a
77       relative path, the backup code was erroneously trying to backup a
78       file that was put into the partial-dir.
79
80     - If a file gets resent in a single transfer and the --backup option is
81       enabled along with --inplace, rsync no longer performs a duplicate
82       backup (it used to overwrite the first backup with the failed file).
83
84     - One call to flush_write_file() was not being checked for an error.
85
86     - The --no-relative option was not being sent from the client to a
87       server sender.
88
89     - If an rsync daemon specified "dont compress = ..." for a file and the
90       client tried to specify --compress, the libz code was not handling a
91       compression level of 0 properly.  This could cause a transfer failure
92       if the block-size for a file was large enough (e.g. rsync might have
93       exited with an error for large files).
94
95     - Fixed a bug that would sometimes surface when using --compress and
96       sending a file with a block-size larger than 64K (either manually
97       specified, or computed due to the file being really large).  Prior
98       versions of rsync would sometimes fail to decompress the data
99       properly, and thus the transferred file would fail its verification.
100
101     - If a daemon can't open the specified log file (i.e. syslog is not
102       being used), die without crashing.  We also output an error about
103       the failure on stderr (which will only be seen if --no-detach was
104       specified) and exit with a new error code (6).
105
106     - A local transfer no longer duplicates all its include/exclude options
107       (since the forked process already has a copy of the exclude list,
108       there's no need to send them a set of duplicates).
109
110     - When --progress is specified, the output of items that the generator
111       is creating (e.g. dirs, symlinks) is now integrated into the progress
112       output without overlapping it.  (Requires protocol 29.)
113
114     - When --timeout is specified, lulls that occur in the transfer while
115       the generator is doing work that does not generate socket traffic
116       (looking for changed files, deleting files, doing directory-time
117       touch-ups, etc.) will cause a new keep-alive packet to be sent that
118       should keep the transfer going as long as the generator continues to
119       make progress.  (Requires protocol 29.)
120
121     - The stat size of a device is not added to the total file size of the
122       items in the transfer (the size might be undefined on some OSes).
123
124     - Fixed a problem with refused-option messages sometimes not making it
125       back to the client side when a remote --files-from was in effect and
126       the daemon was the receiver.
127
128     - The --compare-dest option was not updating a file that differred in
129       (the preserved) attributes from the version in the compare-dest DIR.
130
131     - When rsync is copying files into a write-protected directory, fixed
132       the change-report output for the directory so that we don't report
133       an identical directory as changed.
134
135   ENHANCEMENTS:
136
137     - Rsync now supports popt's option aliases, which means that you can
138       use /etc/popt and/or ~/.popt to create your own option aliases.
139
140     - Added the --delete-during (--del) option which will delete files
141       from the receiving side incrementally as each directory in the
142       transfer is being processed.  This makes it more efficient than the
143       default, before-the-transfer behavior, which is now also available as
144       --delete-before (and is still the default --delete-WHEN option that
145       will be chosen if --delete or --delete-excluded is specified without
146       a --delete-WHEN choice).  All the --del* options infer --delete, so
147       an rsync daemon that refuses "delete" will still refuse to allow any
148       file-deleting options (including the new --remove-sent-files option).
149
150     - All the --delete-WHEN options are now more memory efficient:
151       Previously an duplicate set of file-list objects was created on the
152       receiving side for the entire destination hierarchy.  The new
153       algorithm only creates one directory of objects at a time (for files
154       inside the transfer).
155
156     - Added the --copy-dest option, which works like --link-dest except
157       that it locally copies identical files instead of hard-linking them.
158
159     - Added support for specifying multiple --compare-dest, --copy-dest, or
160       --link-dest options, but only of a single type. (Promoted from the
161       patches dir and enhanced.) (Requires protocol 29.)
162
163     - Added the --max-size option. (Promoted from the patches dir.)
164
165     - The daemon-mode options are now separated from the normal rsync
166       options so that they can't be mixed together.  This makes it
167       impossible to start a daemon that has improper default option values
168       (which could cause problems when a client connects, such as hanging
169       or crashing).
170
171     - The --bwlimit option may now be used in combination with --daemon
172       to specify both a default value for the daemon side and a value
173       that cannot be exceeded by a user-specified --bwlimit option.
174
175     - Added the "port" parameter to the rsyncd.conf file. (Promoted from
176       the patches dir.)  Also added "address".  The command-line options
177       take precedence over a config-file option, as expected.
178
179     - In _exit_cleanup(): when we are exiting with a partially-received
180       file, we now flush any data in the write-cache before closing the
181       partial file.
182
183     - The --inplace support was enhanced to work with --compare-dest,
184       --link-dest, and (the new) --copy-dest options. (Requires protocol
185       29.)
186
187     - Added the --dirs (-d) option for an easier way to copy directories
188       without recursion.
189
190     - Added the --list-only option, which is mainly a way for the client to
191       put the server into listing mode without needing to resort to any
192       internal option kluges (e.g. the age-old use of "-r --exclude="/*/*"
193       for a non-recursive listing).  This option is used automatically
194       (behind the scenes) when a modern rsync speaks to a modern daemon,
195       but may also be specified manually if you want to force the use of
196       the --list-only option over a remote-shell connection.
197
198     - Added the --omit-dir-times (-O) option, which will avoid updating
199       the modified time for directories when --times was specified.  This
200       option will avoid an extra pass through the file-list at the end of
201       the transfer (to tweak all the directory times), which may provide
202       an appreciable speedup for a really large transfer. (Promoted from
203       the patches dir.)
204
205     - Added the --filter (-f) option and its helper option, -F.  Filter
206       rules are an extension to the existing include/exclude handling
207       that also supports nested filter files as well as per-directory
208       filter files (like .cvsignore, but with full filter-rule parsing).
209       This new option was chosen in order to ensure that all existing
210       include/exclude processing remained 100% compatible with older
211       versions.  Protocol 29 is needed for full filter-rule support, but
212       backward-compatible rules work with earlier protocol versions.
213       (Promoted from the patches dir and enhanced.)
214
215     - Added the --delay-updates option that puts all updated files into
216       a temporary directory (by default ".~tmp~", but settable via the
217       --partial-dir=DIR option) until the end of the transfer.  This
218       makes the updates a little more atomic for a large transfer.
219
220     - If rsync is put into the background, any output from --progress is
221       reduced.
222
223     - Documented the "max verbosity" setting for rsyncd.conf.  (This
224       setting was added a couple releases ago, but left undocumented.)
225
226     - The sender and the generator now double-check the file-list index
227       they are given, and refuse to try to do a file transfer on a
228       non-file index (since that would indicate that something had gone
229       very wrong).
230
231     - Added the --itemize-changes (-i) option, which is a way to output a
232       more detailed list of what files changed and in what way.  The effect
233       is the same as specifying a --log-format of "%i %n%L" (see both the
234       rsync and rsyncd.conf manpages).  Works with --dry-run too.
235
236     - Added the --fuzzy (-y) option, which attempts to find a basis file
237       for a file that is being created from scratch.  The current algorithm
238       only looks in the destination directory for the created file, but it
239       does attempt to find a match based on size/mod-time (in case the file
240       was renamed with no other changes) as well as based on a fuzzy
241       name-matching algorithm.  This option requires protocol 29 because it
242       needs the new file-sorting order.  (Promoted from patches dir and
243       enhanced.) (Requires protocol 29.)
244
245     - Added the --remove-sent-files option, which lets you move files
246       between systems.
247
248     - The hostname in HOST:PATH or HOST::PATH may now be an IPv6 literal
249       enclosed in '[' and ']' (e.g. "[::1]").  (We already allowed IPv6
250       literals in the rsync://HOST:PORT/PATH format.)
251
252     - When rsync recurses to build the file list, it no longer keeps open
253       one or more directory handles from the dir's parent dirs.
254
255     - When building under windows, the default for --daemon is now to
256       avoid detaching, requiring the new --detach option to force rsync
257       to detach.
258
259     - The --dry-run option can now be combined with either --write-batch or
260       --read-batch, allowing you to run a do-nothing test command to see
261       what would happen without --dry-run.
262
263     - The daemon's "read only" config item now sets an internal read_only
264       variable that makes extra sure that no write/delete calls on the
265       read-only side can succeed.
266
267     - The log-format % escapes can now have a numeric field width in
268       between the % and the escape letter (e.g. "%-40n %08p").
269
270     - Improved the option descriptions in the --help text.
271
272   SUPPORT FILES:
273
274     - Added atomic-rsync to the support dir: a perl script that will
275       transfer some files using rsync, and then move the updated files into
276       place all at once at the end of the transfer.  Only works when
277       pulling, and uses --link-dest and a parallel hierarchy of files to
278       effect its update.
279
280     - Added mnt-excl to the support dir: a perl script that takes the
281       /proc/mounts file and translates it into a set of excludes that will
282       exclude all mount points (even mapped mounts to the same disk).  The
283       excludes are made relative to the specified source dir and properly
284       anchored.
285
286     - Added savetransfer.c to the support dir: a C program that can make
287       a copy of all the data that flows over the wire.  This lets you test
288       for data corruption (by saving the data on both the sending side and
289       the receiving side) and provides one way to debug a protocol error.
290
291     - Added rrsync to the support dir: this is an updated version of Joe
292       Smith's restricted rsync perl script.  This helps to ensure that only
293       certain rsync commands can be run by an ssh invocation.
294
295   INTERNAL:
296
297     - Added better checking of the checksum-header values that come over
298       the socket.
299
300     - Merged a variety of file-deleting functions into a single function so
301       that it is easier to maintain.
302
303     - Improved the type of some variables (particularly blocksize vars) for
304       consistency and proper size.
305
306     - Got rid of the uint64 type (which we didn't need).
307
308     - Use a slightly more compatible set of core #include directives.
309
310     - Defined int32 in a way that ensures that the build dies if we can't
311       find a variable with at least 32 bits.
312
313   PROTOCOL DIFFERENCES FOR VERSION 29:
314
315     - A 16-bit flag-word is transmitted after every file-list index.  This
316       indicates what is changing between the sender and the receiver.  The
317       generator now transmits an index and a flag-word to indicate when
318       dirs and symlinks have changed (instead of producing a message),
319       which makes the outputting of the information more consistent and
320       less prone to screen corruption (because the local receiver/sender is
321       now outputting all the file-change info messages).
322
323     - If a file is being hard-linked, the ITEM_XNAME_FOLLOWS bit is enabled
324       in the flag-word and the name of the file that was linked immediately
325       follows in vstring format (see below).
326
327     - If a file is being transferred with an alternate-basis file, the
328       ITEM_BASIS_TYPE_FOLLOWS bit is enabled in the flag-word and a single
329       byte follows, indicating what type of basis file was chosen.  If that
330       indicates that a fuzzy-match was selected, the ITEM_XNAME_FOLLOWS bit
331       is set in the flag-word and the name of the match in vstring format
332       follows the basis byte.  A vstring is a variable length string that
333       has its size written prior to the string, and no terminating null.
334       If the string is from 1-127 bytes, the length is a single byte.  If
335       it is from 128-32767 bytes, the length is written as ((len >> 8) |
336       0x80) followed by (len % 0x100).
337
338     - The sending of exclude names is done using filter-rule syntax.  This
339       means that all names have a prefixed rule indicator, even excludes
340       (which used to be sent as a bare pattern, when possible).  The -C
341       option will include the per-dir .cvsignore merge file in the list of
342       filter rules so it is positioned correctly (unlike in some older
343       transfer scenarios).
344
345     - Rsync sorts the filename list in a different way: it sorts the subdir
346       names after the non-subdir names for each dir's contents, and it
347       always puts a dir's contents immediately after the dir's name in the
348       list.  (Previously an item named "foo.txt" would sort in between
349       directory "foo/" and "foo/bar".)
350
351     - When talking to a protocol 29 rsync daemon, a list-only request
352       is able to note this before the options are sent over the wire and
353       the new --list-only option is included in the options.
354
355     - When the --stats bytes are sent over the wire (or stored in a batch),
356       they now include two elapsed-time values: one for how long it took to
357       build the file-list, and one for how long it took to send it over the
358       wire (each expressed in thousandths of a second).
359
360     - When --delete-excluded is specified with some filter rules (AKA
361       excludes), a client sender will now initiate a send of the rules to
362       the receiver (older protocols used to omit the sending of excludes in
363       this situation since there were no receiver-specific rules that
364       survived --delete-excluded back then).  Note that, as with all the
365       filter-list sending, only items that are significant to the other
366       side will actually be sent over the wire, so the filter-rule list
367       that is sent in this scenario is often empty.
368
369     - An index equal to the file-list count is sent as a keep-alive packet
370       from the generator to the sender, which then forwards it on to the
371       receiver.  This normally invalid index is only a valid keep-alive
372       packet if the 16-bit flag-word that follows it contains a single bit
373       (ITEM_IS_NEW, which is normally an illegal flag to appear alone).
374
375     - A protocol-29 batch file includes a bit for the setting of the --dirs
376       option and for the setting of the --compress option.  Also, the shell
377       script created by --write-batch will use the --filter option instead
378       of --exclude-from to capture any filter rules.
379
380   BUILD CHANGES:
381
382     - Handle an operating system that use mkdev() in place of makedev().
383
384     - Improved configure to better handle cross-compiling.