./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2741,6 +2742,10 @@ void server_options(char **args, int *argc_p)
+@@ -2748,6 +2749,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = safe_arg("--compress-choice", compress_choice);
if (am_sender) {
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -338,6 +338,7 @@ detailed description below for a complete description.
+@@ -342,6 +342,7 @@ has its own detailed description later in this man page.
--relative, -R use relative path names
--no-implied-dirs don't send implied dirs with --relative
--backup, -b make backups (see --suffix & --backup-dir)
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
--update, -u skip files that are newer on the receiver
-@@ -869,6 +870,13 @@ your home directory (remove the '=' for that).
- trailing inclusion/exclusion of `*`, the auto-added rule would never be
- reached).
+@@ -903,6 +904,13 @@ your home directory (remove the '=' for that).
+ enough priority to be effective (e.g., if your rules specify a trailing
+ inclusion/exclusion of `*`, the auto-added rule would never be reached).
-+0. --backup-deleted
++0. `--backup-deleted`
+
+ With this option, deleted destination files are renamed, while modified
+ destination files are not. Otherwise, this option behaves the same as
-+ `--backup`, described above. Note that if `--backup` is also specified,
-+ whichever option is specified last takes precedence.
++ [`--backup`](#opt), described above. Note that if [`--backup`](#opt) is
++ also specified, whichever option is specified last takes precedence.
+
0. `--backup-dir=DIR`
- This implies the `--backup` option, and tells rsync to store all
+ This implies the [`--backup`](#opt) option, and tells rsync to store all
diff --git a/rsync.c b/rsync.c
--- a/rsync.c
+++ b/rsync.c
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -2209,6 +2217,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2216,6 +2224,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2230,6 +2240,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2237,6 +2247,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (check_filter(elp, FLOG, dir, 1) < 0)
goto options_rejected;
}
}
if (!backup_suffix)
-@@ -2241,6 +2259,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2248,6 +2266,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
size_t len;
make_backups = 1; /* --backup-dir implies --backup */
-@@ -2277,6 +2309,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2284,6 +2316,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
"P *%s", backup_suffix);
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (make_backups && !backup_dir)
omit_dir_times = -1; /* Implied, so avoid -O to sender. */
-@@ -2726,11 +2786,20 @@ void server_options(char **args, int *argc_p)
+@@ -2733,11 +2793,20 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = safe_arg("", backup_dir);
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -340,7 +340,9 @@ detailed description below for a complete description.
+@@ -344,7 +344,9 @@ has its own detailed description later in this man page.
--backup, -b make backups (see --suffix & --backup-dir)
--backup-deleted make backups only of deleted files
--backup-dir=DIR make backups into hierarchy based in DIR
--update, -u skip files that are newer on the receiver
--inplace update destination files in-place
--append append data onto shorter files
+@@ -925,6 +927,11 @@ your home directory (remove the '=' for that).
+ daemon is the receiver, the backup dir cannot go outside the module's path
+ hierarchy, so take extra care not to delete it or copy into it.
+
++0. `--backup-dir-dels=DIR`
++
++ Works like [`--backup-dir`](#opt) except for deleted files in conjunction
++ with the [`--backup-deleted`](#opt) option.
++
+ 0. `--suffix=SUFFIX`
+
+ This option allows you to override the default backup suffix used with the
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
- OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR,
+ OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR, OPT_SUMFILES,
- OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
OPT_STOP_AFTER, OPT_STOP_AT,
OPT_REFUSED_BASE = 9000};
@@ -733,6 +734,7 @@ static struct poptOption long_options[] = {
{"block-size", 'B', POPT_ARG_STRING, 0, OPT_BLOCK_SIZE, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1729,6 +1731,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1736,6 +1738,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
break;
case OPT_INFO:
arg = poptGetOptArg(pc);
parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
-@@ -2074,6 +2093,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2081,6 +2100,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -332,6 +332,7 @@ detailed description below for a complete description.
+@@ -336,6 +336,7 @@ has its own detailed description later in this man page.
--quiet, -q suppress non-error messages
--no-motd suppress daemon-mode MOTD
--checksum, -c skip based on checksum, not mod-time & size
--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
--recursive, -r recurse into directories
-@@ -711,6 +712,8 @@ your home directory (remove the '=' for that).
+@@ -715,6 +716,8 @@ your home directory (remove the '=' for that).
file that has the same size as the corresponding sender's file: files with
either a changed size or a changed checksum are selected for transfer.
-+ See also the `--sumfiles` option for a way to use cached checksum data.
++ See also the [`--sumfiles`](#opt) option for a way to use cached checksum data.
+
Note that rsync always verifies that each _transferred_ file was correctly
reconstructed on the receiving side by checking a whole-file checksum that
is generated as the file is transferred, but that automatic
-@@ -721,6 +724,38 @@ your home directory (remove the '=' for that).
- can be overridden using either the `--checksum-choice` (`--cc`) option or an
- environment variable that is discussed in that option's section.
+@@ -726,6 +729,38 @@ your home directory (remove the '=' for that).
+ option or an environment variable that is discussed in that option's
+ section.
+0. `--sumfiles=MODE`
+
+ This option tells rsync to make use of any cached checksum information it
+ finds in per-directory .rsyncsums files when the current transfer is using
-+ the `--checksum` option. If the checksum data is up-to-date, it is used
-+ instead of recomputing it, saving both disk I/O and CPU time. If the
++ the [`--checksum`](#opt) option. If the checksum data is up-to-date, it is
++ used instead of recomputing it, saving both disk I/O and CPU time. If the
+ checksum data is missing or outdated, the checksum is computed just as it
+ would be if `--sumfiles` was not specified.
+
+ or update these files, but there is a perl script in the support directory
+ named "rsyncsums" that can be used for that.
+
-+ This option has no effect unless `--checksum`, `-c` was also specified. It
-+ also only affects the current side of the transfer, so if you want the
-+ remote side to parse its own .rsyncsums files, specify the option via
-+ `--remote-option` (`-M`) (e.g. "`-M--sumfiles=lax`").
++ This option has no effect unless [`--checksum`](#opt) (`-c`) was also
++ specified. It also only affects the current side of the transfer, so if
++ you want the remote side to parse its own .rsyncsums files, specify the
++ option via [`--remote-option`](#opt) (`-M`) (e.g. "`-M--sumfiles=lax`").
+
+ To avoid transferring the system's checksum files, you can use an exclude
-+ (e.g. `--exclude=.rsyncsums`). To make this easier to type, you can use a
-+ popt alias. For instance, adding the following line in your ~/.popt file
-+ defines a `--cs` option that enables lax checksum files and excludes the
-+ checksum files:
++ (e.g. [`--exclude=.rsyncsums`](#opt)). To make this easier to type, you
++ can use a popt alias. For instance, adding the following line in your
++ ~/.popt file defines a `--cs` option that enables lax checksum files and
++ excludes the checksum files:
+
+ > rsync alias --cs -c --sumfiles=lax -M--sumfiles=lax -f-_.rsyncsums
+
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -419,6 +419,19 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
+@@ -422,6 +422,19 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
the max connections limit is not exceeded for the modules sharing the lock
file. The default is `/var/run/rsyncd.lock`.
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -1733,7 +1733,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1740,7 +1740,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
case OPT_SUMFILES:
arg = poptGetOptArg(pc);
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -735,9 +735,13 @@ your home directory (remove the '=' for that).
+@@ -740,9 +740,13 @@ your home directory (remove the '=' for that).
The MODE value is either "lax", for relaxed checking (which compares size
and mtime), "strict" (which also compares ctime and inode), or "none" to
+ ignore any .rsyncsums files ("none" is the default).
+ If you want rsync to create and/or update these files, specify a prefixed
+ plus ("+lax" or "+strict"). Adding a second prefixed '+' causes the
-+ checksum-file updates to happen even when the transfer is in `--dry-run`
++ checksum-file updates to happen even when the transfer is in [`--dry-run`](#opt)
+ mode ("++lax" or "++strict"). There is also a perl script in the support
+ directory named "rsyncsums" that can be used to update the .rsyncsums
+ files.
- This option has no effect unless `--checksum`, `-c` was also specified. It
- also only affects the current side of the transfer, so if you want the
+ This option has no effect unless [`--checksum`](#opt) (`-c`) was also
+ specified. It also only affects the current side of the transfer, so if
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -424,13 +424,15 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
+@@ -427,13 +427,15 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
This parameter tells rsync to make use of any cached checksum information
it finds in per-directory .rsyncsums files when the current transfer is
using the `--checksum` option. The value can be set to either "lax",
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
- OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR,
+ OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR, OPT_CLONE_DEST,
- OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
OPT_STOP_AFTER, OPT_STOP_AT,
OPT_REFUSED_BASE = 9000};
@@ -737,6 +737,7 @@ static struct poptOption long_options[] = {
default:
NOISY_DEATH("Unknown alt_dest_opt type");
}
-@@ -1692,6 +1698,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1699,6 +1705,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
want_dest_type = LINK_DEST;
goto set_dest_dir;
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -419,6 +419,7 @@ detailed description below for a complete description.
+@@ -423,6 +423,7 @@ has its own detailed description later in this man page.
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2399,6 +2400,17 @@ your home directory (remove the '=' for that).
- specified (or implied by `-a`). You can work-around this bug by avoiding
- the `-o` option when sending to an old rsync.
+@@ -2498,6 +2499,18 @@ your home directory (remove the '=' for that).
+ this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
+ old rsync.
+0. `--clone-dest=DIR`
+
-+ This option behaves like `--link-dest`, but unchanged files are reflinked
-+ from _DIR_ to the destination directory. The files do not need to match
-+ in attributes, as the data is cloned separately from the attributes.
++ This option behaves like [`--link-dest`](#opt), but unchanged files are
++ reflinked from _DIR_ to the destination directory. The files do not need
++ to match in attributes, as the data is cloned separately from the
++ attributes.
+
+ If _DIR_ is a relative path, it is relative to the destination directory.
-+ See also `--compare-dest` and `--copy-dest`.
++ See also [`--compare-dest`](#opt) and [`--copy-dest`](#opt).
+
+ All non-regular files are hard-linked (when possible).
+
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -439,6 +439,8 @@ detailed description below for a complete description.
+@@ -443,6 +443,8 @@ has its own detailed description later in this man page.
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
parse_one_refuse_match(0, "write-devices", list_end);
}
-@@ -2902,6 +2906,9 @@ void server_options(char **args, int *argc_p)
+@@ -2909,6 +2913,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -363,6 +363,7 @@ detailed description below for a complete description.
+@@ -367,6 +367,7 @@ has its own detailed description later in this man page.
--owner, -o preserve owner (super-user only)
--group, -g preserve group
--devices preserve device files (super-user only)
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -931,9 +931,10 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
+@@ -934,9 +934,10 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
If you are un-refusing the compress option, you may want to match
"`!compress*`" if you also want to allow the `--compress-level` option.
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -2788,6 +2790,9 @@ void server_options(char **args, int *argc_p)
+@@ -2795,6 +2797,9 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -413,6 +413,7 @@ detailed description below for a complete description.
+@@ -417,6 +417,7 @@ has its own detailed description later in this man page.
--contimeout=SECONDS set daemon connection timeout in seconds
--ignore-times, -I don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
-@@ -673,6 +674,14 @@ your home directory (remove the '=' for that).
+@@ -677,6 +678,14 @@ your home directory (remove the '=' for that).
after using another mirroring system which may not preserve timestamps
exactly.
+0. `--date-only`
+
+ Normally rsync will skip any files that are already the same size and have
-+ the same modification time-stamp. With the --date-only option, files will
++ the same modification time-stamp. With the `--date-only` option, files will
+ be skipped if they have the same timestamp, regardless of size. This may be
+ useful when the remote files have passed through a size-changing filter,
+ e.g. for encryption.
./configure
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
+ OPT_NO_DB, OPT_DBONLY,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR,
- OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
OPT_STOP_AFTER, OPT_STOP_AT,
@@ -733,6 +740,10 @@ static struct poptOption long_options[] = {
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -379,6 +379,9 @@ detailed description below for a complete description.
+@@ -383,6 +383,9 @@ has its own detailed description later in this man page.
--dry-run, -n perform a trial run with no changes made
--whole-file, -W copy files whole (w/o delta-xfer algorithm)
--checksum-choice=STR choose the checksum algorithm (aka --cc)
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2774,8 +2776,14 @@ void server_options(char **args, int *argc_p)
+@@ -2781,8 +2783,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -417,6 +417,8 @@ detailed description below for a complete description.
+@@ -421,6 +421,8 @@ has its own detailed description later in this man page.
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
--detect-renamed try to find renamed files to speed the xfer
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2332,6 +2334,17 @@ your home directory (remove the '=' for that).
+@@ -2430,6 +2432,20 @@ your home directory (remove the '=' for that).
otential alternate-basis files will be removed as the transfer progresses.
- This option conflicts with `--inplace` and `--append`.
+ This option conflicts with [`--inplace`](#opt) and [`--append`](#opt).
-+0. ``--detect-renamed-lax` This version of `--detect-renamed` makes rsync
-+ hard-link `dest/D` to `dest/S` without verifying that `src/S` and
-+ `dest/S` have the same data. This poses a significant risk of corrupting
-+ the destination by representing a new source file by an unrelated
-+ destination file that coincidentally passes the quick check with the source
-+ file. Use this option only if you accept the risk and disk I/O is a
-+ bottleneck.
++0. `--detect-renamed-lax`
+
-+0. ``--detect-moved`` A less risky variant of `--detect-renamed-lax` that only
-+ uses a destination file that has the same basename as the new source file.
++ This version of [`--detect-renamed`](#opt) makes rsync hard-link `dest/D`
++ to `dest/S` without verifying that `src/S` and `dest/S` have the same data.
++ This poses a significant risk of corrupting the destination by representing
++ a new source file by an unrelated destination file that coincidentally
++ passes the quick check with the source file. Use this option only if you
++ accept the risk and disk I/O is a bottleneck.
++
++0. `--detect-moved`
++
++ A less risky variant of [`--detect-renamed-lax`](#opt) that only uses a
++ destination file that has the same basename as the new source file.
+
0. `--compare-dest=DIR`
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2356,7 +2358,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2363,7 +2365,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2365,6 +2367,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2372,6 +2374,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
delay_updates ? "delay-updates" : "partial-dir");
return 0;
}
-@@ -2771,6 +2774,8 @@ void server_options(char **args, int *argc_p)
+@@ -2778,6 +2781,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -416,6 +416,7 @@ detailed description below for a complete description.
+@@ -420,6 +420,7 @@ has its own detailed description later in this man page.
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2315,6 +2316,22 @@ your home directory (remove the '=' for that).
- fuzzy-match files, so either use `--delete-after` or specify some filename
- exclusions if you need to prevent this.
+@@ -2413,6 +2414,22 @@ your home directory (remove the '=' for that).
+ potential fuzzy-match files, so either use [`--delete-after`](#opt) or
+ specify some filename exclusions if you need to prevent this.
+0. `--detect-renamed`
+
+
+ By default, alternate-basis files are hard-linked into a directory named
+ ".~tmp~" in each file's destination directory, but if you've specified the
-+ `--partial-dir` option, that directory will be used instead. These
++ [`--partial-dir`](#opt) option, that directory will be used instead. These
+ otential alternate-basis files will be removed as the transfer progresses.
-+ This option conflicts with `--inplace` and `--append`.
++ This option conflicts with [`--inplace`](#opt) and [`--append`](#opt).
+
0. `--compare-dest=DIR`
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -404,6 +404,7 @@ detailed description below for a complete description.
+@@ -408,6 +408,7 @@ has its own detailed description later in this man page.
--partial keep partially transferred files
--partial-dir=DIR put a partially transferred file into DIR
--delay-updates put all updated files into place at end
--prune-empty-dirs, -m prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -3087,6 +3088,16 @@ your home directory (remove the '=' for that).
- update algorithm that is even more atomic (it uses `--link-dest` and a
- parallel hierarchy of files).
+@@ -3207,6 +3208,17 @@ your home directory (remove the '=' for that).
+ update algorithm that is even more atomic (it uses [`--link-dest`](#opt)
+ and a parallel hierarchy of files).
+0. `--direct-io`
+
+ This option opens files with a direct-I/O flag that makes the file I/O
+ avoid the buffer cache. The option only affects one side of the transfer
+ (unless the transfer is local). If you want it to affect both sides, use
-+ the `--remote-option` (`-M`) option to specify it for the remote side. For
-+ instance, this specifies it for both sides:
++ the [`--remote-option`](#opt) (`-M`) option to specify it for the remote
++ side. For instance, this specifies it for both sides (via brace
++ expansion):
+
+ > rsync -av {,-M}--direct-io /src/ host:/dest/
+
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -341,6 +341,7 @@ detailed description below for a complete description.
+@@ -345,6 +345,7 @@ has its own detailed description later in this man page.
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
--update, -u skip files that are newer on the receiver
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2670,6 +2688,9 @@ void server_options(char **args, int *argc_p)
+@@ -2677,6 +2695,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
goto oom;
-@@ -2765,6 +2786,16 @@ void server_options(char **args, int *argc_p)
+@@ -2772,6 +2793,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -356,6 +356,7 @@ detailed description below for a complete description.
+@@ -360,6 +360,7 @@ has its own detailed description later in this man page.
--keep-dirlinks, -K treat symlinked dir on receiver as dir
--hard-links, -H preserve hard links
--perms, -p preserve permissions
--executability, -E preserve executability
--chmod=CHMOD affect file and/or directory permissions
--acls, -A preserve ACLs (implies --perms)
-@@ -396,7 +397,10 @@ detailed description below for a complete description.
+@@ -400,7 +401,10 @@ has its own detailed description later in this man page.
--ignore-missing-args ignore missing source args without error
--delete-missing-args delete missing source args from destination
--ignore-errors delete even if there are I/O errors
--max-delete=NUM don't delete more than NUM files
--max-size=SIZE don't transfer any file larger than SIZE
--min-size=SIZE don't transfer any file smaller than SIZE
-@@ -727,6 +731,7 @@ your home directory (remove the '=' for that).
+@@ -732,6 +736,7 @@ your home directory (remove the '=' for that).
recursion and want to preserve almost everything. Be aware that it does
**not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
-+ It also does **not** imply `--fileflags`.
++ It also does **not** imply [`--fileflags`](#opt).
- The only exception to the above equivalence is when
- `--files-from` is specified, in which case `-r` is not implied.
-@@ -1109,7 +1114,7 @@ your home directory (remove the '=' for that).
+ The only exception to the above equivalence is when [`--files-from`](#opt)
+ is specified, in which case [`-r`](#opt--recursive) is not implied.
+@@ -1188,7 +1193,7 @@ your home directory (remove the '=' for that).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
-- `--force` or `--delete` is in effect).
-+ `--force-delete` or `--delete` is in effect).
+- [`--force`](#opt) or [`--delete`](#opt) is in effect).
++ [`--force-delete`](#opt) or [`--delete`](#opt) is in effect).
- See also `--keep-dirlinks` for an analogous option for the receiving side.
+ See also [`--keep-dirlinks`](#opt) for an analogous option for the
+ receiving side.
+@@ -1383,6 +1388,37 @@ your home directory (remove the '=' for that).
+ those used by [`--fake-super`](#opt)) unless you repeat the option (e.g. `-XX`).
+ This "copy all xattrs" mode cannot be used with [`--fake-super`](#opt).
-@@ -1295,6 +1300,29 @@ your home directory (remove the '=' for that).
- those used by `--fake-super`) unless you repeat the option (e.g. `-XX`).
- This "copy all xattrs" mode cannot be used with `--fake-super`.
-
-+0. `--fileflags` This option causes rsync to update the file-flags to be the
-+ same as the source files and directories (if your OS supports the
-+ **chflags**(2) system call). Some flags can only be altered by the
-+ super-user and some might only be unset below a certain secure-level
-+ (usually single-user mode). It will not make files alterable that are set
-+ to immutable on the receiver. To do that, see `--force-change`,
-+ `--force-uchange`, and `--force-schange`.
++0. `--fileflags`
++
++ This option causes rsync to update the file-flags to be the same as the
++ source files and directories (if your OS supports the **chflags**(2) system
++ call). Some flags can only be altered by the super-user and some might
++ only be unset below a certain secure-level (usually single-user mode). It
++ will not make files alterable that are set to immutable on the receiver.
++ To do that, see [`--force-change`](#opt), [`--force-uchange`](#opt), and
++ [`--force-schange`](#opt).
++
++0. `--force-change`
+
-+0. `--force-change` This option causes rsync to disable both user-immutable
-+ and system-immutable flags on files and directories that are being updated
-+ or deleted on the receiving side. This option overrides `--force-uchange`
-+ and `--force-schange`.
++ This option causes rsync to disable both user-immutable and
++ system-immutable flags on files and directories that are being updated or
++ deleted on the receiving side. This option overrides
++ [`--force-uchange`](#opt) and [`--force-schange`](#opt).
+
-+0. `--force-uchange` This option causes rsync to disable user-immutable flags
-+ on files and directories that are being updated or deleted on the receiving
-+ side. It does not try to affect system flags. This option overrides
-+ `--force-change` and `--force-schange`.
++0. `--force-uchange`
+
-+0. `--force-schange` This option causes rsync to disable system-immutable
-+ flags on files and directories that are being updated or deleted on the
-+ receiving side. It does not try to affect user flags. This option
-+ overrides `--force-change` and `--force-uchange`.
++ This option causes rsync to disable user-immutable flags on files and
++ directories that are being updated or deleted on the receiving side. It
++ does not try to affect system flags. This option overrides
++ [`--force-change`](#opt) and [`--force-schange`](#opt).
++
++0. `--force-schange`
++
++ This option causes rsync to disable system-immutable flags on files and
++ directories that are being updated or deleted on the receiving side. It
++ does not try to affect user flags. This option overrides
++ [`--force-change`](#opt) and [`--force-uchange`](#opt).
+
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1778,7 +1806,7 @@ your home directory (remove the '=' for that).
- option a step farther: each missing arg will become a deletion request of
- the corresponding destination file on the receiving side (should it exist).
- If the destination file is a non-empty directory, it will only be
-- successfully deleted if `--force` or `--delete` are in effect. Other than
-+ successfully deleted if `--force-delete` or `--delete` are in effect. Other than
- that, this option is independent of any other type of delete processing.
+@@ -1869,8 +1905,8 @@ your home directory (remove the '=' for that).
+ [`--ignore-missing-args`](#opt) option a step farther: each missing arg
+ will become a deletion request of the corresponding destination file on the
+ receiving side (should it exist). If the destination file is a non-empty
+- directory, it will only be successfully deleted if [`--force`](#opt) or
+- [`--delete`](#opt) are in effect. Other than that, this option is
++ directory, it will only be successfully deleted if [`--force-delete`](#opt)
++ or [`--delete`](#opt) are in effect. Other than that, this option is
+ independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1789,15 +1817,16 @@ your home directory (remove the '=' for that).
- Tells `--delete` to go ahead and delete files even when there are I/O
- errors.
+@@ -1881,14 +1917,14 @@ your home directory (remove the '=' for that).
+ Tells [`--delete`](#opt) to go ahead and delete files even when there are
+ I/O errors.
-0. `--force`
-+0. `--force-delete`
++0. `--force-delete`, `--force`
This option tells rsync to delete a non-empty directory when it is to be
replaced by a non-directory. This is only relevant if deletions are not
- active (see `--delete` for details).
+ active (see [`--delete`](#opt) for details).
- Note for older rsync versions: `--force` used to still be required when
-- using `--delete-after`, and it used to be non-functional unless the
-- `--recursive` option was also enabled.
-+ This option can be abbreviated `--force` for backward compatibility. Note
-+ that some older rsync versions used to still require `--force` when using
-+ `--delete-after`, and it used to be non-functional unless the `--recursive`
-+ option was also enabled.
+- using [`--delete-after`](#opt), and it used to be non-functional unless the
++ Note that some older rsync versions used to require `--force` when using
++ [`--delete-after`](#opt), and it used to be non-functional unless the
+ [`--recursive`](#opt) option was also enabled.
0. `--max-delete=NUM`
-
-@@ -2775,7 +2804,7 @@ your home directory (remove the '=' for that).
- output of other verbose messages).
+@@ -2881,7 +2917,7 @@ your home directory (remove the '=' for that).
+ also turns on the output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
- format is like the string `YXcstpoguax`, where **Y** is replaced by the type
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -1318,7 +1318,9 @@ your home directory (remove the '=' for that).
+@@ -1406,7 +1406,9 @@ your home directory (remove the '=' for that).
> --chmod=D2775,F664
It is also legal to specify multiple `--chmod` options, as each additional
+ permissions of files matching a pattern, use an include filter with the `m`
+ modifier, which takes effect before any `--chmod` options.
- See the `--perms` and `--executability` options for how the resulting
- permission value can be applied to the files in the transfer.
-@@ -2711,6 +2713,10 @@ your home directory (remove the '=' for that).
- complaint about wildcard characters, but a modern rsync handles this
- automatically.
+ See the [`--perms`](#opt) and [`--executability`](#opt) options for how the
+ resulting permission value can be applied to the files in the transfer.
+@@ -2813,6 +2815,10 @@ your home directory (remove the '=' for that).
+ avoid a complaint about wildcard characters, but a modern rsync handles
+ this automatically.
+ To change ownership of files matching a pattern, use an include filter with
+ a `o` or `g` modifier, which take effect before uid/gid mapping and
-+ therefore *can* be mixed with `--usermap` and `--groupmap`.
++ therefore *can* be mixed with [`--usermap` & `--groupmap`](#opt--usermap).
+
0. `--timeout=SECONDS`
This option allows you to set a maximum I/O timeout in seconds. If no data
-@@ -3715,6 +3721,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
- rules that exclude things like "CVS" and "`*.o`" are marked as perishable,
- and will not prevent a directory that was removed on the source from being
- deleted on the destination.
-+- An `m(CHMOD)` on an include rule tweaks the permissions of matching
-+ source files in the same way as `--chmod`. This happens before any tweaks
-+ requested via `--chmod` options.
-+- An `o(USER)` on an include rule pretends that matching source files are
-+ owned by `USER` (a name or numeric uid). This happens before any uid mapping
-+ by name or `--usermap`.
-+- A `g(GROUP)` on an include rule pretends that matching source files are
-+ owned by `GROUP` (a name or numeric gid). This happens before any gid
-+ mapping by name or `--groupmap`.
+@@ -3859,6 +3865,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
+ like "CVS" and "`*.o`" are marked as perishable, and will not prevent a
+ directory that was removed on the source from being deleted on the
+ destination.
++- An `m(CHMOD)` on an include rule tweaks the permissions of matching source
++ files in the same way as [`--chmod`](#opt). This happens before any tweaks
++ requested via [`--chmod`](#opt).
++- An `o(USER)` on an include rule pretends that matching source files are owned
++ by `USER` (a name or numeric uid). This happens before any uid mapping by
++ name or [`--usermap`](#opt).
++- A `g(GROUP)` on an include rule pretends that matching source files are owned
++ by `GROUP` (a name or numeric gid). This happens before any gid mapping by
++ name or [`--groupmap`](#opt--usermap).
- An `x` indicates that a rule affects xattr names in xattr copy/delete
operations (and is thus ignored when matching file/dir names). If no
xattr-matching rules are specified, a default xattr filtering rule is used
-@@ -3772,6 +3787,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -3916,6 +3931,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
rules in the file must not specify sides (via a modifier or a rule prefix
such as `hide`).
+The attribute-affecting modifiers `m`, `o`, and `g` work only in client filters
+(not in daemon filters), and only the modifiers of the first matching rule are
-+applied. As an example, assuming `--super` is enabled, the rule
++applied. As an example, assuming [`--super`](#opt) is enabled, the rule
+"`+o(root),g(root),m(go=) *~`" would ensure that all "backup"
+files belong to root and are not accessible to anyone else.
+
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2092,6 +2101,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2099,6 +2108,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -2691,6 +2709,11 @@ void server_options(char **args, int *argc_p)
+@@ -2698,6 +2716,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -361,6 +361,8 @@ detailed description below for a complete description.
+@@ -365,6 +365,8 @@ has its own detailed description later in this man page.
--chmod=CHMOD affect file and/or directory permissions
--acls, -A preserve ACLs (implies --perms)
--xattrs, -X preserve extended attributes
--owner, -o preserve owner (super-user only)
--group, -g preserve group
--devices preserve device files (super-user only)
-@@ -1323,6 +1325,47 @@ your home directory (remove the '=' for that).
- receiving side. It does not try to affect user flags. This option
- overrides `--force-change` and `--force-uchange`.
+@@ -1419,6 +1421,47 @@ your home directory (remove the '=' for that).
+ does not try to affect user flags. This option overrides
+ [`--force-change`](#opt) and [`--force-uchange`](#opt).
+0. `--hfs-compression`
+
+ com.apple.decmpfs extended attribute and ignore the synthesized data in the
+ file contents.
+
-+ This option implies both `--fileflags` and (--xattrs).
++ This option implies both [`--fileflags`](#opt) and [`--xattrs`](#opt).
+
+0. `--protect-decmpfs`
+
+ operating system that supports HFS+ compression, however, these files will
+ be accessible as usual.
+
-+ This option implies `--fileflags` and `--xattrs`.
++ This option implies [`--fileflags`](#opt) and [`--xattrs`](#opt).
+
0. `--chmod=CHMOD`
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
{"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 },
{"from0", '0', POPT_ARG_VAL, &eol_nulls, 1, 0, 0},
{"no-from0", 0, POPT_ARG_VAL, &eol_nulls, 0, 0, 0},
-@@ -2801,6 +2804,9 @@ void server_options(char **args, int *argc_p)
+@@ -2808,6 +2811,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -436,6 +436,7 @@ detailed description below for a complete description.
+@@ -440,6 +440,7 @@ has its own detailed description later in this man page.
--old-args disable the modern arg-protection idiom
--protect-args, -s no space-splitting; wildcard chars only
--copy-as=USER[:GROUP] specify user & optional group for the copy
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -2263,6 +2264,12 @@ your home directory (remove the '=' for that).
+@@ -2361,6 +2362,12 @@ your home directory (remove the '=' for that).
> sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/
./configure
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
- OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR,
+ OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR, OPT_LINK_BY_HASH,
- OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
+ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
OPT_STOP_AFTER, OPT_STOP_AT,
OPT_REFUSED_BASE = 9000};
@@ -737,6 +739,7 @@ static struct poptOption long_options[] = {
if (am_daemon) {
#ifdef ICONV_OPTION
if (!*lp_charset(module_id))
-@@ -1845,6 +1851,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1852,6 +1858,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
case OPT_STOP_AFTER: {
long val;
arg = poptGetOptArg(pc);
-@@ -2208,6 +2228,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2215,6 +2235,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2877,6 +2899,12 @@ void server_options(char **args, int *argc_p)
+@@ -2884,6 +2906,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--no-W";
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -419,6 +419,7 @@ detailed description below for a complete description.
+@@ -423,6 +423,7 @@ has its own detailed description later in this man page.
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2399,6 +2400,50 @@ your home directory (remove the '=' for that).
- specified (or implied by `-a`). You can work-around this bug by avoiding
- the `-o` option when sending to an old rsync.
+@@ -2498,6 +2499,50 @@ your home directory (remove the '=' for that).
+ this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
+ old rsync.
+0. `--link-by-hash=DIR`
+
-+ This option hard links the destination files into `DIR`, a link farm
++ This option hard links the destination files into _DIR_, a link farm
+ arranged by MD5 file hash. The result is that the system will only store
+ (usually) one copy of the unique contents of each file, regardless of the
+ file's name (it will use extra files if the links overflow the available
+ this if you don't care about preserving those extra file attributes (or if
+ they are always the same for identical files).
+
-+ The DIR is relative to the destination directory, so either specify a full
++ The _DIR_ is relative to the destination directory, so either specify a full
+ path to the hash hierarchy, or specify a relative path that puts the links
+ outside the destination (e.g. "../links").
+
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -354,6 +354,23 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
+@@ -357,6 +357,23 @@ the values of parameters. See the GLOBAL PARAMETERS section for more details.
is 0, which means no limit. A negative value disables the module. See
- also the "lock file" parameter.
+ also the "[lock file](#)" parameter.
+0. `link by hash dir`
+
fast fallback for the case where xxHash libraries are not available at
build time.
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"modify-window", '@', POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 },
{"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 },
-@@ -2277,6 +2279,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2284,6 +2286,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (make_backups && !backup_dir)
omit_dir_times = -1; /* Implied, so avoid -O to sender. */
-@@ -2773,6 +2778,8 @@ void server_options(char **args, int *argc_p)
+@@ -2780,6 +2785,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--size-only";
if (do_stats)
args[ac++] = "--stats";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -371,6 +371,7 @@ detailed description below for a complete description.
+@@ -375,6 +375,7 @@ has its own detailed description later in this man page.
--crtimes, -N preserve create times (newness)
--omit-dir-times, -O omit directories from --times
--omit-link-times, -J omit symlinks from --times
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
-@@ -1448,6 +1449,11 @@ your home directory (remove the '=' for that).
+@@ -1530,6 +1531,11 @@ your home directory (remove the '=' for that).
This tells rsync to omit symlinks when it is preserving modification,
access, and create times.
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -455,6 +455,7 @@ detailed description below for a complete description.
+@@ -459,6 +459,7 @@ has its own detailed description later in this man page.
--early-input=FILE use FILE for daemon's early exec input
--list-only list the files instead of copying them
--bwlimit=RATE limit socket I/O bandwidth
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -149,7 +149,19 @@ rsync daemon by leaving off the module name:
+@@ -152,7 +152,19 @@ rsync daemon by leaving off the module name:
> rsync somehost.mydomain.com::
+
+See the following section for even more usage details.
- # ADVANCED USAGE
+ ## ADVANCED USAGE
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
--- a/rsyncd.conf.5.md
+++ b/rsyncd.conf.5.md
-@@ -136,6 +136,21 @@ a literal % into a value is to use %%.
+@@ -139,6 +139,21 @@ a literal % into a value is to use %%.
You can override the default backlog value when the daemon listens for
connections. It defaults to 5.
+ 65535, then 65535 is used (which is a limitation of SLP). Using 3600
+ (one hour) is a good number if you tend to change your configuration.
+
- # MODULE PARAMETERS
+ ## MODULE PARAMETERS
After the global parameters you should define a number of modules, each module
-@@ -1173,6 +1188,7 @@ A more sophisticated example would be:
+@@ -1176,6 +1191,7 @@ A more sophisticated example would be:
> max connections = 4
> syslog facility = local5
> pid file = /var/run/rsyncd.pid
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2776,6 +2778,8 @@ void server_options(char **args, int *argc_p)
+@@ -2783,6 +2785,8 @@ void server_options(char **args, int *argc_p)
} else {
if (skip_compress)
args[ac++] = safe_arg("--skip-compress", skip_compress);
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -386,6 +386,7 @@ detailed description below for a complete description.
+@@ -390,6 +390,7 @@ has its own detailed description later in this man page.
--existing skip creating new files on receiver
--ignore-existing skip updating files that exist on receiver
--remove-source-files sender removes synchronized files (non-dir)
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before xfer, not during
-@@ -1669,6 +1670,16 @@ your home directory (remove the '=' for that).
+@@ -1755,6 +1756,17 @@ your home directory (remove the '=' for that).
Starting with 3.1.0, rsync will skip the sender-side removal (and output an
error) if the file's size or modify time has not stayed unchanged.
+0. `--source-backup`
+
+ Makes the sender back up the source files it removes due to
-+ `--remove-source-files`. This option is independent of `--backup` but uses
-+ the same `--backup-dir` and `--suffix` settings, if any. With
-+ `--backup-dir`, rsync looks for each file's backup dir relative to the
-+ source argument the file came from. Consequently, if the `--backup-dir`
-+ path is relative, each source argument gets a separate backup dir at that
-+ path relative to the argument.
++ [`--remove-source-files`](#opt). This option is independent of
++ [`--backup`](#opt) but uses the same [`--backup-dir`](#opt) and
++ [`--suffix`](#opt) settings, if any. With [`--backup-dir`](#opt), rsync
++ looks for each file's backup dir relative to the source argument the file
++ came from. Consequently, if the [`--backup-dir`](#opt) path is relative,
++ each source argument gets a separate backup dir at that path relative to
++ the argument.
+
0. `--delete`
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
{"outbuf", 0, POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
{"remote-option", 'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
-@@ -2400,6 +2406,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2407,6 +2413,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2788,6 +2804,25 @@ void server_options(char **args, int *argc_p)
+@@ -2795,6 +2811,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -413,6 +413,7 @@ detailed description below for a complete description.
+@@ -417,6 +417,7 @@ has its own detailed description later in this man page.
--contimeout=SECONDS set daemon connection timeout in seconds
--ignore-times, -I don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
-@@ -461,6 +462,8 @@ detailed description below for a complete description.
+@@ -465,6 +466,8 @@ has its own detailed description later in this man page.
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
-@@ -3358,6 +3361,36 @@ your home directory (remove the '=' for that).
- `--write-batch`. If _FILE_ is `-`, the batch data will be read from
- standard input. See the "BATCH MODE" section for details.
+@@ -3482,6 +3485,36 @@ your home directory (remove the '=' for that).
+ [`--write-batch`](#opt). If _FILE_ is `-`, the batch data will be read
+ from standard input. See the "BATCH MODE" section for details.
+0. `--source-filter=COMMAND`
+
+ when writing the data to stdout.
+
+ Example: `--source-filter="gzip -9"` will cause remote files to be
-+ compressed. Use of `--source-filter` automatically enables `--whole-file`.
-+ If your filter does not output the same number of bytes that it received on
-+ input, you should use `--times-only` to disable size and content checks on
-+ subsequent rsync runs.
++ compressed. Use of `--source-filter` automatically enables
++ [`--whole-file`](#opt). If your filter does not output the same number of
++ bytes that it received on input, you should use `--times-only` to
++ disable size and content checks on subsequent rsync runs.
+
+0. `--dest-filter=COMMAND`
+
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
{"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0},
{"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 },
{"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 },
-@@ -2708,6 +2710,12 @@ void server_options(char **args, int *argc_p)
+@@ -2715,6 +2717,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -374,6 +374,7 @@ detailed description below for a complete description.
+@@ -378,6 +378,7 @@ has its own detailed description later in this man page.
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
--preallocate allocate dest files before writing them
--write-devices write to devices as files (implies --inplace)
--dry-run, -n perform a trial run with no changes made
-@@ -1520,6 +1521,18 @@ your home directory (remove the '=' for that).
- opposed to allocated sequences of null bytes) if the kernel version and
+@@ -1604,6 +1605,18 @@ your home directory (remove the '=' for that).
+ (as opposed to allocated sequences of null bytes) if the kernel version and
filesystem type support creating holes in the allocated data.
+0. `--sparse-block=SIZE`
+
+ Change the block size used to handle sparse files to SIZE bytes. This
-+ option only has an effect if the `--sparse` (`-S`) option was also
++ option only has an effect if the [`--sparse`](#opt) (`-S`) option was also
+ specified. The default block size used by rsync to detect a file hole is
+ 1024 bytes; when the receiver writes data to the destination file and
-+ option `--sparse` is used, rsync checks every 1024-bytes chunk to detect if
-+ they are actually filled with data or not. With certain filesystems,
-+ optimized to receive data streams for example, enlarging this block size
-+ can strongly increase performance. The option can be used to tune this
-+ block size.
++ option [`--sparse`](#opt) is used, rsync checks every 1024-bytes chunk to
++ detect if they are actually filled with data or not. With certain
++ filesystems, optimized to receive data streams for example, enlarging this
++ block size can strongly increase performance. The option can be used to
++ tune this block size.
+
0. `--dry-run`, `-n`
./configure (optional if already run)
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
{"8-bit-output", '8', POPT_ARG_VAL, &allow_8bit_chars, 1, 0, 0 },
-@@ -2446,6 +2448,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2453,6 +2455,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
am_starting_up = 0;
return 1;
-@@ -2894,6 +2914,12 @@ void server_options(char **args, int *argc_p)
+@@ -2901,6 +2921,12 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -463,6 +463,7 @@ detailed description below for a complete description.
+@@ -467,6 +467,7 @@ has its own detailed description later in this man page.
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
--ipv4, -4 prefer IPv4
--ipv6, -6 prefer IPv6
-@@ -3400,6 +3401,25 @@ your home directory (remove the '=' for that).
+@@ -3524,6 +3525,25 @@ your home directory (remove the '=' for that).
free to specify just the local charset for a daemon transfer (e.g.
`--iconv=utf8`).
+ backslashes. Slashes cannot be transliterated because it would cause
+ havoc.
+
-+ If the receiver is invoked over a remote shell, use `--protect-args` to
-+ stop the shell from interpreting any nasty characters in the argument.
++ If the receiver is invoked over a remote shell, use [`--protect-args`](#opt)
++ to stop the shell from interpreting any nasty characters in the argument.
+
0. `--ipv4`, `-4` or `--ipv6`, `-6`
patch -p1 <patches/xxh3-safety-check.diff
make
-based-on: 6b8db0f6440b28d26ef807d17517715c47e62bd9
+based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c