Mention the backup fix for redone files with --inplace.
[rsync/rsync.git] / NEWS
1 NEWS for rsync 2.6.4 (UNRELEASED)
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 with --verbose being the equivalent of a --log-format of
25       '%n%L' (which outputs the name and any symlink info).  If the log
26       output must occur after the transfer to be complete, the only time
27       the name is also output prior to the transfer is when --progress was
28       specified (so that the name will precede the progress stats, and the
29       full --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     - We now check if the OS doesn't support using mknod() for creating
51       FIFOs and sockets, and compile-in using mkfifo() and socket() when
52       necessary.
53
54     - Fixed an off-by-one error in the handling of --max-delete=N.
55
56     - One place in the code wasn't checking if fork() failed.
57
58     - The "ignore nonreadable" daemon parameter used to erroneously affect
59       symlinks that pointed to a non-existent file.  This has been fixed.
60
61     - If the OS does not have lchown() and a chown() of a symlink will
62       affect the referent of a symlink (as it should), we no longer try
63       to set the user and group of a symlink.
64
65     - The generator now properly runs the hard-link loop and the dir-time
66       rewriting loop after we're sure that the redo phase is complete.
67
68     - When --backup was specified with --partial-dir=DIR (where DIR is a
69       relative path), the backup code was erroneously trying to backup a
70       file that was put into the partial-dir.
71
72     - If a file gets resent in a single transfer and the --backup option is
73       enabled along with --inplace, rsync no longer performs a duplicate
74       backup (it used to overwrite the first backup with the failed file).
75
76     - One call to flush_write_file() was not being checked for an error.
77
78     - The --no-relative option was not being sent from the client to a
79       server sender.
80
81     - If an rsync daemon specified "dont compress = ..." for a file and the
82       client tried to specify --compress, the libz code was not handling a
83       compression level of 0 properly.  This could cause a transfer failure
84       if the block-size for a file was large enough (e.g. rsync might have
85       exited with an error for large files).
86
87     - Fixed a bug that would sometimes surface when using --compress and
88       sending a file with a block-size larger than 64K (either manually
89       specified, or computed due to the file being really large).  Prior
90       versions of rsync would sometimes fail to decompress the data
91       properly, and thus the transferred file would fail its verification.
92
93     - If a daemon can't open the specified log file (i.e. syslog is not
94       being used), die without crashing.  We also output an error about
95       the failure on stderr (which will only be seen if --no-detach was
96       specified).
97
98     - A local transfer no longer duplicates all its include/exclude options
99       (since the forked process already has a copy of the exclude list,
100       there's no need to send them a set of duplicates).
101
102     - When --progress is specified, the output of items that the generator
103       is creating (e.g. dirs, symlinks) is now integrated into the progress
104       output without overlapping it.  (Requires protocol 29.)
105
106     - When --timeout is specified, lulls that occur in the transfer while
107       the generator is scanning the file system (either looking for files
108       to generate or files to delete) cause a new keep-alive packet to be
109       sent that should keep the transfer going (as long as the generator
110       continues to make progress).  (Requires protocol 29.)
111
112     - The stat size of a device is not added to the total file size of the
113       items in the transfer since the size might be undefined on some OSes.
114
115   ENHANCEMENTS:
116
117     - Rsync now supports popt's option aliases, which means that you can
118       use /etc/popt and/or ~/.popt to create your own option aliases.
119
120     - Added the --delete-during (--del) option which will delete files
121       from the receiving side incrementally as each directory in the
122       transfer is being processed.  This makes it more efficient than the
123       default, before-the-transfer behavior, which is now available as
124       --delete-before (and is still the default --delete-WHEN option that
125       will be chosen if --delete or --delete-excluded is specified without
126       a --delete-WHEN choice).  All the --del* options infer --delete, so
127       an rsync daemon that refuses "delete" will still refuse to allow any
128       file-deleting options.
129
130     - All the --delete-WHEN options are now more memory efficient:
131       Previously an entire duplicate set of file-list objects was created
132       on the receiving side for the entire destination hierarchy.  The new
133       algorithm only creates one directory of objects at a time (for files
134       inside the transfer).
135
136     - Added support for specifying multiple --compare-dest or --link-dest
137       options, but only of a single type. (Promoted from the patches dir
138       and enhanced.)
139
140     - Added the --max-size option. (Promoted from the patches dir.)
141
142     - The daemon-mode options were separated from the normal rsync options
143       so that they can't be mixed together.  This makes it impossible to
144       start a daemon that had improper default option values that could
145       cause problems when a client connects (e.g. a hang or an abort).
146
147     - The --bwlimit option may now be used in combination with --daemon
148       to specify both a default value for the daemon side and a value
149       that cannot be exceeded by a user-specified --bwlimit option.
150
151     - Added the "port" parameter to the rsyncd.conf file. (Promoted from
152       the patches dir.)  Also added "address".  A command-line option
153       will take precedence over a config-file option, as expected.
154
155     - In _exit_cleanup(): when we are exiting with a partially-received
156       file, we now flush any data in the write-cache before closing the
157       partial file.
158
159     - The --inplace support was enhanced to work with --compare-dest and
160       --link-dest. (Requires protocol 29.)
161
162     - Added the --dirs (-d) option for an easier way to copy directories
163       without recursion.
164
165     - Added the --list-only option, which is mainly a way for the client to
166       put the server into listing mode without needing to resort to any
167       internal option kluges (e.g. the age-old use of "-r --exclude="/*/*"
168       for a non-recursive listing).  This option is used automatically
169       (behind the scenes) when a modern rsync speaks to a modern daemon,
170       but may also be specified manually if you want to force the use of
171       the --list-only option over a remote-shell connection.
172
173     - Added the --omit-dir-times (-O) option, which will avoid updating
174       the modified time for directories when --times was specified.  This
175       option will avoid an extra pass through the file-list at the end of
176       the transfer (to tweak all the directory times), which can result in
177       an appreciable speedup for a really large transfer. (Promoted from
178       the patches dir.)
179
180     - Added the --filter (-f) option and its helper option, -F.  Filter
181       rules are an extension to the existing include/exclude handling
182       that also supports nested filter files as well as per-directory
183       filter files (like .cvsignore, but with full filter-rule parsing).
184       This new option was chosen in order to ensure that all existing
185       include/exclude processing remained 100% compatible with older
186       versions.  Protocol 29 is needed for full filter-rule support, but
187       backward-compatible rules work with earlier protocol versions.
188       (Promoted from the patches dir and enhanced.)
189
190     - Added the --delay-updates option that puts all updated files into
191       a temporary directory (by default ".~tmp~", but settable via the
192       --partial-dir=DIR option) until the end of the transfer.  This
193       makes the updates a little more atomic for a large transfer.
194
195     - If rsync is put into the background, any output from --progress is
196       reduced.
197
198     - Documented the "max verbosity" setting for rsyncd.conf.  (This
199       setting was added a couple releases ago, but left undocumented.)
200
201     - The sender and the generator now double-check the file-list index
202       they are given, and refuse to try to do a file transfer on a
203       non-file index (since that would indicate that something had gone
204       very wrong).
205
206     - Added the --itemize-changes (-i) option, which is a way to output a
207       more detailed list of what files changed in any way and how they
208       changed.  The effect is the same as specifying a --log-format of
209       "%i %n%L" (see the rsyncd.conf manpage).  Works with --dry-run too.
210
211     - Added the --fuzzy option, which attempts to find a basis file for a
212       file that is being created from scratch.  The current algorithm
213       only looks in the destination directory for the created file, but
214       it does attempt to find a match based on size/mod-time (in case the
215       file was renamed with no other changes) as well as based on a fuzzy
216       name-matching algorithm.  This option requires protocol 29 because
217       it needs the new file-sorting order.  (Promoted from patches dir
218       and enhanced.)
219
220     - Added the --remove-sent-files option, which lets you move files
221       between systems.
222
223     - When building under windows, the default for --daemon is now to
224       avoid detaching, requiring the new --detach option to force rsync
225       to detach.
226
227     - Improved the option descriptions in the --help text.
228
229   SUPPORT FILES:
230
231     - Added atomic-rsync to the support dir: a perl script that will
232       transfer some files using rsync, and then move the updated files into
233       place all at once at the end of the transfer.  Only works when
234       pulling, and uses --link-dest and a parallel hierarchy of files to
235       effect its update.
236
237     - Added mnt-excl to the support dir: a perl script that takes the
238       /proc/mounts file and translates it into a set of excludes that will
239       exclude all mount points (even mapped mounts to the same disk).  The
240       excludes are made relative to the specified source dir and properly
241       anchored.
242
243     - Added savetransfer.c to the support dir: a C program that can make
244       a copy of all the data that flows over the wire.  This lets you test
245       for data corruption (by saving the data on both the sending side and
246       the receiving side) or provides a way to help debug a protocol error.
247
248     - Added rrsync to the support dir: this is my version of Joe Smith's
249       restricted rsync perl script.  This helps to ensure that only certain
250       rsync commands can be run by an ssh invocation.
251
252   INTERNAL:
253
254     - Added better checking of the checksum-header values that come over
255       the socket.
256
257     - Merged a variety of file-deleting functions into a single function so
258       that it is easier to maintain.
259
260     - Improved the type of some variables (particularly blocksize vars) for
261       consistency and proper size.
262
263     - Got rid of the uint64 type (which we didn't need).
264
265     - Use a slightly more compatible set of core #include directives.
266
267     - Defined int32 in a way that ensures that the build dies if we can't
268       find a variable with at least 32 bits.
269
270     - The daemon's "read only" config item now sets an internal read_only
271       variable that makes extra sure that no write/delete calls on the
272       read-only side can succeed.
273
274   PROTOCOL DIFFERENCES FOR VERSION 29:
275
276     - A 16-bit flag-word is transmitted after every file-list index.  This
277       indicates what is changing between the sender and the receiver.  The
278       generator now transmits an index and a flag-word to indicate when
279       dirs and symlinks have changed (instead of producing a message),
280       which makes the outputting of the information more consistent and
281       less prone to screen corruption (because either the receiver or the
282       sender is now outputting all the file-change info).
283
284     - If --inplace is specified, the generator flags any transfer that is
285       using an alternate basis file so that the sender can use the entire
286       basis file in the rsync algorithm (unlike a normal --inplace update).
287
288     - The sending of exclude names is done using filter-rule syntax.  This
289       means that all names have a prefixed rule indicator, even excludes
290       (which used to be sent as a bare pattern, when possible).  The -C
291       option will include the per-dir .cvsignore merge file in the list of
292       filter rules so it is positioned correctly (unlike in some older
293       transfer scenarios).
294
295     - Rsync sorts the filename list in a different way: it sorts the subdir
296       names after the non-subdir names for each dir's contents, and it
297       always puts a dir's contents immediately after the dir's name in the
298       list.  (Previously an item named "foo.txt" would sort in between
299       directory "foo/" and "foo/bar".)
300
301     - When talking to a protocol 29 rsync daemon, a list-only request
302       is able to note this before the options are sent over the wire and
303       the new --list-only option is included in the options.
304
305     - When the --stats bytes are sent over the wire (or stored in a batch),
306       they now include two elapsed-time values: one for how long it took to
307       build the file-list, and one for how long it took to send it over the
308       wire (each expressed in thousandths of a second).
309
310     - When --delete-excluded is specified with some filter excludes, a
311       client sender will now initiate a send of the filter rules to the
312       receiver (older protocols used to omit the sending of excludes in
313       this situation since there were no receiver-specific rules that
314       survived --delete-excluded back then).  Note that, as with all the
315       filter-list sending, only items that are significant to the other
316       side will actually be sent over the wire, so the filter-rule list
317       is often empty in this scenario.
318
319     - A protocol-29 batch file includes a bit for the setting of the --dirs
320       option.  Also, the shell script created by --write-batch will use the
321       --filter option instead of --exclude-from to capture any filter rules.
322
323     - An index equal to the file-list count is sent as a keep-alive packet
324       from the generator to the sender, who then forwards it on to the
325       receiver.  This normally invalid index is only a valid keep-alive
326       packet if the 16-bit flag-word that follows it contains a single bit
327       (ITEM_IS_NEW, which is normally an illegal flag to appear alone).
328
329   BUILD CHANGES:
330
331     - Handle an operating system that use mkdev() in place of makedev().
332
333     - Improved configure to better handle cross-compiling.