Commit Graph

281 Commits

Author SHA1 Message Date
Wayne Davison
3a7bf54ad5 A resumed partial-dir file is transferred in-place.
Fixed bug #13071.
2020-04-29 17:02:14 -07:00
Wayne Davison
c5fabfb068 Set Copyright years and make them easier to update
I replaced git-set-file-times with an improved version that I wrote
recently (in python3). A new script uses it to figure out the
last-modified year for each *.[ch] file and updates its copyright.
It also puts the latest year into the latest-year.h file for the
output of --version.
2020-04-09 15:11:37 -07:00
Wayne Davison
15fa9ab06d Add progress output via SIGINFO and SIGVTALRM
On BSD-ish systems you can type Ctrl+T to see the current file and
the progress output (in --info=progress2 format).  On hosts w/o
SIGINFO, use something like "killall -VTALRM rsync" or a more
targetted "kill -VTALRM PID ..." call (as needed).
2020-04-05 15:07:31 -07:00
Wayne Davison
9e9d33a2db Added the --write-devices option.
This is a fleshed out version of the old one in the patches repo with
documentation & proper handling of the implied --inplace option for a
daemon's option-rufusing considerations. I ommitted the -w short option
as I would hate for someone to turn this on accidentally.
2020-04-05 11:56:28 -07:00
Wayne Davison
3e2e4b5a33 Tweak the copyright year. 2019-03-16 09:15:49 -07:00
Wayne Davison
473108ae6e Tweak copyright date. 2018-01-14 19:55:07 -08:00
Wayne Davison
f5e8a17e09 Fix issue with earlier path-check (fixes "make check")
and make a BOOL more explicit.
2017-12-03 16:27:11 -08:00
Jeriko One
5509597dec Check daemon filter against fnamecmp in recv_files(). 2017-12-03 16:13:06 -08:00
Jeriko One
3e06d40029 Check fname in recv_files sooner. 2017-12-03 16:12:28 -08:00
Wayne Davison
416e719bea More archaic-checksum improvements. This makes the len vars clearer
and ensures that only the flist code gets the 2-byte digest len.
2017-11-07 14:01:13 -08:00
Wayne Davison
001adf5096 Fix extern of preallocated_len w/o SUPPORT_PREALLOCATION. 2016-10-31 09:06:50 -07:00
Wayne Davison
f3873b3d88 Support --sparse combined with --preallocate or --inplace.
The new code tries to punch holes in the destination file using newer
Linux fallocate features. It also supports a --whole-file + --sparse +
--inplace copy on any filesystem by truncating the destination file.
2016-10-10 11:53:03 -07:00
Wayne Davison
a5a7d3a297 Add --checksum-choice option to choose the checksum algorithms. 2016-05-01 17:06:54 -07:00
Wayne Davison
cce44865c1 Fixed logging of %b & %c when using --log-file.
The %b and %c escapes were outputting cumulative values when logged via
--log-file only (the bug didn't affect daemon transfer logging or the
output of the client's --out-format info).  Also unified the %b & %c
switch case to make it easier to maintain.  Fixes bug 11496.
2015-09-07 10:07:17 -07:00
Wayne Davison
453914e35b Update the copyright year. 2015-08-08 12:47:03 -07:00
Wayne Davison
ff08acd4f2 Added a flag to disable xattr hlink optimization.
I added a compatibility flag for protocol 31 that will let both sides
know if they should be using the xattr optimization that attempted to
avoid sending xattr info for hardlinked files.  Since this optimization
was causing some issues, this compatibility flag will ensure that both
sides know if they should be trying to use the optimization or not.
2014-06-08 10:42:14 -07:00
Wayne Davison
e1bfdf67f3 Avoid the use of an extra leading dot when using --temp-dir. 2014-02-26 14:00:10 -08:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
740551d657 Undo the hard-link xattr optimization in 78286a03.
I'm backing out the xattr optimization that was put in to try
to make xattr data sending more optimal on hard-linked files.
The code was causing hard-to-reproduce bugs, and it's better to
get things done fully & correctly over fully optimally.
2014-01-19 14:59:43 -08:00
Wayne Davison
9c7d755dfe Flush write buffer on an aborted in-place transfer. 2013-09-28 10:40:27 -07:00
Wayne Davison
0ab8e166f4 Avoid preallocation on inplace file that is already long enough. 2013-06-02 12:37:48 -07:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
b55115ec6f Fix --only-write-batch hang with --hard-links.
Fixes bug 8565.
2012-01-28 12:04:26 -08:00
Wayne Davison
48b51d0004 make repeated --fuzzy option look into alt-dest dirs. 2011-11-23 12:29:25 -08:00
Wayne Davison
b223d96bf0 Add some temp-name dot heuristics for OS X's sake.
- Drop one leading '.' from the filename (before adding our own).
 - Drop one trailing '.' from a (possibly truncated) name prior to
   the .XXXXXX suffix being added.
 - Allow the temp-name to collapse to just the .XXXXXX suffix
   if the path is long enough to require that.

Note that we don't try to remove multiple dots from a filename
that actually has multiple consecutive dots, since we might as
well learn early if the final name is going to fail or not.
2011-04-05 13:35:13 -07:00
Wayne Davison
28b519c93b Applying the preallocate patch. 2011-04-04 21:57:57 -07:00
Wayne Davison
78286a03d1 Avoid re-setting (and sending) xattrs on a hard-linked file w/the same xattrs.
Improved the xattrs testing to include hard-linking.
2011-03-26 10:09:20 -07:00
Wayne Davison
d3f5c628d7 Avoid directory permission issues with --fake-super.
Fixes bug 7070.
2011-01-01 18:09:57 -08:00
Wayne Davison
9f5c16e51d Avoid splitting a multi-byte character when trimming a name.
Fixes bug 7816.
2010-11-26 09:35:43 -08:00
Wayne Davison
96e051c86a Use ftruncate() at the end of a --sparse file.
Fixes bug 7337.
2010-11-06 10:13:16 -07:00
Wayne Davison
55f767c5ca Mention seek effect of an unmoved --inplace chunk. 2010-11-06 08:14:21 -07:00
Wayne Davison
b32fd63459 Avoid a crash with --append-verify when discarding the received data.
Fixes bug 6293.
2010-08-21 14:25:48 -07:00
Wayne Davison
3b22184d4c Avoid a non-writable-by-the-user file when copying xattrs.
Fixes part of the problem in bug 5147.
2010-08-21 14:14:31 -07:00
Wayne Davison
05c36015f7 More --timeout improvements, especially for the receiving side:
- The receiver now sends keep-alive messages to the generator
  when it is actively doing work and hasn't sent anything
  recently.  This ensures that the generator won't timeout
  if the receiver is working hard.
- The perform_io() code has improved keep-alive participation.
- Allow the sender to send some keep-alive messages, which
  ensures that if it is in a lull, it can probe the socket.
2010-01-02 10:58:39 -08:00
Wayne Davison
4dde3347fb Fix %b and %c so that they count per-transfer bytes again. 2009-10-25 22:27:01 -07:00
Wayne Davison
20caffd2b3 A major overhaul of I/O routines, creating perform_io().
Files-from data is now sent as multiplexed I/O so that it can mingle
with any messages (such as debug output).  Requires protocol 31.

Protocol 31 no longer disables output verbosity in a couple instances
that used to cause protocol issues.

Got rid of MSG_* messages that have implied raw data that follows after
them.  We instead send a negative index value as a part of the raw data
stream, which is guaranteed to be output together with the following
data.  This only affects the (in-progress) protocol 31 and the (self-
contained) communication stream from the receiver to the generator.

Added --debug=IO and improved --debug=FLIST.  Some --debug=IO output
requires --msgs2stderr to be used to see it (i.e. sending a message
about sending a message would send another message, ad infinitum).
2009-10-17 00:03:32 -07:00
Wayne Davison
c55fb5e1d6 Create non-transferred files in a more atomic manner:
If a symlink, device, special-file, or hard-linked file is replacing
an existing non-directory, the new file is created using a temporary
filename and then renamed into place.  Also changed the handling of
a cluster of hard-linked symlinks/devices/special-files to always
ensure the first item in the cluster is correct, since it doesn't
really save any significant work to try to find an existing correct
item later in the cluster to link with.
2009-08-29 16:18:57 -07:00
Wayne Davison
7b6c5c7794 Use typedefs for the filter structures. 2009-05-23 09:07:43 -07:00
Wayne Davison
d510e82fc6 Fixed the use of --xattrs with --only-write-batch. 2009-04-12 12:51:20 -07:00
Wayne Davison
3696674bc6 More backup improvements:
- Changed get_backup_name() to verify the backup path, and make any
  missing directories.  This avoids accidental use of a symlink as a dir
  in a backup path, and gets rid of any other non-dirs that are in the
  way.  It also avoids the need for various operations to retry after
  calling make_bak_dir(), simplifying several pices of code.
- Changed create_directory_path() to make_path(), giving it flags that
  lets the caller decide if it should skip a leading slash or drop the
  trailing filename.
- Mention when we create the backup directory, so the user is not caught
  unaware when rsync uses a directory they didn't expect.
- Got rid of some dir-moving backup code that is not used.
- Added a little more backup-debug output.
2009-04-11 11:51:07 -07:00
Wayne Davison
83c32ca572 Fixed --dry-run with --read-batch:
- Avoid sending MSG_NO_SEND to the generator.
- Check if the file is wanted before discarding the batched data.
2009-04-04 07:25:25 -07:00
Wayne Davison
7a498f5b6c Check the right flist_num in gen_wants_ndx(). 2009-01-18 23:02:36 -08:00
Wayne Davison
bc40a30503 Fixed the delete statistics with --delete-delay and --delete-after. 2009-01-17 14:46:42 -08:00
Wayne Davison
4079d6a684 Fixed a hang in the inc_recurse batch-reading code. 2009-01-17 13:59:08 -08:00
Wayne Davison
21cddef2b4 Improved the backup code:
- Backups do not interfere with an atomic update (when possible).
- Backing up a file will remove a directory that is in the way
  and visa versa.
- Unify the backup-dir and non-backup-dir code in backup.c.
- Improved the backup tests a little bit.
2009-01-03 12:02:47 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
aade88bfc2 An ftruncate() failure should result in FERROR_XFER. 2008-11-15 14:50:40 -08:00
Wayne Davison
9411292489 Fixed a bunch of "warn_unused_result" compiler warnings. 2008-11-09 18:56:21 -08:00
Wayne Davison
e366e5303f Enhanced the --stats output:
- Mention how many files were created (protocol >= 29).
- Mention how many files were deleted (new in protocol 31).
- Follow the file-count, created-count, and deleted-count
  with a break-out list of each count by type.
2008-09-26 22:14:01 -07:00
Wayne Davison
8ab02ccd52 More batch-mode fixes to handle redos properly (and without hanging). 2008-09-26 20:32:04 -07:00