From db5d9af4eab36f0a8cbf4a51e5f6495d928dc2ca Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 6 Jun 2026 11:21:13 +0200 Subject: [PATCH 1/4] qual: remove trailing blank lines at end of files End-of-file whitespace fixes in non-shell files from the pre-commit run. The shell-script reformatting is grouped in 'qual: reformat shell scripts (beautysh)'; the .cache/cppcheck/.gitkeep addition and the .gitignore update are part of 'qual: Add pre-commit flow'. --- TODO | 1 - packaging/solaris/build_pkg.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/TODO b/TODO index 0bc830d96..71f75c24d 100644 --- a/TODO +++ b/TODO @@ -514,4 +514,3 @@ reverse rsync over HTTP Range http://zsync.moria.org.uk/ -- -- - diff --git a/packaging/solaris/build_pkg.sh b/packaging/solaris/build_pkg.sh index 47669ef18..853bc8b00 100755 --- a/packaging/solaris/build_pkg.sh +++ b/packaging/solaris/build_pkg.sh @@ -87,4 +87,3 @@ mv "$FAKE_ROOT/$OUTPUTFILE" . || exit 1 # Comment this out if you want to see, which file structure has been created rm -rf "$FAKE_ROOT" - From dfb183bc7e1fd34ad8bca5b20bc0cb4a8418ed72 Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 7 Jun 2026 16:04:29 +0200 Subject: [PATCH 2/4] qual: Add pre-commit flow --- .cache/cppcheck/.gitkeep | 0 .github/workflows/pre-commit.yml | 118 +++++ .gitignore | 1 + .pre-commit-config.yaml | 146 ++++++ uncrustify.cfg | 853 +++++++++++++++++++++++++++++++ 5 files changed, 1118 insertions(+) create mode 100644 .cache/cppcheck/.gitkeep create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml create mode 100644 uncrustify.cfg diff --git a/.cache/cppcheck/.gitkeep b/.cache/cppcheck/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..f20b32d90 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,118 @@ +--- +name: pre-commit +on: + pull_request: + push: +jobs: + pre-commit: + runs-on: ubuntu-latest + env: + RAW_LOG: pre-commit.log + CS_XML: pre-commit.xml + CPPCHECK_VERSION: 2.21.0 + steps: + # In case we are satisfied with cppcheck in ubuntu-latest + # - run: sudo apt-get update && sudo apt-get install cppcheck uncrustify + # In case we build cppcheck + - run: sudo apt-get update && sudo apt-get install -y build-essential git uncrustify + + # + # Setup cppcheck + # + - name: Restore cppcheck from cache + id: cache-cppcheck + uses: actions/cache/restore@v5 + with: + path: ~/cppcheck-install + key: cppcheck-${{ env.CPPCHECK_VERSION }}-${{ runner.os }}-${{ hashFiles('~/cppcheck-install/cppcheck-build-stamp') }} + + - name: Build and install cppcheck + if: steps.cache-cppcheck.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch ${{ env.CPPCHECK_VERSION }} https://github.com/danmar/cppcheck.git + cd cppcheck + make -j$(nproc) FILESDIR=/usr/local/share/cppcheck + mkdir -p ~/cppcheck-install + make DESTDIR=~/cppcheck-install install FILESDIR=/usr/local/share/cppcheck + echo "$(date +%s)-$(uname -a)" > ~/cppcheck-install/usr/local/share/cppcheck/cppcheck-build-stamp + - name: Install cppcheck from cache or build + run: | + sudo mkdir -p /usr/local/share/cppcheck + sudo cp ~/cppcheck-install/usr/bin/cppcheck /usr/local/bin/ + sudo cp -r ~/cppcheck-install/usr/local/share/cppcheck/* /usr/local/share/cppcheck/ + + - name: Save cppcheck to cache + if: steps.cache-cppcheck.outputs.cache-hit != 'true' + uses: actions/cache/save@v5 + with: + path: ~/cppcheck-install + key: cppcheck-${{ env.CPPCHECK_VERSION }}-${{ runner.os }}-${{ hashFiles('~/cppcheck-install/cppcheck-build-stamp') }} + + # Project specific + - uses: actions/checkout@v6 + + # + # Remove existing cache files (before restoring, after checkout) + # + - run: | + find .cache -type f ! -name .gitkeep -delete + find .cache -type d -empty -delete + + - run: python -m pip install pre-commit + - uses: actions/cache/restore@v5 + if: github.event_name == 'pull_request' + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.base_ref }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache- + - uses: actions/cache/restore@v5 + if: github.event_name != 'pull_request' + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.base_ref }}- + cppcheck-${{ env.CPPCHECK_VERSION }}-cache- + - uses: actions/cache/restore@v5 + with: + path: ~/.cache/pre-commit/ + key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Run pre-commit hooks + env: + # uncrustify is skipped until the formatting rules are clarified + # (uncrustify.cfg is added by this flow, but not enforced yet) + SKIP: no-commit-to-branch,uncrustify + run: | + set -o pipefail + mkdir -p .cache/cppcheck + pre-commit gc + pre-commit run --hook-stage manual --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG} + - uses: actions/cache/save@v5 + if: ${{ ! cancelled() }} + with: + path: .cache/cppcheck + key: cppcheck-${{ env.CPPCHECK_VERSION }}-cache-${{ github.ref_name }}-${{ github.sha }} + - name: Convert Raw Log to Checkstyle format (launch action) + uses: mdeweerd/logToCheckStyle@v2025.1.1 + if: ${{ failure() }} + with: + in: ${{ env.RAW_LOG }} + # out: ${{ env.CS_XML }} + - uses: actions/cache/save@v5 + if: ${{ ! cancelled() }} + with: + path: ~/.cache/pre-commit/ + key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Provide log as artifact + uses: actions/upload-artifact@v7 + if: ${{ ! cancelled() }} + with: + name: precommit-logs + path: | + ${{ env.RAW_LOG }} + ${{ env.CS_XML }} + retention-days: 2 diff --git a/.gitignore b/.gitignore index 370e78d02..d9285fdfd 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ aclocal.m4 .deps /*.exe *.dSYM/ +/.cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..5a229055c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,146 @@ +--- +exclude: + (?x)^( + old_versions/| + popt/| + zlib/| + rsync-web/| + params\.c$| + config\.guess$|config\.status$|config\.sub$| + configure$|configure\.sh$| + install-sh$| + shconfig$|shconfig\.in$) +repos: + - repo: https://github.com/executablebooks/mdformat + # Do this before other tools "fixing" the line endings + rev: 2d496dbc18e31b83a1596685347ffe0b6041daf0 # 1.0.0 + hooks: + - id: mdformat + name: Format Markdown + stages: [manual] + entry: mdformat # Executable to run, with fixed options + language: python + types: [markdown] + # --wrap 80 dropped (commented): upstream-maintained markdown has long + # lines the hook would rewrite (rsync.1.md, rsyncd.conf.5.md, NEWS.md, + # testsuite/README.md) + # args: [--wrap, '80', --number] + args: [--number] + additional_dependencies: + - mdformat-toc + - mdformat-gfm + - mdformat-beautysh + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0 + hooks: + # - id: no-commit-to-branch + # args: [--branch, main] + - id: debug-statements + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-json + - id: mixed-line-ending + - id: check-builtin-literals + - id: check-ast + - id: check-merge-conflict + - id: check-executables-have-shebangs + # check-shebang-scripts-are-executable is intentionally not enabled: + # scripts keep their shebangs without the executable bit (upstream + # #1189) — they are not meant to be invoked directly, so modes stay + # as in master. + - id: check-docstring-first + - id: fix-byte-order-marker + - id: check-case-conflict + - id: check-toml + - repo: https://github.com/lovesegfault/beautysh.git + rev: 885128fe2600889194c69fa19326cf55a3462777 # v6.4.3 + hooks: + - id: beautysh + exclude: ^(config.guess|config.sub|rsync-ssl)$ + args: [--indent-size=4] + additional_dependencies: + - setuptools + - repo: https://github.com/codespell-project/codespell + rev: 57b21406f092110c18776e39b0bda50d37c945c8 # v2.4.3 + hooks: + - id: codespell + # scripts/updateCodespellIgnoreFile.sh updates the ignore file. + # deapon-parm.awk no longer exists on master; config.guess/config.sub + # stay excluded; vendored zlib/ and popt/ are not corrected. + exclude: ^(configure\.ac|config\.guess|config\.sub|wildtest\.txt)$|^(zlib|popt)/ + args: + - --builtin=clear,informal,names + # Sargeant: NEWS.md credits contributor "Will Sargeant"; do not "fix" + # abd: deliberate non-matching string in t_iwildmatch.c test cases + - --ignore-words-list=te,uptodate,siz,mis,ake,chang,ue,cna,devine,seein,noo,servent,tim,parms,unx,blong,sorce,Sargeant,abd + # - -xscripts/codespell-lines-ignore.txt + # - --toml + # - pyproject.toml + additional_dependencies: + - tomli + - repo: https://github.com/pocc/pre-commit-hooks + rev: 82434ac5752cd3b40f6e65e7751c054157accc0b # v1.5.0 + # Install dependencies on windows: + # choco install llvm uncrustify cppcheck + hooks: + - id: uncrustify + stages: [manual] + # vendored code and C test fixtures are not application code + exclude: ^(zlib|popt)/|^testsuite/fixtures/chmod-error\.c$ + args: [--replace, --no-backup, -c, uncrustify.cfg, -l, C] + - id: cppcheck + stages: [manual] + exclude: ^(case_N\.h|testsuite/fixtures/chmod-error\.c)$|^(zlib|popt)/ + args: + - --quiet + - --force + - --platform=unix32 + - --language=c + - --cppcheck-build-dir=.cache/cppcheck/ + - -Uisblank + - -DSIZEOF_CHARP=8 + - -DZLIB_CONST + - -DNORETURN= + - -DPOPT_fprintf=fprintf + # config.h is generated (gitignored), so cppcheck never sees it in CI. + # Define HAVE_GETGROUPS so the real getgroups() code paths are analyzed + # (upstream #1195: without this, cppcheck suggests const on the buffer + # that getgroups() writes into). + - -DHAVE_GETGROUPS + #- -DVARN="value" # For static analysis + - -I. + - '--template={file}({line}): {severity} ({id}): {message}' + - --inline-suppr + - --check-level=exhaustive + - --suppress=unmatchedSuppression + - --suppress=checkersReport + - --suppress=internalError + # - --suppress=constParameterPointer + - --suppress=variableScope + - --suppress=constParameterPointer + - --suppress=constParameterCallback + - --suppress=unusedFunction + - --suppress=missingIncludeSystem + - --suppress=missingInclude:rsync.h + - --suppress=shiftTooManyBits:byteorder.h + - --suppress=unusedStructMember:rsync.h + - --suppress=unusedStructMember:lib/pool_alloc.c + - --suppress=unusedStructMember:lib/sysacls.h + - --suppress=missingInclude:lib/sysacls.h + + - repo: https://github.com/cpplint/cpplint + rev: 350702a4d39395571bd118c9a3cff0a573488d61 # 2.0.2 + hooks: + - id: cpplint + stages: [manual] + exclude: ^(zlib|popt)/|^testsuite/fixtures/chmod-error\.c$ + args: ["--filter=-legal/copyright,-build/header_guard,-build/include_dir,-build/include_subdir,-readability/braces,-readability/casting,-readability/multiline_comment,-whitespace/blank_line,-whitespace/braces,-whitespace/comma,-whitespace/indent,-whitespace/line_length,-whitespace/newline,-whitespace/operators,-whitespace/parens,-whitespace/semicolon,-whitespace/tab"] + additional_dependencies: + - cpplint>=1.6.1 + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: a6564f5d57444e123433a5c9af733e3975c77229 # v0.11.0.1-1 + hooks: + - id: shellcheck + exclude: ^(config\.guess|config\.sub)$ + # exclude: (?x)^(__NONE__)$ + # args: [-x,-e1007,-e1009,-e1072,-e1073] diff --git a/uncrustify.cfg b/uncrustify.cfg new file mode 100644 index 000000000..b67b5c65d --- /dev/null +++ b/uncrustify.cfg @@ -0,0 +1,853 @@ +# Uncrustify-0.78.1_f +newlines = auto +input_tab_size = 8 +output_tab_size = 8 +string_escape_char = 92 +string_escape_char2 = 0 +string_replace_tab_chars = false +tok_split_gte = false +disable_processing_nl_cont = false +disable_processing_cmt = " *INDENT-OFF*" +enable_processing_cmt = " *INDENT-ON*" +enable_digraphs = false +processing_cmt_as_regex = false +utf8_bom = ignore +utf8_byte = false +utf8_force = false +sp_arith = ignore +sp_arith_additive = ignore +sp_assign = ignore +sp_cpp_lambda_assign = ignore +sp_cpp_lambda_square_paren = ignore +sp_cpp_lambda_square_brace = ignore +sp_cpp_lambda_argument_list_empty = ignore +sp_cpp_lambda_argument_list = ignore +sp_cpp_lambda_paren_brace = ignore +sp_cpp_lambda_fparen = ignore +sp_assign_default = ignore +sp_before_assign = force +sp_after_assign = force +sp_enum_brace = add +sp_enum_paren = ignore +sp_enum_assign = ignore +sp_enum_before_assign = ignore +sp_enum_after_assign = ignore +sp_enum_colon = ignore +sp_pp_concat = add +sp_pp_stringify = ignore +sp_before_pp_stringify = ignore +sp_bool = force +sp_compare = force +sp_inside_paren = remove +sp_paren_paren = remove +sp_cparen_oparen = ignore +sp_balance_nested_parens = false +sp_paren_brace = force +sp_brace_brace = ignore +sp_before_ptr_star = force +sp_before_unnamed_ptr_star = force +sp_before_qualifier_ptr_star = ignore +sp_before_operator_ptr_star = ignore +sp_before_scope_ptr_star = ignore +sp_before_global_scope_ptr_star = ignore +sp_qualifier_unnamed_ptr_star = ignore +sp_between_ptr_star = ignore +sp_between_ptr_ref = ignore +sp_after_ptr_star = remove +sp_after_ptr_block_caret = ignore +sp_after_ptr_star_qualifier = ignore +sp_after_ptr_star_func = ignore +sp_after_ptr_star_trailing = ignore +sp_ptr_star_func_var = ignore +sp_ptr_star_func_type = ignore +sp_ptr_star_paren = ignore +sp_before_ptr_star_func = ignore +sp_qualifier_ptr_star_func = ignore +sp_before_ptr_star_trailing = ignore +sp_qualifier_ptr_star_trailing = ignore +sp_before_byref = ignore +sp_before_unnamed_byref = ignore +sp_after_byref = ignore +sp_after_byref_func = ignore +sp_before_byref_func = ignore +sp_byref_paren = ignore +sp_after_type = force +sp_after_decltype = ignore +sp_before_template_paren = ignore +sp_template_angle = ignore +sp_before_angle = ignore +sp_inside_angle = ignore +sp_inside_angle_empty = ignore +sp_angle_colon = ignore +sp_after_angle = ignore +sp_angle_paren = ignore +sp_angle_paren_empty = ignore +sp_angle_word = ignore +sp_angle_shift = add +sp_permit_cpp11_shift = false +sp_before_sparen = ignore +sp_inside_sparen = ignore +sp_inside_sparen_open = ignore +sp_inside_sparen_close = ignore +sp_inside_for = ignore +sp_inside_for_open = ignore +sp_inside_for_close = ignore +sp_sparen_paren = ignore +sp_after_sparen = ignore +sp_sparen_brace = ignore +sp_do_brace_open = ignore +sp_brace_close_while = ignore +sp_while_paren_open = ignore +sp_invariant_paren = ignore +sp_after_invariant_paren = ignore +sp_special_semi = ignore +sp_before_semi = remove +sp_before_semi_for = ignore +sp_before_semi_for_empty = ignore +sp_between_semi_for_empty = ignore +sp_after_semi = add +sp_after_semi_for = force +sp_after_semi_for_empty = ignore +sp_before_square = remove +sp_before_vardef_square = remove +sp_before_square_asm_block = ignore +sp_before_squares = remove +sp_cpp_before_struct_binding = ignore +sp_inside_square = remove +sp_inside_square_empty = ignore +sp_inside_square_oc_array = ignore +sp_after_comma = force +sp_before_comma = remove +sp_after_mdatype_commas = ignore +sp_before_mdatype_commas = ignore +sp_between_mdatype_commas = ignore +sp_paren_comma = force +sp_type_colon = ignore +sp_after_ellipsis = ignore +sp_before_ellipsis = ignore +sp_type_ellipsis = ignore +sp_ptr_type_ellipsis = ignore +sp_paren_ellipsis = ignore +sp_byref_ellipsis = ignore +sp_paren_qualifier = ignore +sp_paren_noexcept = ignore +sp_after_class_colon = ignore +sp_before_class_colon = ignore +sp_after_constr_colon = add +sp_before_constr_colon = add +sp_before_case_colon = remove +sp_after_operator = ignore +sp_after_operator_sym = ignore +sp_after_operator_sym_empty = ignore +sp_after_cast = ignore +sp_inside_paren_cast = ignore +sp_cpp_cast_paren = ignore +sp_sizeof_paren = ignore +sp_sizeof_ellipsis = ignore +sp_sizeof_ellipsis_paren = ignore +sp_ellipsis_parameter_pack = ignore +sp_parameter_pack_ellipsis = ignore +sp_decltype_paren = ignore +sp_after_tag = ignore +sp_inside_braces_enum = ignore +sp_inside_braces_struct = ignore +sp_inside_braces_oc_dict = ignore +sp_after_type_brace_init_lst_open = ignore +sp_before_type_brace_init_lst_close = ignore +sp_inside_type_brace_init_lst = ignore +sp_inside_braces = ignore +sp_inside_braces_empty = remove +sp_trailing_return = ignore +sp_type_func = ignore +sp_type_brace_init_lst = ignore +sp_func_proto_paren = ignore +sp_func_proto_paren_empty = ignore +sp_func_type_paren = ignore +sp_func_def_paren = ignore +sp_func_def_paren_empty = ignore +sp_inside_fparens = ignore +sp_inside_fparen = ignore +sp_func_call_user_inside_rparen = ignore +sp_inside_rparens = ignore +sp_inside_rparen = ignore +sp_inside_tparen = ignore +sp_after_tparen_close = ignore +sp_square_fparen = ignore +sp_fparen_brace = ignore +sp_fparen_brace_initializer = ignore +sp_fparen_dbrace = ignore +sp_func_call_paren = ignore +sp_func_call_paren_empty = ignore +sp_func_call_user_paren = ignore +sp_func_call_user_inside_fparen = ignore +sp_func_call_user_paren_paren = ignore +sp_func_class_paren = ignore +sp_func_class_paren_empty = ignore +sp_return = force +sp_return_paren = ignore +sp_return_brace = ignore +sp_attribute_paren = ignore +sp_defined_paren = ignore +sp_throw_paren = ignore +sp_after_throw = ignore +sp_catch_paren = ignore +sp_oc_catch_paren = ignore +sp_before_oc_proto_list = ignore +sp_oc_classname_paren = ignore +sp_version_paren = ignore +sp_scope_paren = ignore +sp_super_paren = remove +sp_this_paren = remove +sp_macro = ignore +sp_macro_func = ignore +sp_else_brace = ignore +sp_brace_else = ignore +sp_brace_typedef = ignore +sp_catch_brace = ignore +sp_oc_catch_brace = ignore +sp_brace_catch = ignore +sp_oc_brace_catch = ignore +sp_finally_brace = ignore +sp_brace_finally = ignore +sp_try_brace = ignore +sp_getset_brace = ignore +sp_word_brace_init_lst = ignore +sp_word_brace_ns = add +sp_before_dc = ignore +sp_after_dc = ignore +sp_d_array_colon = ignore +sp_not = remove +sp_not_not = ignore +sp_inv = remove +sp_addr = remove +sp_member = remove +sp_deref = remove +sp_sign = remove +sp_incdec = remove +sp_before_nl_cont = add +sp_after_oc_scope = ignore +sp_after_oc_colon = ignore +sp_before_oc_colon = ignore +sp_after_oc_dict_colon = ignore +sp_before_oc_dict_colon = ignore +sp_after_send_oc_colon = ignore +sp_before_send_oc_colon = ignore +sp_after_oc_type = ignore +sp_after_oc_return_type = ignore +sp_after_oc_at_sel = ignore +sp_after_oc_at_sel_parens = ignore +sp_inside_oc_at_sel_parens = ignore +sp_before_oc_block_caret = ignore +sp_after_oc_block_caret = ignore +sp_after_oc_msg_receiver = ignore +sp_after_oc_property = ignore +sp_after_oc_synchronized = ignore +sp_cond_colon = ignore +sp_cond_colon_before = ignore +sp_cond_colon_after = ignore +sp_cond_question = ignore +sp_cond_question_before = ignore +sp_cond_question_after = ignore +sp_cond_ternary_short = ignore +sp_case_label = ignore +sp_range = ignore +sp_after_for_colon = ignore +sp_before_for_colon = ignore +sp_extern_paren = ignore +sp_cmt_cpp_start = ignore +sp_cmt_cpp_pvs = false +sp_cmt_cpp_lint = false +sp_cmt_cpp_region = ignore +sp_cmt_cpp_doxygen = false +sp_cmt_cpp_qttr = false +sp_endif_cmt = ignore +sp_after_new = ignore +sp_between_new_paren = ignore +sp_after_newop_paren = ignore +sp_inside_newop_paren = ignore +sp_inside_newop_paren_open = ignore +sp_inside_newop_paren_close = ignore +sp_before_tr_cmt = ignore +sp_num_before_tr_cmt = 0 +sp_before_emb_cmt = force +sp_num_before_emb_cmt = 1 +sp_after_emb_cmt = force +sp_num_after_emb_cmt = 1 +sp_annotation_paren = ignore +sp_skip_vbrace_tokens = false +sp_after_noexcept = ignore +sp_vala_after_translation = ignore +sp_before_bit_colon = ignore +sp_after_bit_colon = ignore +force_tab_after_define = false +indent_columns = 8 +indent_ignore_first_continue = false +indent_continue = 0 +indent_continue_class_head = 0 +indent_single_newlines = false +indent_param = 0 +indent_with_tabs = 1 +indent_cmt_with_tabs = false +indent_align_string = false +indent_xml_string = 0 +indent_brace = 0 +indent_braces = false +indent_braces_no_func = false +indent_braces_no_class = false +indent_braces_no_struct = false +indent_brace_parent = false +indent_paren_open_brace = false +indent_cs_delegate_brace = false +indent_cs_delegate_body = false +indent_namespace = false +indent_namespace_single_indent = false +indent_namespace_level = 0 +indent_namespace_limit = 0 +indent_namespace_inner_only = false +indent_extern = false +indent_class = false +indent_ignore_before_class_colon = false +indent_before_class_colon = 0 +indent_class_colon = false +indent_class_on_colon = false +indent_ignore_before_constr_colon = false +indent_constr_colon = false +indent_ctor_init_leading = 2 +indent_ctor_init_following = 2 +indent_ctor_init = 0 +indent_else_if = false +indent_var_def_blk = 0 +indent_var_def_cont = false +indent_shift = 0 +indent_func_def_force_col1 = false +indent_func_call_param = false +indent_func_def_param = false +indent_func_def_param_paren_pos_threshold = 0 +indent_func_proto_param = false +indent_func_class_param = false +indent_func_ctor_var_param = false +indent_template_param = false +indent_func_param_double = false +indent_func_const = 0 +indent_func_throw = 0 +indent_macro_brace = true +indent_member = 0 +indent_member_single = false +indent_single_line_comments_before = 0 +indent_single_line_comments_after = 0 +indent_sparen_extra = 0 +indent_relative_single_line_comments = false +indent_switch_case = 0 +indent_switch_body = 0 +indent_ignore_case_brace = false +indent_case_brace = 0 +indent_switch_break_with_case = false +indent_switch_pp = true +indent_case_shift = 0 +indent_case_comment = true +indent_comment = true +indent_col1_comment = false +indent_col1_multi_string_literal = false +indent_comment_align_thresh = 3 +indent_ignore_label = false +indent_label = 1 +indent_access_spec = 1 +indent_access_spec_body = false +indent_paren_nl = false +indent_paren_close = 0 +indent_paren_after_func_def = false +indent_paren_after_func_decl = false +indent_paren_after_func_call = false +indent_comma_brace = 0 +indent_comma_paren = 0 +indent_bool_paren = 0 +indent_ignore_bool = false +indent_ignore_arith = false +indent_semicolon_for_paren = false +indent_ignore_semicolon = false +indent_first_bool_expr = false +indent_first_for_expr = false +indent_square_nl = false +indent_preserve_sql = false +indent_ignore_assign = false +indent_align_assign = true +indent_off_after_assign = false +indent_align_paren = true +indent_oc_inside_msg_sel = false +indent_oc_block = false +indent_oc_block_msg = 0 +indent_oc_msg_colon = 0 +indent_oc_msg_prioritize_first_colon = true +indent_oc_block_msg_xcode_style = false +indent_oc_block_msg_from_keyword = false +indent_oc_block_msg_from_colon = false +indent_oc_block_msg_from_caret = false +indent_oc_block_msg_from_brace = false +indent_min_vbrace_open = 0 +indent_vbrace_open_on_tabstop = false +indent_token_after_brace = true +indent_cpp_lambda_body = false +indent_compound_literal_return = true +indent_using_block = true +indent_ternary_operator = 0 +indent_inside_ternary_operator = false +indent_off_after_return = false +indent_off_after_return_new = false +indent_single_after_return = false +indent_ignore_asm_block = false +donot_indent_func_def_close_paren = false +nl_collapse_empty_body = false +nl_collapse_empty_body_functions = false +nl_assign_leave_one_liners = false +nl_class_leave_one_liners = false +nl_enum_leave_one_liners = false +nl_getset_leave_one_liners = false +nl_cs_property_leave_one_liners = false +nl_func_leave_one_liners = false +nl_cpp_lambda_leave_one_liners = false +nl_if_leave_one_liners = false +nl_while_leave_one_liners = false +nl_do_leave_one_liners = false +nl_for_leave_one_liners = false +nl_oc_msg_leave_one_liner = false +nl_oc_mdef_brace = ignore +nl_oc_block_brace = ignore +nl_oc_before_interface = ignore +nl_oc_before_implementation = ignore +nl_oc_before_end = ignore +nl_oc_interface_brace = ignore +nl_oc_implementation_brace = ignore +nl_start_of_file = ignore +nl_start_of_file_min = 0 +nl_end_of_file = ignore +nl_end_of_file_min = 0 +nl_assign_brace = ignore +nl_assign_square = ignore +nl_tsquare_brace = ignore +nl_after_square_assign = ignore +nl_fcall_brace = ignore +nl_enum_brace = ignore +nl_enum_class = ignore +nl_enum_class_identifier = ignore +nl_enum_identifier_colon = ignore +nl_enum_colon_type = ignore +nl_struct_brace = ignore +nl_union_brace = ignore +nl_if_brace = ignore +nl_brace_else = ignore +nl_elseif_brace = ignore +nl_else_brace = ignore +nl_else_if = ignore +nl_before_opening_brace_func_class_def = ignore +nl_before_if_closing_paren = ignore +nl_brace_finally = ignore +nl_finally_brace = ignore +nl_try_brace = ignore +nl_getset_brace = ignore +nl_for_brace = ignore +nl_catch_brace = ignore +nl_oc_catch_brace = ignore +nl_brace_catch = ignore +nl_oc_brace_catch = ignore +nl_brace_square = ignore +nl_brace_fparen = ignore +nl_while_brace = ignore +nl_scope_brace = ignore +nl_unittest_brace = ignore +nl_version_brace = ignore +nl_using_brace = ignore +nl_brace_brace = ignore +nl_do_brace = ignore +nl_brace_while = ignore +nl_switch_brace = ignore +nl_synchronized_brace = ignore +nl_multi_line_cond = false +nl_multi_line_sparen_open = ignore +nl_multi_line_sparen_close = ignore +nl_multi_line_define = false +nl_before_case = false +nl_after_case = false +nl_case_colon_brace = ignore +nl_before_throw = ignore +nl_namespace_brace = ignore +nl_template_class = ignore +nl_template_class_decl = ignore +nl_template_class_decl_special = ignore +nl_template_class_def = ignore +nl_template_class_def_special = ignore +nl_template_func = ignore +nl_template_func_decl = ignore +nl_template_func_decl_special = ignore +nl_template_func_def = ignore +nl_template_func_def_special = ignore +nl_template_var = ignore +nl_template_using = ignore +nl_class_brace = ignore +nl_class_init_args = ignore +nl_constr_init_args = ignore +nl_enum_own_lines = ignore +nl_func_type_name = ignore +nl_func_type_name_class = ignore +nl_func_class_scope = ignore +nl_func_scope_name = ignore +nl_func_proto_type_name = ignore +nl_func_paren = ignore +nl_func_paren_empty = ignore +nl_func_def_paren = ignore +nl_func_def_paren_empty = ignore +nl_func_call_paren = ignore +nl_func_call_paren_empty = ignore +nl_func_decl_start = ignore +nl_func_def_start = ignore +nl_func_decl_start_single = ignore +nl_func_def_start_single = ignore +nl_func_decl_start_multi_line = false +nl_func_def_start_multi_line = false +nl_func_decl_args = ignore +nl_func_def_args = ignore +nl_func_call_args = ignore +nl_func_decl_args_multi_line = false +nl_func_def_args_multi_line = false +nl_func_decl_end = ignore +nl_func_def_end = ignore +nl_func_decl_end_single = ignore +nl_func_def_end_single = ignore +nl_func_decl_end_multi_line = false +nl_func_def_end_multi_line = false +nl_func_decl_empty = ignore +nl_func_def_empty = ignore +nl_func_call_empty = ignore +nl_func_call_start = ignore +nl_func_call_end = ignore +nl_func_call_start_multi_line = false +nl_func_call_args_multi_line = false +nl_func_call_end_multi_line = false +nl_func_call_args_multi_line_ignore_closures = false +nl_template_start = false +nl_template_args = false +nl_template_end = false +nl_oc_msg_args = false +nl_oc_msg_args_min_params = 0 +nl_oc_msg_args_max_code_width = 0 +nl_fdef_brace = ignore +nl_fdef_brace_cond = ignore +nl_cpp_ldef_brace = ignore +nl_return_expr = ignore +nl_throw_expr = ignore +nl_after_semicolon = false +nl_paren_dbrace_open = ignore +nl_type_brace_init_lst = ignore +nl_type_brace_init_lst_open = ignore +nl_type_brace_init_lst_close = ignore +nl_before_brace_open = false +nl_after_brace_open = false +nl_after_brace_open_cmt = false +nl_after_vbrace_open = false +nl_after_vbrace_open_empty = false +nl_after_brace_close = false +nl_after_vbrace_close = false +nl_brace_struct_var = ignore +nl_define_macro = false +nl_squeeze_paren_close = false +nl_squeeze_ifdef = false +nl_squeeze_ifdef_top_level = false +nl_before_if = ignore +nl_after_if = ignore +nl_before_for = ignore +nl_after_for = ignore +nl_before_while = ignore +nl_after_while = ignore +nl_before_switch = ignore +nl_after_switch = ignore +nl_before_synchronized = ignore +nl_after_synchronized = ignore +nl_before_do = ignore +nl_after_do = ignore +nl_before_ignore_after_case = false +nl_before_return = false +nl_after_return = false +nl_before_member = ignore +nl_after_member = ignore +nl_ds_struct_enum_cmt = false +nl_ds_struct_enum_close_brace = false +nl_class_colon = ignore +nl_constr_colon = ignore +nl_namespace_two_to_one_liner = false +nl_create_if_one_liner = false +nl_create_for_one_liner = false +nl_create_while_one_liner = false +nl_create_func_def_one_liner = false +nl_create_list_one_liner = false +nl_split_if_one_liner = false +nl_split_for_one_liner = false +nl_split_while_one_liner = false +donot_add_nl_before_cpp_comment = false +nl_max = 0 +nl_max_blank_in_func = 0 +nl_inside_empty_func = 0 +nl_before_func_body_proto = 0 +nl_before_func_body_def = 0 +nl_before_func_class_proto = 0 +nl_before_func_class_def = 0 +nl_after_func_proto = 0 +nl_after_func_proto_group = 0 +nl_after_func_class_proto = 0 +nl_after_func_class_proto_group = 0 +nl_class_leave_one_liner_groups = false +nl_after_func_body = 0 +nl_min_after_func_body = 0 +nl_max_after_func_body = 0 +nl_after_func_body_class = 0 +nl_after_func_body_one_liner = 0 +nl_typedef_blk_start = 0 +nl_typedef_blk_end = 0 +nl_typedef_blk_in = 0 +nl_var_def_blk_end_func_top = 0 +nl_var_def_blk_start = 0 +nl_var_def_blk_end = 0 +nl_var_def_blk_in = 0 +nl_before_block_comment = 0 +nl_before_c_comment = 0 +nl_before_cpp_comment = 0 +nl_after_multiline_comment = false +nl_after_label_colon = false +nl_before_struct = 0 +nl_after_struct = 0 +nl_before_class = 0 +nl_after_class = 0 +nl_before_namespace = 0 +nl_inside_namespace = 0 +nl_after_namespace = 0 +nl_before_access_spec = 0 +nl_after_access_spec = 0 +nl_comment_func_def = 0 +nl_after_try_catch_finally = 0 +nl_around_cs_property = 0 +nl_between_get_set = 0 +nl_property_brace = ignore +eat_blanks_after_open_brace = false +eat_blanks_before_close_brace = false +nl_remove_extra_newlines = 0 +nl_after_annotation = ignore +nl_between_annotation = ignore +nl_before_whole_file_ifdef = 0 +nl_after_whole_file_ifdef = 0 +nl_before_whole_file_endif = 0 +nl_after_whole_file_endif = 0 +pos_arith = ignore +pos_assign = ignore +pos_bool = ignore +pos_compare = ignore +pos_conditional = ignore +pos_comma = ignore +pos_enum_comma = ignore +pos_class_comma = ignore +pos_constr_comma = ignore +pos_class_colon = ignore +pos_constr_colon = ignore +pos_shift = ignore +code_width = 0 +ls_for_split_full = false +ls_func_split_full = false +ls_code_width = false +align_keep_tabs = false +align_with_tabs = false +align_on_tabstop = false +align_number_right = false +align_keep_extra_space = false +align_func_params = false +align_func_params_span = 0 +align_func_params_thresh = 0 +align_func_params_gap = 0 +align_constr_value_span = 0 +align_constr_value_thresh = 0 +align_constr_value_gap = 0 +align_same_func_call_params = false +align_same_func_call_params_span = 0 +align_same_func_call_params_thresh = 0 +align_var_def_span = 0 +align_var_def_star_style = 0 +align_var_def_amp_style = 0 +align_var_def_thresh = 0 +align_var_def_gap = 0 +align_var_def_colon = false +align_var_def_colon_gap = 0 +align_var_def_attribute = false +align_var_def_inline = false +align_assign_span = 0 +align_assign_func_proto_span = 0 +align_assign_thresh = 0 +align_assign_on_multi_var_defs = false +align_braced_init_list_span = 0 +align_braced_init_list_thresh = 0 +align_assign_decl_func = 0 +align_enum_equ_span = 0 +align_enum_equ_thresh = 0 +align_var_class_span = 0 +align_var_class_thresh = 0 +align_var_class_gap = 0 +align_var_struct_span = 0 +align_var_struct_thresh = 0 +align_var_struct_gap = 0 +align_struct_init_span = 0 +align_typedef_span = 0 +align_typedef_gap = 0 +align_typedef_func = 0 +align_typedef_star_style = 0 +align_typedef_amp_style = 0 +align_right_cmt_span = 0 +align_right_cmt_gap = 0 +align_right_cmt_mix = false +align_right_cmt_same_level = false +align_right_cmt_at_col = 0 +align_func_proto_span = 0 +align_func_proto_span_ignore_cont_lines = false +align_func_proto_star_style = 0 +align_func_proto_amp_style = 0 +align_func_proto_thresh = 0 +align_func_proto_gap = 0 +align_on_operator = false +align_mix_var_proto = false +align_single_line_func = false +align_single_line_brace = false +align_single_line_brace_gap = 0 +align_oc_msg_spec_span = 0 +align_nl_cont = 0 +align_nl_cont_spaces = 1 +align_pp_define_together = false +align_pp_define_span = 0 +align_pp_define_gap = 0 +align_left_shift = true +align_eigen_comma_init = false +align_asm_colon = false +align_oc_msg_colon_span = 0 +align_oc_msg_colon_first = false +align_oc_decl_colon = false +align_oc_msg_colon_xcode_like = false +cmt_width = 0 +cmt_reflow_mode = 0 +cmt_reflow_fold_regex_file = "" +cmt_reflow_indent_to_paragraph_start = false +cmt_convert_tab_to_spaces = false +cmt_indent_multi = true +cmt_align_doxygen_javadoc_tags = false +cmt_sp_before_doxygen_javadoc_tags = 1 +cmt_trailing_single_line_c_to_cpp = false +cmt_c_group = false +cmt_c_nl_start = false +cmt_c_nl_end = false +cmt_cpp_to_c = false +cmt_cpp_group = false +cmt_cpp_nl_start = false +cmt_cpp_nl_end = false +cmt_star_cont = false +cmt_sp_before_star_cont = 0 +cmt_sp_after_star_cont = 0 +cmt_multi_check_last = true +cmt_multi_first_len_minimum = 4 +cmt_insert_file_header = "" +cmt_insert_file_footer = "" +cmt_insert_func_header = "" +cmt_insert_class_header = "" +cmt_insert_oc_msg_header = "" +cmt_insert_before_preproc = false +cmt_insert_before_inlines = true +cmt_insert_before_ctor_dtor = false +mod_full_brace_do = ignore +mod_full_brace_for = ignore +mod_full_brace_function = ignore +mod_full_brace_if = ignore +mod_full_brace_if_chain = 0 +mod_full_brace_if_chain_only = false +mod_full_brace_while = ignore +mod_full_brace_using = ignore +mod_full_brace_nl = 0 +mod_full_brace_nl_block_rem_mlcond = false +mod_paren_on_return = ignore +mod_paren_on_throw = ignore +mod_pawn_semicolon = false +mod_full_paren_if_bool = false +mod_full_paren_assign_bool = false +mod_full_paren_return_bool = false +mod_remove_extra_semicolon = false +mod_remove_duplicate_include = false +mod_add_force_c_closebrace_comment = false +mod_add_long_function_closebrace_comment = 0 +mod_add_long_namespace_closebrace_comment = 0 +mod_add_long_class_closebrace_comment = 0 +mod_add_long_switch_closebrace_comment = 0 +mod_add_long_ifdef_endif_comment = 0 +mod_add_long_ifdef_else_comment = 0 +mod_sort_case_sensitive = false +mod_sort_import = false +mod_sort_using = false +mod_sort_include = false +mod_sort_incl_import_prioritize_filename = false +mod_sort_incl_import_prioritize_extensionless = false +mod_sort_incl_import_prioritize_angle_over_quotes = false +mod_sort_incl_import_ignore_extension = false +mod_sort_incl_import_grouping_enabled = false +mod_move_case_break = false +mod_move_case_return = false +mod_case_brace = ignore +mod_remove_empty_return = false +mod_enum_last_comma = ignore +mod_infinite_loop = 0 +mod_int_short = ignore +mod_short_int = ignore +mod_int_long = ignore +mod_long_int = ignore +mod_int_signed = ignore +mod_signed_int = ignore +mod_int_unsigned = ignore +mod_unsigned_int = ignore +mod_int_prefer_int_on_left = false +mod_sort_oc_properties = false +mod_sort_oc_property_class_weight = 0 +mod_sort_oc_property_thread_safe_weight = 0 +mod_sort_oc_property_readwrite_weight = 0 +mod_sort_oc_property_reference_weight = 0 +mod_sort_oc_property_getter_weight = 0 +mod_sort_oc_property_setter_weight = 0 +mod_sort_oc_property_nullability_weight = 0 +pp_indent_with_tabs = -1 +pp_indent = ignore +pp_indent_at_level = false +pp_indent_at_level0 = false +pp_indent_count = 1 +pp_space_after = ignore +pp_space_count = 0 +pp_indent_region = 0 +pp_region_indent_code = false +pp_indent_if = 0 +pp_if_indent_code = false +pp_indent_in_guard = false +pp_define_at_level = false +pp_include_at_level = false +pp_ignore_define_body = false +pp_multiline_define_body_indent = 8 +pp_indent_case = true +pp_indent_func_def = true +pp_indent_extern = true +pp_indent_brace = 1 +pp_warn_unbalanced_if = false +include_category_0 = "" +include_category_1 = "" +include_category_2 = "" +use_indent_func_call_param = true +use_indent_continue_only_once = false +indent_cpp_lambda_only_once = false +use_sp_after_angle_always = false +use_options_overriding_for_qt_macros = true +use_form_feed_no_more_as_whitespace_character = false +warn_level_tabs_found_in_verbatim_string_literals = 2 +debug_max_number_of_loops = 0 +debug_line_number_to_protocol = 0 +debug_timeout = 0 +debug_truncate = 0 +debug_sort_the_tracks = true +debug_decode_the_flags = false +debug_use_the_exit_function_pop = true +set_numbering_for_html_output = false +# option(s) with 'not default' value: 15 +# From b633da8fede41ebfcd30b325218641f1af751842 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 23 Nov 2026 01:57:55 +0100 Subject: [PATCH 3/4] qual: beautysh fixes (4-space indent in packaging/solaris/build_pkg.sh) --- packaging/solaris/build_pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/solaris/build_pkg.sh b/packaging/solaris/build_pkg.sh index 853bc8b00..c74ad67cd 100755 --- a/packaging/solaris/build_pkg.sh +++ b/packaging/solaris/build_pkg.sh @@ -80,7 +80,7 @@ echo "Building package.." ( cd "$FAKE_ROOT" || exit 1 pkgmk -d . -r . -f ./prototype -o && - pkgtrans -os . "$OUTPUTFILE" "$PKGNAME" + pkgtrans -os . "$OUTPUTFILE" "$PKGNAME" ) || exit 1 mv "$FAKE_ROOT/$OUTPUTFILE" . || exit 1 From 44265bd94053290250d31ee33496cb7de92e6774 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 23 Nov 2026 02:05:02 +0100 Subject: [PATCH 4/4] qual: mdformat fixes (automated markdown formatting) --- .github/INTEROPERABILITY.md | 18 +- .pre-commit-config.yaml | 52 + INSTALL.md | 6 +- NEWS.md | 6346 +++++++++++++++-------------- README.md | 108 +- SECURITY.md | 20 +- rsync-ssl.1.md | 76 +- rsync.1.md | 7699 ++++++++++++++++++----------------- rsyncd.conf.5.md | 752 ++-- support/rrsync.1.md | 86 +- testsuite/README.md | 21 +- 11 files changed, 7703 insertions(+), 7481 deletions(-) diff --git a/.github/INTEROPERABILITY.md b/.github/INTEROPERABILITY.md index 09e4d844b..15e825a2f 100644 --- a/.github/INTEROPERABILITY.md +++ b/.github/INTEROPERABILITY.md @@ -38,15 +38,15 @@ We admit only the cohort's registered IPv4 addresses on TCP ports 18731 and 1873 We configure the controller identity with these claims: -Field | Value ---- | --- -Issuer | https://token.actions.githubusercontent.com -Subject | repo:RsyncProject/rsync:ref:refs/heads/master -repository_id | 266877886 -repository_owner_id | 166180282 -event_name | workflow_run -workflow_ref | RsyncProject/rsync/.github/workflows/interoperability*.yml@refs/heads/master -runner_environment | github-hosted +| Field | Value | +| ------------------- | ----------------------------------------------------------------------------- | +| Issuer | https://token.actions.githubusercontent.com | +| Subject | repo:RsyncProject/rsync:ref:refs/heads/master | +| repository_id | 266877886 | +| repository_owner_id | 166180282 | +| event_name | workflow_run | +| workflow_ref | RsyncProject/rsync/.github/workflows/interoperability\*.yml@refs/heads/master | +| runner_environment | github-hosted | We give endpoint jobs no federated identity. The controller independently checks PR change selection before requesting authority. Endpoint jobs check the current CI attempt and selected workflow revision without rereading the PR diff. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a229055c..315c3b24e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -100,6 +100,46 @@ repos: - -Uisblank - -DSIZEOF_CHARP=8 - -DZLIB_CONST + - -DICONV_OPTION + - -DCAN_CHMOD_SYMLINK + - -DCAN_CHOWN_SYMLINK + - -DCAN_SET_NSEC + - -DCAN_SET_SYMLINK_TIMES + - -DLOG_AUTH + - -DLOG_AUTHPRIV + - -DLOG_CRON + - -DLOG_DAEMON + - -DLOG_FTP + - -DLOG_KERN + - -DLOG_LOCAL0 + - -DLOG_LOCAL1 + - -DLOG_LOCAL2 + - -DLOG_LOCAL3 + - -DLOG_LOCAL4 + - -DLOG_LOCAL5 + - -DLOG_LOCAL6 + - -DLOG_LOCAL7 + - -DLOG_LPR + - -DLOG_MAIL + - -DLOG_NDELAY + - -DLOG_NEWS + - -DLOG_SYSLOG + - -DLOG_USER + - -DLOG_UUCP + - -DSUPPORT_ACLS + - -DSUPPORT_ACL_FD + - -DSUPPORT_CRTIMES + - -DSUPPORT_HARD_LINKS + - -DSUPPORT_IDN + - -DSUPPORT_IO_PRIORITY + - -DSUPPORT_LINKS + - -DSUPPORT_LZ4 + - -DSUPPORT_NICE_PRIORITY + - -DSUPPORT_PREALLOCATION + - -DSUPPORT_XATTRS + - -DSUPPORT_XXH3 + - -DSUPPORT_XXHASH + - -DSUPPORT_ZSTD - -DNORETURN= - -DPOPT_fprintf=fprintf # config.h is generated (gitignored), so cppcheck never sees it in CI. @@ -121,6 +161,18 @@ repos: - --suppress=constParameterCallback - --suppress=unusedFunction - --suppress=missingIncludeSystem + # Generated headers (config.h, git-version.h, default-cvsignore.h, + # default-dont-compress.h, daemon-parm.h, help-rsync*.h, rounding.h) + # are gitignored and absent on a fresh checkout; -I. above resolves + # them at the project root once the build has generated them. + # Suppress the resulting missingInclude notices in the files that + # include them (filename only, no line numbers — they shift easily). + - --suppress=missingInclude:usage.c + - --suppress=missingInclude:flist.c + - --suppress=missingInclude:log.c + - --suppress=missingInclude:loadparm.c + - --suppress=missingInclude:lib/snprintf.c + - --suppress=missingInclude:testsuite/tools/dirfd-probe.c - --suppress=missingInclude:rsync.h - --suppress=shiftTooManyBits:byteorder.h - --suppress=unusedStructMember:rsync.h diff --git a/INSTALL.md b/INSTALL.md index b9037624e..31dbdb4d9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -116,13 +116,11 @@ target package metadata directories. ## libidn2 The [libidn2 library][5] converts an internationalized domain name into the -IDNA A-label ("Punycode") form that a resolver understands. Installing this +IDNA A-label ("Punycode") form that a resolver understands. Installing this development library lets rsync connect to a daemon whose name has non-ASCII characters in it, and lets a daemon's "hosts allow" & "hosts deny" settings be written the same way. -[5]: https://www.gnu.org/software/libidn/#libidn2 - ## Package summary To help you get the libraries installed, here are some package install commands @@ -314,7 +312,7 @@ is to append the following to config.h: [2]: http://facebook.github.io/zstd/ [3]: https://lz4.github.io/lz4/ [4]: https://www.openssl.org/docs/man1.0.2/man3/crypto.html -[5]: http://www.ipv6.org/impl/mac.html +[5]: https://www.gnu.org/software/libidn/#libidn2 [6]: https://download.samba.org/pub/rsync/generated-files/ [ppa]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync [ppa-latest]: https://launchpad.net/~rsyncproject/+archive/ubuntu/rsync-latest diff --git a/NEWS.md b/NEWS.md index 3f2d6c2d9..e5f10a7a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,15 +4,20 @@ - Reduce directory lookups when linking unchanged regular files with non-daemon `--link-dest` transfers. Reuse checked receiver and basis directories. + - Reuse checked directories for ordinary scans and file reads beneath a verified sender root. Avoid a redundant directory probe for sender file reads. Set close-on-exec at open time where supported. + - Avoid redundant stats when creating children of a fresh receiver directory. + - Try an exact `--link-dest` match without a destination stat in new incremental directories. Use the normal lookup path if the link fails. + - Keep the checked root of a single absolute alternate destination open across directories in ordinary non-daemon transfers. Reuse checked parents for rechecks and delta reads. + - Added SHA-3 (FIPS 202) transfer checksum choices `sha3-256`, `sha3-384` and `sha3-512` for builds with OpenSSL SHA-3 support. Default negotiation is unchanged. Select SHA-3 with @@ -52,6 +57,7 @@ in the [stable/3.5 NEWS](https://github.com/RsyncProject/rsync/blob/stable/3.5/N ## Changes in this version: ### BUG FIXES: + - Fixed interrupted `--append` and `--inplace` transfers writing the final 256 KiB buffer twice. An interrupted destination now remains a clean prefix which the next transfer can resume or repair. @@ -76,7 +82,7 @@ in the [stable/3.5 NEWS](https://github.com/RsyncProject/rsync/blob/stable/3.5/N `--max-alloc`. Quiet daemon transfers no longer queue deletion messages unless the client requested them. - Fixed a `--files-from` pull from a subdirectory of a daemon module, which - read each listed file from the module root instead. It could send, and with + read each listed file from the module root instead. It could send, and with `--remove-source-files` delete, a same-named file the module's filter excludes. - Fixed password files whose first line is empty. The parser no longer skips @@ -96,6 +102,7 @@ in the [stable/3.5 NEWS](https://github.com/RsyncProject/rsync/blob/stable/3.5/N Solaris 10. ### ENHANCEMENTS: + - Added `--nice` to adjust CPU and I/O scheduling priorities for local and remote rsync processes. Daemon clients and rrsync cannot raise server-side priorities. @@ -111,7 +118,7 @@ in the [stable/3.5 NEWS](https://github.com/RsyncProject/rsync/blob/stable/3.5/N be combined with `--remove-source-files`, `--hard-links`, `--compare-dest`, `--copy-dest` or `--link-dest`. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.5.1 (21 Sep 2026) @@ -130,6 +137,7 @@ statistics and to Samuel Henrique (@samueloph) for the `--max-alloc=0` fix and test improvements. ### BUG FIXES: + - Fixed several path-handling regressions from 3.5.0. Explicit sender paths can again traverse symlinked ancestors without weakening confinement of paths found during recursive scans. Local and remote-shell `--files-from` @@ -152,6 +160,7 @@ test improvements. failure involving the assembly and SIMD objects. ### ENHANCEMENTS: + - Added support for internationalised domain names when the required library is available at build time. - Added the number of 4 KiB logical blocks touched to `--stats`. This counts @@ -159,10 +168,11 @@ test improvements. blocks or disk I/O. It is reported when both peers negotiate protocol 33. ### BUILD AND TESTS: + - `install-strip` now honours `STRIP` including during cross-compilation. - Updated platform tests and fleet-test coverage for the 3.5.0 fixes. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.5.0 (13 Aug 2026) @@ -202,89 +212,87 @@ community for your patience in waiting for this release. This release fixes 33 security issues found during a focused audit of rsync's path handling and daemon protocol, a companion daemon-protocol fuzzing pass, and -reports from external researchers -- plus several robustness hardenings. CVE +reports from external researchers -- plus several robustness hardenings. CVE IDs were assigned by VulnCheck (CNA); the precise "introduced in" version ranges accompany each advisory, and many are much narrower than "everything before -3.5.0". Every fix ships with a regression test in the test suite that fails on -the unfixed tree. Many thanks to the external researchers credited below. +3.5.0". Every fix ships with a regression test in the test suite that fails on +the unfixed tree. Many thanks to the external researchers credited below. Link following (CWE-59/61) -- a local user who controls a path component plants a symlink that a privileged rsync then follows: - CVE-2026-53802 (HIGH): Arbitrary file read / transfer-shaping via symlinked - operator-supplied input files. rsync followed attacker-planted symlinks in + operator-supplied input files. rsync followed attacker-planted symlinks in `--filter` merge files (including per-directory merges and `-C` `.cvsignore`), `--files-from` / `--include-from` / `--exclude-from`, and the client `--password-file` / daemon secrets file -- reading an arbitrary file as filter rules, or sending a victim file's contents as the daemon authentication - response. Operator-supplied paths are now resolved component-by-component with + response. Operator-supplied paths are now resolved component-by-component with `openat(O_PATH|O_NOFOLLOW)`, allowing a symlink component only when it is owned by uid 0 or the effective uid. - CVE-2026-53803 (HIGH): Arbitrary file write / privilege escalation via symlinked operator-supplied output paths -- `--log-file`, `--write-batch`/`--read-batch`, and the daemon's motd / lock / early-input / - `--config` opens. A planted symlink (or parent component) could redirect the + `--config` opens. A planted symlink (or parent component) could redirect the write, e.g. append the log to `authorized_keys`; `--read-batch` could also feed - chosen bytes to the protocol parser. Same trusted-owner path walk, plus an + chosen bytes to the protocol parser. Same trusted-owner path walk, plus an `S_ISREG` check on the `--read-batch` file. - CVE-2026-53785 (HIGH): Under `--relative`, the receiver's implied-parent creation (`make_path()`) built the parent chain with a plain `mkdir()` on the full path, so a planted parent symlink placed the new directories and file - outside the destination tree. `make_path()` now creates each component through - the held-directory-fd primitive. Reported by Omar Elsayed (seks99x). + outside the destination tree. `make_path()` now creates each component through + the held-directory-fd primitive. Reported by Omar Elsayed (seks99x). -- CVE-2026-53784 (HIGH): Daemon module-root chdir escape under `use chroot = - no`: a plain `chdir()` followed a planted parent-component symlink, serving - files from outside the module. The module-root chdir now goes through the +- CVE-2026-53784 (HIGH): Daemon module-root chdir escape under `use chroot = no`: a plain `chdir()` followed a planted parent-component symlink, serving + files from outside the module. The module-root chdir now goes through the secure resolver. - CVE-2026-53793 (HIGH): Chroot `/./` inner-module escape -- a symlinked parent component inside the inner module reached a sibling outside it (the generator basis stat, the receiver write/finish path, the module chdir, and the - receiver's delta-basis open). The secure resolver is now engaged for all of + receiver's delta-basis open). The secure resolver is now engaged for all of those paths. - CVE-2026-53795 (HIGH): An absolute `--temp-dir` or `--link-dest` disabled - the receiver's rename/link confinement. `do_rename_at()`/`do_link_at()` bailed + the receiver's rename/link confinement. `do_rename_at()`/`do_link_at()` bailed to the unconfined path-based call whenever *either* path was absolute, so an absolute source (the temp file, or the link-dest basis) let `finish_transfer()`'s tmp->final rename -- or a hard-link create -- follow a destination parent component an attacker flipped to a symlink mid-transfer, writing the file outside - the tree. Each side is now confined independently. Reported by Omar Elsayed + the tree. Each side is now confined independently. Reported by Omar Elsayed (seks99x). - CVE-2026-53796 (MEDIUM): A non-daemon receiver's one-time `chdir()` into the operator-named destination was not fully confined (a relative destination took a plain `chdir()`), so an attacker who raced the named destination from a directory to a symlink moved the receiver's CWD -- and every file it then created -- - outside the tree. The destination chdir now uses the same ownership-checked - `O_NOFOLLOW` walk as the daemon module chdir (see BEHAVIOR CHANGES). Reported by + outside the tree. The destination chdir now uses the same ownership-checked + `O_NOFOLLOW` walk as the daemon module chdir (see BEHAVIOR CHANGES). Reported by Omar Elsayed (seks99x). - CVE-2026-53797 (MEDIUM): A non-daemon sender opened each transferred file's content by path (leaf `O_NOFOLLOW` only), so a source parent component an unprivileged user raced to a symlink after the file-list scan was followed -- reading a file from outside the source tree into an attacker-readable - destination. The content open is now anchored at the transfer root with + destination. The content open is now anchored at the transfer root with `secure_relative_open()`; `-L` / `--copy-unsafe-links` / `-k` still follow, and `--insecure-links` restores the legacy open. - CVE-2026-53799 (MEDIUM): Receiver ACL/xattr metadata application followed a - symlink race -> arbitrary ACL set (local privilege escalation). When preserving + symlink race -> arbitrary ACL set (local privilege escalation). When preserving metadata (`-A`/`--acls`, `-X`/`--xattrs`, or fake-super ACL-as-xattr), the receiver applied each entry's ACL/xattrs by path via `acl_set_file()` / - `setxattr()`. A local user who raced a just-received entry (or a parent) into a + `setxattr()`. A local user who raced a just-received entry (or a parent) into a symlink before the apply could redirect an attacker-chosen ACL -- the bytes are carried in the source entry -- onto a victim inode outside the destination tree, - granting rwx on a root-owned file. The apply now pins each entry's inode with an + granting rwx on a root-owned file. The apply now pins each entry's inode with an `O_RDONLY|O_NOFOLLOW` fd and sets all metadata on the held inode (Linux 6.13+ `*xattrat` syscalls, or a patched libacl's `*_at` bindings, else the - `/proc/self/fd` compat path). Where neither primitive exists (the BSDs, Solaris, + `/proc/self/fd` compat path). Where neither primitive exists (the BSDs, Solaris, macOS, or a `/proc`-less Linux container) it falls back to the path-based apply to - keep `--acls` functional -- a documented residual, refusable via `refuse options = - acls`. + keep `--acls` functional -- a documented residual, refusable via `refuse options = acls`. - CVE-2026-53800 (MEDIUM): Sender `--remove-source-files` unlink followed a parent-component symlink race -> arbitrary file deletion outside the source tree. @@ -292,31 +300,31 @@ a symlink that a privileged rsync then follows: the process CWD, so an unprivileged user who raced a source parent into a symlink after the file was sent could make a higher-authority sender (a root `--remove-source-files` run, or a daemon module not refusing the option) delete a - file outside the served tree. The removal is now resolved through the secure + file outside the served tree. The removal is now resolved through the secure held-dirfd walk anchored at the served module root (daemon) or transfer-root CWD (local sender), the safety re-stat is confined likewise, and the per-file dev/ino is only computed when `--remove-source-files` is in effect. - CVE-2026-53801 (MEDIUM): Sender/daemon directory-scan enumeration escaped the - transfer root / module -> out-of-tree disclosure. The sender enumerated each + transfer root / module -> out-of-tree disclosure. The sender enumerated each source directory with a plain `opendir()` on the accumulated path, not through the secure resolver (the enumeration sibling of the previous item, which confined only - the content open). A parent component raced to a symlink between the file-list + the content open). A parent component raced to a symlink between the file-list scan and the recursive `opendir()` -- or, in daemon following mode (`-L`/`--copy-dirlinks`/`--copy-unsafe-links`), an in-module symlinked directory pointing outside the module -- let a higher-authority sender enumerate an - out-of-tree directory and copy its entry names, metadata and symlink targets. The + out-of-tree directory and copy its entry names, metadata and symlink targets. The directory scan is now confined through a held `opendir` fd anchored at the transfer root / module. `support/rrsync` (the restricted SSH wrapper): -- CVE-2026-53783 (HIGH): rrsync restricted-directory escape. It validated each +- CVE-2026-53783 (HIGH): rrsync restricted-directory escape. It validated each argument with `realpath()` and then exec'd rsync against the same name (a TOCTOU window), and left dangerous options enabled in a restricted subdir. rrsync now inode-pins the validated path and roots the argument it hands rsync at that pinned fd, denies `--copy-unsafe-links`, forces `--no-D`, and refuses a - symlinked `--log-file`. The pin relies on Linux's `/proc/self/fd` magic links + symlinked `--log-file`. The pin relies on Linux's `/proc/self/fd` magic links being bound to the open inode, so it is Linux-only; on the BSDs, macOS, Solaris and Cygwin rrsync passes the `realpath()`-validated name as it always did. Two limits are worth stating: under `--relative` only the anchor the @@ -326,56 +334,55 @@ a symlink that a privileged rsync then follows: change that are refused in a restricted dir). - A filter rule that failed to parse was echoed back verbatim, including when - the rule came from a merge file's contents. A per-directory merge rule names + the rule came from a merge file's contents. A per-directory merge rule names a file the peer chooses and travels over the protocol rather than in an argument, so this let a peer read back any line of any file the server process could open that is not valid filter syntax -- through an `rrsync` restricted account as well as a daemon module, since neither confined a merge open that - the wrapper never sees. A syntax error in a rule read from a file now reports + the wrapper never sees. A syntax error in a rule read from a file now reports the file and line rather than the text; a rule given as an argument is still - shown. The `--debug=FILTER` traces print the same file-derived text, so + shown. The `--debug=FILTER` traces print the same file-derived text, so `rrsync` now refuses a peer-selected `--debug` (a stock client never sends - one). An operator who turns debugging on for their own server still sees the + one). An operator who turns debugging on for their own server still sees the rule text. - Redacting those diagnostics did not close the merge route on its own, because the worst shape produces no diagnostic at all: an exclude-only merge (the `-` modifier) makes every line of the file a pattern, so nothing fails to parse and the peer reads the contents off which of its own names went missing from - the file list. Through an `rrsync` restricted account that needs no - `--delete` and no verbosity on a pull. The open is now confined rather than + the file list. Through an `rrsync` restricted account that needs no + `--delete` and no verbosity on a pull. The open is now confined rather than the disclosure suppressed: rsync gained `--confine-root=DIR`, which refuses an operator- or peer-supplied path that resolves outside DIR, and `rrsync` passes - its restricted directory. A merge file inside that directory keeps working. + its restricted directory. A merge file inside that directory keeps working. A daemon already had this through its module root and is unaffected. Daemon protocol / identity: - CVE-2026-53786 (MEDIUM): A client-supplied `--filter` merge file bypassed the module filter list (it was checked against the module-prefixed path, which - never matched a module rule). The module-dir prefix is now stripped before the - check. Reported by Mitchell Benjamin (Revamp Studio). + never matched a module rule). The module-dir prefix is now stripped before the + check. Reported by Mitchell Benjamin (Revamp Studio). - CVE-2026-53798 (MEDIUM): The daemon name converter mapped an unknown name to - uid/gid 0 (an empty response was read as `atol("") == 0`); with `fake super = - yes` the stored metadata became root-owned. An empty/non-numeric response is - now treated as a lookup failure. Reported by Mitchell Benjamin (Revamp + uid/gid 0 (an empty response was read as `atol("") == 0`); with `fake super = yes` the stored metadata became root-owned. An empty/non-numeric response is + now treated as a lookup failure. Reported by Mitchell Benjamin (Revamp Studio). - CVE-2026-53788 (MEDIUM): A peer-controlled name containing a newline/CR was written verbatim into the name-converter line protocol, allowing request - injection. Converter tokens containing control characters are now rejected. + injection. Converter tokens containing control characters are now rejected. Reported by Mitchell Benjamin (Revamp Studio). - CVE-2026-53789 (MEDIUM): A malicious daemon-sender could widen `--delete` scope by omitting the "no content dir" flag on an implied parent, making the - receiver run `delete_in_dir()` on it. Implied-parent directories are now - forced non-content on the receiver. Reported by Mitchell Benjamin (Revamp + receiver run `delete_in_dir()` on it. Implied-parent directories are now + forced non-content on the receiver. Reported by Mitchell Benjamin (Revamp Studio). - CVE-2026-53791 (CRITICAL): With `proxy protocol = true`, a client connecting directly (not via the trusted proxy) could send a PROXY header to spoof its - source address and bypass host-based access control. A forwarded address is + source address and bypass host-based access control. A forwarded address is now honoured only from a configured trusted-proxy peer. Injection and memory safety: @@ -383,21 +390,21 @@ Injection and memory safety: - CVE-2026-53790 (HIGH): Command / argument injection via unquoted peer- or host-controlled values -- the `RSYNC_CONNECT_PROG` `%H` host substitution, the daemon exec-hook `%RSYNC_*%` expansions, rsync-ssl hostspecs, and a missing - newline/CR in remote-shell argument quoting. Each sink is now quoted or + newline/CR in remote-shell argument quoting. Each sink is now quoted or validated (the hook escaping is confined to the shell-executed hooks, so ordinary daemon string parameters such as `path` are unaffected). - CVE-2026-53792 (MEDIUM): A malicious receiver sending a checksum header with a block count > 0 but block length == 0 drove the sender's rolling-match - arithmetic negative. A zero block length is now rejected. + arithmetic negative. A zero block length is now rejected. - CVE-2026-53794 (MEDIUM): `--max-alloc=0` disabled the per-allocation size cap (the defense behind CVE-2024-12084) and could be forwarded on the wire to - an unpatched daemon. A zero max-alloc is now rejected at both the client and - the daemon. Reported by Azizcan Dastan (Milenium Security). + an unpatched daemon. A zero max-alloc is now rejected at both the client and + the daemon. Reported by Azizcan Dastan (Milenium Security). Peer-triggerable memory corruption in the daemon protocol, found by a -daemon-protocol fuzzing pass and reported by Greg Kroah-Hartman. Each is a +daemon-protocol fuzzing pass and reported by Greg Kroah-Hartman. Each is a WRITE reachable from the wire, which is why these were split out from the crash-only findings in the same pass: @@ -429,49 +436,49 @@ Daemon availability and access control: greeting and then stall forever -- sending a line with no terminator, or trickling NUL-terminated arguments into `read_args()` one byte at a time -- holding a per-connection child open past the module's `max connections` - limit. The `timeout` parameter did not cover it, because `set_io_timeout()` - ran after the `read_args()` calls that needed covering. A separate deadline - now spans both, and the early-protocol argument count is bounded. Reported + limit. The `timeout` parameter did not cover it, because `set_io_timeout()` + ran after the `read_args()` calls that needed covering. A separate deadline + now spans both, and the early-protocol argument count is bounded. Reported independently by Chamal De Silva and by Michal Ruprich (Red Hat QE). - CVE-2026-70455 (HIGH): a daemon client could request an arbitrary Zstandard worker count via `--compress-threads`; 256 was measured as 257 threads in a - single connection. Now capped at 8 on a daemon, while local and - remote-shell invocations keep the operator's value. Reported, fixed and + single connection. Now capped at 8 on a daemon, while local and + remote-shell invocations keep the operator's value. Reported, fixed and tested by Filipe Casal of Trail of Bits, in collaboration with OpenAI. - CVE-2026-70453 (HIGH): quadratic CPU exhaustion in `hash_search()` from a - crafted chain of equal weak checksums. The chain walk is now bounded. First + crafted chain of equal weak checksums. The chain walk is now bounded. First reported as a performance problem in public rsync issue #217 by heyciao (2021); recognised as a security issue, bounded and regression-tested by - Stuart Inglis. This one was already public and was not embargoed. + Stuart Inglis. This one was already public and was not embargoed. - CVE-2026-70452 (HIGH): `hosts deny` failed OPEN when a configured hostname could not be resolved -- with `forward lookup` enabled, which is the default, - an unresolvable deny token admitted the host it was meant to block. It now - fails closed. Sibling of CVE-2026-43617. Reported by Leonid Bugaev. + an unresolvable deny token admitted the host it was meant to block. It now + fails closed. Sibling of CVE-2026-43617. Reported by Leonid Bugaev. - CVE-2026-70463 (HIGH): `auth users` ignored its documented comma-only - parsing. With a leading comma the split should be on commas alone, so that a + parsing. With a leading comma the split should be on commas alone, so that a group name containing a space can be written; it split on whitespace too, so a `deny` or `:ro` rule naming such a group was broken into two meaningless - tokens and never fired. Reported by Andres Berbescu. + tokens and never fired. Reported by Andres Berbescu. - CVE-2026-70460 (HIGH): a peer-supplied `--partial-dir` or `--backup-dir` was resolved by pathname, so an in-module symlink could redirect it and place - files outside the daemon's module root. Those paths are now confined. + files outside the daemon's module root. Those paths are now confined. Reported by Omar Elsayed (seks99x). Client-side: - CVE-2026-70462 (MEDIUM): a peer-supplied `MSG_IO_TIMEOUT` defeated the client's own I/O timeout -- a large value overflowed signed arithmetic, and a - non-positive value disabled the timeout outright. The value is now capped on - receipt and the arithmetic made overflow-safe. Reported by Z3R0S! (z3r0s6); + non-positive value disabled the timeout outright. The value is now capped on + receipt and the arithmetic made overflow-safe. Reported by Z3R0S! (z3r0s6); the non-positive case was reported by Leonid Bugaev. - CVE-2026-70454 (MEDIUM): `rsync-ssl` established an unauthenticated TLS - connection. In stunnel mode it neither required CA verification nor bound + connection. In stunnel mode it neither required CA verification nor bound the certificate to the requested hostname, so an active network attacker could impersonate the server; the openssl backend had a matching hostname gap in 3.2.0 through 3.2.3 (found and fixed in 2020 by Matt McCutchen). @@ -488,7 +495,7 @@ safety and robustness paths: the hashtable and file-list size computations are guarded against a 32-bit integer overflow that a peer's entry count could otherwise wrap into an under-allocation, and the `SIGUSR2` handler is now async-signal-safe (it only sets a flag, deferring the -summary/close-out work to safe poll points). Separately, the xattr/ACL metadata +summary/close-out work to safe poll points). Separately, the xattr/ACL metadata copy now reads the *source* through a held no-follow fd as well as writing the destination through one -- closing a parent-symlink race on the `--copy-dest` and backup source -- and the cross-tree operator-path metadata apply is now fd-pinned @@ -500,8 +507,8 @@ under `--fake-super` too (previously it fell back to a path-based set for a - Mask a peer-supplied I/O-error value to the defined `IOERR_*` bits, both the incoming `MSG_IO_ERROR` message (`io.c`) and the file-list trailer (`flist.c`), so a malicious peer cannot set arbitrary (undefined) error flags that would be - stored in the local `io_error` and re-forwarded upstream. (Undefined bits - never reached the exit code, which maps only the defined bits.) Reported by + stored in the local `io_error` and re-forwarded upstream. (Undefined bits + never reached the exit code, which maps only the defined bits.) Reported by Leonid Bugaev. - Escape control characters in filenames written to the log file (CWE-117 log @@ -510,21 +517,21 @@ under `--fake-super` too (previously it fell back to a path-based set for a escape sequences into an administrator's terminal when the log is viewed. Reported by Leonid Bugaev. -- Stop `safe_arg()` leaking an uninitialized byte into a quoted filename. In +- Stop `safe_arg()` leaking an uninitialized byte into a quoted filename. In filename mode the writer suppresses the escaping backslash before a wildcard, but the counter that sized the buffer reserved a slot for every backslash, so the two disagreed and left an uninitialized heap byte in the returned string - -- which is handed to the remote shell when `--protect-args` is off. The + -- which is handed to the remote shell when `--protect-args` is off. The counter now mirrors the writer, and guarding the wildcard test with `f[1]` also fixes a trailing backslash (previously `strchr()` matched the string - terminator, so the backslash was not doubled). Reported by Leonid Bugaev. + terminator, so the backslash was not doubled). Reported by Leonid Bugaev. - Close a `--safe-links` bypass in `--backup`: when symlinks can be hard-linked, `make_backup()`'s link/rename fast path hard-linked an unsafe (out-of-tree) symlink into the backup area and skipped the `safe_symlinks` check the copy - path applies, silently preserving a link `--safe-links` was meant to drop. The + path applies, silently preserving a link `--safe-links` was meant to drop. The safe-links check now runs before the fast path, and a symlink whose target is - unreadable is failed closed rather than backed up unchecked. Reported by + unreadable is failed closed rather than backed up unchecked. Reported by Leonid Bugaev. - Extend the operator-directory ownership walk to the backup leaf sinks: @@ -532,8 +539,8 @@ under `--fake-super` too (previously it fell back to a path-based set for a `do_rmdir_at()` (removing a pre-existing backup directory) now resolve their parent through the same ownership walk, so a foreign-owned parent symlink no longer redirects the backup symlink-create or directory-removal outside the - backup tree. `--insecure-links` (or a module's `insecure links = yes`) restores - the legacy follow. Reported by Omar Elsayed (seks99x). + backup tree. `--insecure-links` (or a module's `insecure links = yes`) restores + the legacy follow. Reported by Omar Elsayed (seks99x). - Confine an absolute operator source/destination through the ownership walk in `robust_rename()`'s cross-filesystem (EXDEV) copy fallback, so a raced parent @@ -543,7 +550,7 @@ under `--fake-super` too (previously it fell back to a path-based set for a - Bound the number of equal-weak-checksum blocks examined per offset in `hash_search()` (issue #217), so a crafted or degenerate checksum set with a very long equal-checksum chain cannot drive the sender's per-offset - match-verify into a quadratic blow-up (CPU DoS). Fix by Stuart Inglis. + match-verify into a quadratic blow-up (CPU DoS). Fix by Stuart Inglis. ### BUG FIXES: @@ -551,22 +558,22 @@ under `--fake-super` too (previously it fell back to a path-based set for a Reported by Leonid Bugaev. - The AVX2 rolling-checksum assembly (`--enable-roll-asm`) read up to 64 bytes - past the end of the buffer it was given. The loop is software-pipelined and + past the end of the buffer it was given. The loop is software-pipelined and preloaded the 64 bytes after the ones it was folding in, so its last iteration always reached beyond the data -- the remainder is by construction under 64 - bytes. It normally landed in slack inside rsync's map window and went + bytes. It normally landed in slack inside rsync's map window and went unnoticed; where the buffer ended at a page boundary it was a SIGSEGV mid - transfer, reported on macOS x86-64 by Roland Kletzing. Reported checksums are + transfer, reported on macOS x86-64 by Roland Kletzing. Reported checksums are unchanged. - `--link-dest` no longer fails the transfer when the destination refuses to - hard-link a symlink, device node, FIFO or socket. Whether rsync hard-links + hard-link a symlink, device node, FIFO or socket. Whether rsync hard-links those at all was decided at build time, on whatever filesystem the source tree happened to sit on, and one host can hold both answers -- macOS builds on - APFS, which can, and backs up to HFS+, which returns ENOTSUP. Such an entry + APFS, which can, and backs up to HFS+, which returns ENOTSUP. Such an entry is now copied, exactly as it already is in a build that cannot link them and as a regular file in the same position already was; the run used to exit 23 - even though the entry was then created correctly. The fallback covers any + even though the entry was then created correctly. The fallback covers any refusal, since the error does not identify one on its own: link(2) documents EPERM both for a filesystem without hard links and for a permission refusal. Still outstanding: under `-H`, a group of such entries hard-linked to each @@ -579,29 +586,28 @@ under `--fake-super` too (previously it fell back to a path-based set for a read past the checksum field. - A CVS `.cvsignore` (or `-C`) file containing a `!` clear-list token no longer - aborts with a spurious "rule has trailing characters" error. Reported by + aborts with a spurious "rule has trailing characters" error. Reported by Leonid Bugaev. - `--chmod=a+s` now sets both the setuid and setgid bits, matching `chmod(1)` - (it previously set setuid only). Reported by Leonid Bugaev. + (it previously set setuid only). Reported by Leonid Bugaev. - Case-insensitive wildcard matching (used by daemon `hosts allow`/`hosts deny` rules) now folds characters inside a `[...]` bracket expression, not just - literal pattern characters. Reported by Leonid Bugaev. + literal pattern characters. Reported by Leonid Bugaev. ### BEHAVIOR CHANGES: - A non-daemon receiver follows an operator-named symlinked destination directory - only when the symlink is owned by root or the running user (e.g. `rsync -a src/ - /backup/` where `/backup -> /mnt/disk`); a destination symlinked by another uid + only when the symlink is owned by root or the running user (e.g. `rsync -a src/ /backup/` where `/backup -> /mnt/disk`); a destination symlinked by another uid is now refused, closing a chdir TOCTOU where an attacker raced the named - destination into a symlink. `--insecure-links` restores the unconditional + destination into a symlink. `--insecure-links` restores the unconditional follow. - On platforms without a race-safe way to create a unix socket in a subdirectory (the BSDs, macOS, Solaris, which lack `bindat()`), a nested socket transferred under `--specials` is skipped with a warning instead of failing the whole - transfer. Top-level sockets are unaffected. + transfer. Top-level sockets are unaffected. - `proxy protocol = true` with no `proxy protocol hosts` rejects all connections (fail-closed); the daemon now warns about this at startup. @@ -620,20 +626,20 @@ under `--fake-super` too (previously it fell back to a path-based set for a ## Changes in this version: This is a conservative point release that backports regression fixes -on top of 3.4.3. No new features are included. +on top of 3.4.3. No new features are included. ### BUG FIXES: - Honour a relative alt-basis directory (e.g. `--link-dest=../sibling`, `--copy-dest`, `--compare-dest`) on a daemon receiver running with - `use chroot = no`. Such a path is re-anchored at the module root but + `use chroot = no`. Such a path is re-anchored at the module root but was then rejected by the receiver's secure open; it now works where - kernel-enforced confinement is available. See the PORTABILITY note - below for the platform limitation. Fixes #915. + kernel-enforced confinement is available. See the PORTABILITY note + below for the platform limitation. Fixes #915. - sender: open a module-root-absolute path for a `path = /` module so a daemon serving the filesystem root can satisfy absolute request - paths again. Fixes #897. + paths again. Fixes #897. - flist: accept the missing-args mode-0 entry in recv_file_entry. Fixes #910. @@ -648,14 +654,14 @@ on top of 3.4.3. No new features are included. - main: fix `--mkpath` with `--dry-run` for a file-to-file copy. Fixes #880. -- daemon: un-backslash escaped option args. Fixes #829. +- daemon: un-backslash escaped option args. Fixes #829. -- token: drain the matched-block insert deflate. Fixes #951. +- token: drain the matched-block insert deflate. Fixes #951. - Fix the "update skips a file of a different type" case and the daemon upload delete stats. -- alloc: revert "zero all new memory from allocations". Fixes #959. +- alloc: revert "zero all new memory from allocations". Fixes #959. - Always clear the stat buffer and validate nanoseconds before use. @@ -664,17 +670,17 @@ on top of 3.4.3. No new features are included. - The relative alt-basis fix for daemon receivers (#915) relies on kernel "stay below dirfd" path resolution -- `openat2(RESOLVE_BENEATH)` on Linux 5.6+, or `openat()` with `O_RESOLVE_BENEATH` on FreeBSD 13+ - and macOS 15+. On platforms that lack it (Solaris, OpenBSD, NetBSD, + and macOS 15+. On platforms that lack it (Solaris, OpenBSD, NetBSD, Cygwin and older Linux) `secure_relative_open()` deliberately rejects any path with a `..` component, so relative alt-basis directories remain unavailable there -- function traded for safety, matching the - trade-off already documented for the #715 fix. Absolute alt-basis + trade-off already documented for the #715 fix. Absolute alt-basis paths are unaffected on every platform. - openat2 is now autodetected at configure time (HAVE_OPENAT2): the `openat2(RESOLVE_BENEATH)` resolver is compiled in only when both `` and the `SYS_openat2` syscall number are present, - fixing the build on older kernels/headers. Fixes #924, #905, #900, + fixing the build on older kernels/headers. Fixes #924, #905, #900, #904. - Fall back to do_mknod() when mknodat() / mkfifoat() are unavailable. @@ -713,16 +719,16 @@ Thanks to everyone who helped with this release: ### SECURITY FIXES: -Six CVEs are fixed in this release. All six are assigned by -VulnCheck as CNA. Affected versions are 3.4.2 and earlier in every -case. Three of the six (CVE-2026-29518, CVE-2026-43617, +Six CVEs are fixed in this release. All six are assigned by +VulnCheck as CNA. Affected versions are 3.4.2 and earlier in every +case. Three of the six (CVE-2026-29518, CVE-2026-43617, CVE-2026-43619) require non-default daemon configuration to reach: the first and third need `use chroot = no` for a module, the second -needs `daemon chroot = ...` set in rsyncd.conf. Two (CVE-2026-43618, +needs `daemon chroot = ...` set in rsyncd.conf. Two (CVE-2026-43618, CVE-2026-43620) are reachable from a normal pull or a normal -authenticated daemon connection. The sixth (CVE-2026-45232) is +authenticated daemon connection. The sixth (CVE-2026-45232) is reachable only when `RSYNC_PROXY` is set and the proxy (or a MITM) -returns a pathological response. Many thanks to the external +returns a pathological response. Many thanks to the external researchers who reported these issues. - CVE-2026-29518 (CVSS v4.0 7.3, HIGH): TOCTOU symlink race condition @@ -732,84 +738,84 @@ researchers who reported these issues. attacker with write access to a module could replace a parent directory component with a symlink between the receiver's check and its open(), redirecting reads (basis-file disclosure) and writes - (file overwrite) outside the module. Default "use chroot = yes" is - not exposed. `secure_relative_open()` (added in 3.4.0 for + (file overwrite) outside the module. Default "use chroot = yes" is + not exposed. `secure_relative_open()` (added in 3.4.0 for CVE-2024-12086) was previously unused in the daemon-no-chroot case; the fix enables it there and reroutes the sender's - read-path opens through it. Reported by Nullx3D (Batuhan Sancak), + read-path opens through it. Reported by Nullx3D (Batuhan Sancak), Damien Neil and Michael Stapelberg. - CVE-2026-43617 (CVSS v3.1 4.8, MEDIUM): Hostname/ACL bypass on an rsync daemon configured with `daemon chroot = /X` in rsyncd.conf - when the chroot tree lacks DNS resolution support. The + when the chroot tree lacks DNS resolution support. The reverse-DNS lookup of the connecting client was performed *after* the daemon chroot had been entered; if /X did not contain the libc resolver fixtures (`/etc/resolv.conf`, `/etc/nsswitch.conf`, `/etc/hosts`, NSS service modules) the lookup failed and the connecting hostname was set to "UNKNOWN", causing hostname-based - deny rules to silently fail open. IP-based ACLs are unaffected. + deny rules to silently fail open. IP-based ACLs are unaffected. The per-module `use chroot` setting is unrelated to this issue. The fix performs the lookup before entering the daemon chroot. Reported by MegaManSec. - CVE-2026-43618 (CVSS v3.1 8.1, HIGH): Integer overflow in the compressed-token decoder enabling remote memory disclosure to an - authenticated daemon peer. The receiver accumulated a 32-bit + authenticated daemon peer. The receiver accumulated a 32-bit signed counter without overflow checking; a malicious sender could trigger an overflow that, with careful manipulation, leaked process memory contents to the attacker -- environment variables, passwords, heap and library pointers -- significantly weakening - ASLR. The fix bounds the counter and adds wire-input validation in - several adjacent places (defence-in-depth). Workaround for older - releases: `refuse options = compress` in rsyncd.conf. Reported by + ASLR. The fix bounds the counter and adds wire-input validation in + several adjacent places (defence-in-depth). Workaround for older + releases: `refuse options = compress` in rsyncd.conf. Reported by Omar Elsayed. - CVE-2026-43619 (CVSS v3.1 6.3, MEDIUM): Symlink races on path-based system calls in "use chroot = no" daemon mode (generalisation of - CVE-2026-29518). Earlier fixes for symlink races on the receiver's + CVE-2026-29518). Earlier fixes for symlink races on the receiver's open() call missed the same race class on every other path-based system call: chmod, lchown, utimes, rename, unlink, mkdir, symlink, - mknod, link, rmdir and lstat. The fix routes each affected + mknod, link, rmdir and lstat. The fix routes each affected path-based syscall through a parent dirfd opened under RESOLVE_BENEATH-equivalent kernel-enforced confinement (openat2 on Linux 5.6+, O_RESOLVE_BENEATH on FreeBSD 13+ and macOS 15+, - per-component O_NOFOLLOW walk elsewhere). Default "use chroot = - yes" is not exposed. Reported by Andrew Tridgell as a follow-on + per-component O_NOFOLLOW walk elsewhere). Default "use chroot = + yes" is not exposed. Reported by Andrew Tridgell as a follow-on audit of CVE-2026-29518. - CVE-2026-43620 (CVSS v3.1 6.5, MEDIUM): Out-of-bounds read in the receiver's recv_files() enabling remote denial-of-service of any client pulling from a malicious server (incomplete fix of commit - 797e17f). The earlier parent_ndx<0 guard added to send_files() was - not applied to the visually-identical block in recv_files(). A + 797e17f). The earlier parent_ndx\<0 guard added to send_files() was + not applied to the visually-identical block in recv_files(). A malicious rsync server can drive any connecting client into a deterministic SIGSEGV by setting CF_INC_RECURSE in the compatibility flags and sending a crafted file list and transfer - record. inc_recurse is the protocol-30+ default, so no special - options are required on the victim. Workaround for older - releases: `--no-inc-recursive` on the client. Reported by Pratham + record. inc_recurse is the protocol-30+ default, so no special + options are required on the victim. Workaround for older + releases: `--no-inc-recursive` on the client. Reported by Pratham Gupta. - CVE-2026-45232 (CVSS v3.1 3.1, LOW): Off-by-one out-of-bounds stack write in the rsync client's HTTP CONNECT proxy handler - (`establish_proxy_connection()` in `socket.c`). After issuing the + (`establish_proxy_connection()` in `socket.c`). After issuing the CONNECT request, rsync read the proxy's first response line one byte at a time into a 1024-byte stack buffer with the bound - `cp < &buffer[sizeof buffer - 1]`. If the proxy (or a MITM in + `cp < &buffer[sizeof buffer - 1]`. If the proxy (or a MITM in front of it) returned 1023+ bytes on that first line without a newline terminator, `cp` exited the loop pointing at a buffer slot the loop never wrote, leaving `*cp` holding stale stack data from - the earlier `snprintf()` of the outgoing CONNECT request. The + the earlier `snprintf()` of the outgoing CONNECT request. The post-loop logic then wrote a single `\0` one byte past the end of - the buffer on the stack. Reach is client-side only, and only when + the buffer on the stack. Reach is client-side only, and only when `RSYNC_PROXY` is set so rsync tunnels an `rsync://` connection - through an HTTP CONNECT proxy. The written byte is always `\0` + through an HTTP CONNECT proxy. The written byte is always `\0` and the offset is fixed by the buffer size, not attacker-chosen, so this is not an arbitrary-write primitive: practical impact is corruption of one adjacent stack byte and possible later - misbehaviour or crash. The fix detects the "buffer filled without + misbehaviour or crash. The fix detects the "buffer filled without finding `\n`" case explicitly by position and refuses the response - with "proxy response line too long". Reported by Aisle Research + with "proxy response line too long". Reported by Aisle Research via Michal Ruprich (rsync-3.4.1-2.el10 QE). In addition to the six CVE fixes, this release adds defence-in-depth @@ -828,7 +834,7 @@ modtime. ### BUG FIXES: -- Fixed a bypass of `--safe-links` when `--backup` is also used on a system that supports hard-linking symlinks (Linux, macOS). An escaping symlink that should have been skipped was silently preserved in the backup area. +- Fixed a bypass of `--safe-links` when `--backup` is also used on a system that supports hard-linking symlinks (Linux, macOS). An escaping symlink that should have been skipped was silently preserved in the backup area. - Fixed a spurious abort when using `-C` (cvs-exclude) mode with a `.cvsignore` file that contained a `!` (clear-list) token. @@ -846,8 +852,7 @@ modtime. ### PORTABILITY / BUILD: -- secure_relative_open() now uses `openat2(RESOLVE_BENEATH | - RESOLVE_NO_MAGICLINKS)` on Linux 5.6+, and `openat()` with +- secure_relative_open() now uses `openat2(RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS)` on Linux 5.6+, and `openat()` with `O_RESOLVE_BENEATH` on FreeBSD 13+ and macOS 15+ (Sequoia) / iOS 18+. The kernel rejects ".." escapes, absolute symlinks, and symlinks whose target lies outside the starting directory, while @@ -902,7 +907,7 @@ modtime. - Removed the old release system (replaced by the new release script in 3.4.2). ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.4.2 (28 Apr 2026) @@ -915,20 +920,20 @@ None were assigned a CVE — rsync's fork-per-connection design scopes the impact of each of these to the attacker's own connection, which is equivalent to the client closing the socket itself — but they are fixed here as a matter of hygiene and to reduce the chances of a -future exploitable combination. Many thanks to the external +future exploitable combination. Many thanks to the external researchers who reported these issues. - Fixed a signed integer overflow in the PROXY protocol v2 header parser: a negative `len` field could bypass the size check and cause - a stack buffer overflow in `read_buf()`. Reported by John Walker of + a stack buffer overflow in `read_buf()`. Reported by John Walker of ZeroPath. -- Fixed an invalid access to the files array. Reported by Calum +- Fixed an invalid access to the files array. Reported by Calum Hutton of Rapid7. - Reject negative token values in the compressed-stream token decoder; a negative value could cause callers to misinterpret a - missing data pointer as literal data. Reported by Will Sergeant. + missing data pointer as literal data. Reported by Will Sergeant. - Fixed the element count passed to the xattr `qsort()` (see https://www.openwall.com/lists/oss-security/2026/04/16/2). @@ -946,7 +951,7 @@ researchers who reported these issues. - Zero all new memory from internal allocations: `my_alloc()` now uses `calloc`, and `expand_item_list()` zeros the expanded portion after - `realloc`. This gives more predictable behaviour if stale or + `realloc`. This gives more predictable behaviour if stale or uninitialised memory is ever accidentally read. ### BUG FIXES: @@ -979,7 +984,7 @@ researchers who reported these issues. - Added the missing `--dirs` long option. - Fixed a segfault if `poptGetContext()` returns NULL (e.g. under - OOM) by not passing NULL to `poptReadDefaultConfig()`. Reported by + OOM) by not passing NULL to `poptReadDefaultConfig()`. Reported by Ronnie Sahlberg; found with `malloc-fail-tester`. - Fixed a build error on ia64 NonStop (which treats missing @@ -1003,7 +1008,7 @@ researchers who reported these issues. - Fixed glibc 2.43 const-preserving overloads of `strtok()`, `strchr()` etc. by declaring the affected locals with the right - constness. Contributed by Holger Hoffstätte. + constness. Contributed by Holger Hoffstätte. - Converted the bundled zlib 1.2.8 from K&R-style function definitions to ANSI prototypes, so it builds with clang 16+. @@ -1012,13 +1017,13 @@ researchers who reported these issues. - `configure.ac`: check for xattr functions in libc first and only fall back to `-lattr`, avoiding spurious overlinking when `-lattr` - happens to be installed. Contributed by Eli Schwartz. + happens to be installed. Contributed by Eli Schwartz. - Made the build reproducible by honouring `SOURCE_DATE_EPOCH` for the manpage date. - Removed obsolete `popt/findme.c` and `popt/findme.h` that upstream - popt 1.14 folded into `popt.c` (fixes #710). Contributed by Alan + popt 1.14 folded into `popt.c` (fixes #710). Contributed by Alan Coopersmith. ### INTERNAL: @@ -1043,7 +1048,7 @@ researchers who reported these issues. - removed support for the unmaintained rsync-patches archive ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.4.1 (16 Jan 2025) @@ -1053,19 +1058,19 @@ Release 3.4.1 is a fix for regressions introduced in 3.4.0 ### BUG FIXES: - - fixed handling of -H flag with conflict in internal flag values +- fixed handling of -H flag with conflict in internal flag values - - fixed a user after free in logging of failed rename +- fixed a user after free in logging of failed rename - - fixed build on systems without openat() +- fixed build on systems without openat() - - removed dependency on alloca() in bundled popt +- removed dependency on alloca() in bundled popt ### DEVELOPER RELATED: - - fix to permissions handling in the developer release script +- fix to permissions handling in the developer release script ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.4.0 (15 Jan 2025) @@ -1078,8 +1083,8 @@ https://kb.cert.org/vuls/id/952657 ### PROTOCOL NUMBER: - - The protocol number was changed to 32 to make it easier for - administrators to check their servers have been updated +- The protocol number was changed to 32 to make it easier for + administrators to check their servers have been updated ### SECURITY FIXES: @@ -1120,7 +1125,7 @@ to develop and test fixes. - added FreeBSD and Solaris CI builds ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.3.0 (6 Apr 2024) @@ -1176,16 +1181,16 @@ to develop and test fixes. - Some manpage improvements on the handling of [global] modules. - Changed the mapfrom & mapto perl scripts (in the support dir) into a single - python script named idmap. Converted a couple more perl scripts into python. + python script named idmap. Converted a couple more perl scripts into python. - Changed the mnt-excl perl script (in the support dir) into a python script. ### DEVELOPER RELATED: - - Updated config.guess (timestamp 2023-01-01) and config.sub (timestamp - 2023-01-21). +- Updated config.guess (timestamp 2023-01-01) and config.sub (timestamp + 2023-01-21). ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.7 (20 Oct 2022) @@ -1207,34 +1212,34 @@ to develop and test fixes. ### ENHANCEMENTS: - Added negotiated daemon-auth support that allows a stronger checksum digest - to be used to validate a user's login to the daemon. Added SHA512, SHA256, - and SHA1 digests to MD5 & MD4. These new digests are at the highest priority + to be used to validate a user's login to the daemon. Added SHA512, SHA256, + and SHA1 digests to MD5 & MD4. These new digests are at the highest priority in the new daemon-auth negotiation list. -- Added support for the SHA1 digest in file checksums. While this tends to be - overkill, it is available if someone really needs it. This overly-long +- Added support for the SHA1 digest in file checksums. While this tends to be + overkill, it is available if someone really needs it. This overly-long checksum is at the lowest priority in the normal checksum negotiation list. See [`--checksum-choice`](rsync.1#opt) (`--cc`) and the `RSYNC_CHECKSUM_LIST` environment var for how to customize this. - Improved the xattr hash table to use a 64-bit key without slowing down the - key's computation. This should make extra sure that a hash collision doesn't + key's computation. This should make extra sure that a hash collision doesn't happen. - If the `--version` option is repeated (e.g. `-VV`) then the information is - output in a (still readable) JSON format. Client side only. + output in a (still readable) JSON format. Client side only. - The script `support/json-rsync-version` is available to get the JSON style - version output from any rsync. The script accepts either text on stdin + version output from any rsync. The script accepts either text on stdin **or** an arg that specifies an rsync executable to run with a doubled - `--version` option. If the text we get isn't already in JSON format, it is + `--version` option. If the text we get isn't already in JSON format, it is converted. Newer rsync versions will provide more complete json info than older rsync versions. Various tweaks are made to keep the flag names consistent across versions. - The [`use chroot`](rsyncd.conf.5#) daemon parameter now defaults to "unset" so that rsync can use chroot when it works and a sanitized copy when chroot - is not supported (e.g., for a non-root daemon). Explicitly setting the + is not supported (e.g., for a non-root daemon). Explicitly setting the parameter to true or false (on or off) behaves the same way as before. - The `--fuzzy` option was optimized a bit to try to cut down on the amount of @@ -1242,7 +1247,7 @@ to develop and test fixes. Kenneth Finnegan resulted in about a 2x speedup. - If rsync is forced to use protocol 29 or before (perhaps due to talking to an - rsync before 3.0.0), the modify time of a file is limited to 4-bytes. Rsync + rsync before 3.0.0), the modify time of a file is limited to 4-bytes. Rsync now interprets this value as an unsigned integer so that a current year past 2038 can continue to be represented. This does mean that years prior to 1970 cannot be represented in an older protocol, but this trade-off seems like the @@ -1251,26 +1256,26 @@ to develop and test fixes. - The rsync client now treats an empty destination arg as an error, just like it does for an empty source arg. This doesn't affect a `host:` arg (which is - treated the same as `host:.`) since the arg is not completely empty. The use + treated the same as `host:.`) since the arg is not completely empty. The use of [`--old-args`](rsync.1#opt) (including via `RSYNC_OLD_ARGS`) allows the prior behavior of treating an empty destination arg as a ".". ### PACKAGING RELATED: - The checksum code now uses openssl's EVP methods, which gets rid of various - deprecation warnings and makes it easy to support more digest methods. On + deprecation warnings and makes it easy to support more digest methods. On newer systems, the MD4 digest is marked as legacy in the openssl code, which - makes openssl refuse to support it via EVP. You can choose to ignore this + makes openssl refuse to support it via EVP. You can choose to ignore this and allow rsync's MD4 code to be used for older rsync connections (when talking to an rsync prior to 3.0.0) or you can choose to configure rsync to tell openssl to enable legacy algorithms (see below). - A simple openssl config file is supplied that can be installed for rsync to - use. If you install packaging/openssl-rsync.cnf to a public spot (such as + use. If you install packaging/openssl-rsync.cnf to a public spot (such as `/etc/ssl/openssl-rsync.cnf`) and then run configure with the option `--with-openssl-conf=/path/name.cnf`, this will cause rsync to export the configured path in the OPENSSL_CONF environment variable (when the variable - is not already set). This will enable openssl's MD4 code for rsync to use. + is not already set). This will enable openssl's MD4 code for rsync to use. - The packager may wish to include an explicit "use chroot = true" in the top section of their supplied /etc/rsyncd.conf file if the daemon is being @@ -1278,14 +1283,14 @@ to develop and test fixes. with the value unset, a little extra paranoia doesn't hurt). - I've noticed that some packagers haven't installed support/nameconvert for - users to use in their chrooted rsync configs. Even if it is not installed + users to use in their chrooted rsync configs. Even if it is not installed as an executable script (to avoid a python3 dependency) it would be good to install it with the other rsync-related support scripts. - It would be good to add support/json-rsync-version to the list of installed support scripts. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.6 (9 Sep 2022) @@ -1314,13 +1319,13 @@ to develop and test fixes. - Rename `--protect-args` to [`--secluded-args`](rsync.1#opt) to make it clearer how it differs from the default backslash-escaped arg-protecting - behavior of rsync. The old option names are still accepted. The + behavior of rsync. The old option names are still accepted. The environment-variable override did not change its name. ### PACKAGING RELATED: - The configure option `--with-protected-args` was renamed to - `--with-secluded-args`. This option makes `--secluded-args` the default + `--with-secluded-args`. This option makes `--secluded-args` the default rsync behavior instead of using backslash escaping for protecting args. - The mkgitver script now makes sure that a `.git` dir/file is in the top-level @@ -1336,7 +1341,7 @@ to develop and test fixes. - The name_num_obj struct was modified to allow its dynamic name_num_item list to be initialized in a better way. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.5 (14 Aug 2022) @@ -1346,14 +1351,14 @@ to develop and test fixes. - Added some file-list safety checking that helps to ensure that a rogue sending rsync can't add unrequested top-level names and/or include recursive - names that should have been excluded by the sender. These extra safety - checks only require the receiver rsync to be updated. When dealing with an + names that should have been excluded by the sender. These extra safety + checks only require the receiver rsync to be updated. When dealing with an untrusted sending host, it is safest to copy into a dedicated destination directory for the remote content (i.e. don't copy into a destination directory that contains files that aren't from the remote host unless you trust the remote host). Fixes CVE-2022-29154. - - A fix for CVE-2022-37434 in the bundled zlib (buffer overflow issue). +- A fix for CVE-2022-37434 in the bundled zlib (buffer overflow issue). ### BUG FIXES: @@ -1395,7 +1400,7 @@ to develop and test fixes. build on a host that has strlcpy() in the main libc but not defined in the main string.h file. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.4 (15 Apr 2022) @@ -1403,272 +1408,272 @@ to develop and test fixes. ### BEHAVIOR CHANGES: - - A new form of arg protection was added that works similarly to the older - `--protect-args` ([`-s`](rsync.1#opt)) option but in a way that avoids - breaking things like rrsync (the restricted rsync script): rsync now uses - backslash escaping for sending "shell-active" characters to the remote shell - (such as `$(){}<>#&` and others). This includes spaces, so fetching a remote - file via a quoted filename value now works by default without any extra - quoting: - - ```shell - rsync -aiv host:'a simple file.pdf' . - ``` - - Wildcards are not escaped in filename args, but they are escaped in options - like the [`--suffix`](rsync.1#opt) and [`--usermap`](rsync.1#opt) values. - - If a script depends on the old arg behavior (perhaps because it quotes or - protects the args already, or perhaps because it expects arg splitting), - there are two easy ways to get things going with a modern rsync: either - `export RSYNC_OLD_ARGS=1` in the script's environment (perhaps in the script - itself) or add the option [`--old-args`](rsync.1#opt) to the rsync commands - that are run. See also the [ADVANCED USAGE](rsync.1#) section of rsync's - manpage for how to use a more modern arg style. - - - A long-standing bug was preventing rsync from figuring out the current - locale's decimal point character, which made rsync always output numbers - using the "C" locale. Since this is now fixed in 3.2.4, a script that - parses rsync's decimal numbers (e.g. from the verbose footer) may want to - setup the environment in a way that the output continues to be in the C - locale. For instance, one of the following should work fine: - - ```shell - export LC_ALL=C.UTF-8 - ``` - - or if iconv translations are needed: - - ```shell - if [ "${LC_ALL:-}" ]; then - export LANG="$LC_ALL" - export LC_CTYPE="$LC_ALL" - unset LC_ALL - fi - export LC_NUMERIC=C.UTF-8 - ``` +- A new form of arg protection was added that works similarly to the older + `--protect-args` ([`-s`](rsync.1#opt)) option but in a way that avoids + breaking things like rrsync (the restricted rsync script): rsync now uses + backslash escaping for sending "shell-active" characters to the remote shell + (such as `$(){}<>#&` and others). This includes spaces, so fetching a remote + file via a quoted filename value now works by default without any extra + quoting: + + ```shell + rsync -aiv host:'a simple file.pdf' . + ``` + + Wildcards are not escaped in filename args, but they are escaped in options + like the [`--suffix`](rsync.1#opt) and [`--usermap`](rsync.1#opt) values. + + If a script depends on the old arg behavior (perhaps because it quotes or + protects the args already, or perhaps because it expects arg splitting), + there are two easy ways to get things going with a modern rsync: either + `export RSYNC_OLD_ARGS=1` in the script's environment (perhaps in the script + itself) or add the option [`--old-args`](rsync.1#opt) to the rsync commands + that are run. See also the [ADVANCED USAGE](rsync.1#) section of rsync's + manpage for how to use a more modern arg style. + +- A long-standing bug was preventing rsync from figuring out the current + locale's decimal point character, which made rsync always output numbers + using the "C" locale. Since this is now fixed in 3.2.4, a script that + parses rsync's decimal numbers (e.g. from the verbose footer) may want to + setup the environment in a way that the output continues to be in the C + locale. For instance, one of the following should work fine: + + ```shell + export LC_ALL=C.UTF-8 + ``` + + or if iconv translations are needed: + + ```shell + if [ "${LC_ALL:-}" ]; then + export LANG="$LC_ALL" + export LC_CTYPE="$LC_ALL" + unset LC_ALL + fi + export LC_NUMERIC=C.UTF-8 + ``` ### SECURITY FIXES: - - A fix for CVE-2018-25032 in the bundled zlib (memory corruption issue). +- A fix for CVE-2018-25032 in the bundled zlib (memory corruption issue). ### BUG FIXES: - - Fixed a bug with [`--inplace`](rsync.1#opt) + [`--sparse`](rsync.1#opt) (and - a lack of [`--whole-file`](rsync.1#opt)) where the destination file could - get reconstructed with bogus data. Since the bug can also be avoided by - using (the seemingly redundant) [`--no-W`](rsync.1#opt) on the receiving - side, the latest rsync will now send `--no-W` to a remote receiver when this - option combination occurs. If your client rsync is not new enough to do - this for you (or if you're just paranoid), you can manually specify `--no-W - -M--no-W` (when not using [`--whole-file`](rsync.1#opt)) to make sure the - bug is avoided. +- Fixed a bug with [`--inplace`](rsync.1#opt) + [`--sparse`](rsync.1#opt) (and + a lack of [`--whole-file`](rsync.1#opt)) where the destination file could + get reconstructed with bogus data. Since the bug can also be avoided by + using (the seemingly redundant) [`--no-W`](rsync.1#opt) on the receiving + side, the latest rsync will now send `--no-W` to a remote receiver when this + option combination occurs. If your client rsync is not new enough to do + this for you (or if you're just paranoid), you can manually specify `--no-W -M--no-W` (when not using [`--whole-file`](rsync.1#opt)) to make sure the + bug is avoided. - - Fixed a bug with [`--mkpath`](rsync.1#opt) if a single-file copy specifies - an existing destination dir with a non-existing destination filename. +- Fixed a bug with [`--mkpath`](rsync.1#opt) if a single-file copy specifies + an existing destination dir with a non-existing destination filename. - - Fixed `--update -vv` to output "is uptodate" instead of "is newer" messages - for files that are being skipped due to an identical modify time. (This was - a new output quirk in 3.2.3.) +- Fixed `--update -vv` to output "is uptodate" instead of "is newer" messages + for files that are being skipped due to an identical modify time. (This was + a new output quirk in 3.2.3.) - - When doing an append transfer, the sending side's file must not get shorter - or it is skipped. Fixes a crash that could occur when the size changes to 0 - in the middle of the send negotiations. +- When doing an append transfer, the sending side's file must not get shorter + or it is skipped. Fixes a crash that could occur when the size changes to 0 + in the middle of the send negotiations. - - When dealing with special files (see [`--specials`](rsync.1#opt)) in an - alt-dest hierarchy, rsync now checks the non-permission mode bits to ensure - that the 2 special files are really the same before hard-linking them - together. +- When dealing with special files (see [`--specials`](rsync.1#opt)) in an + alt-dest hierarchy, rsync now checks the non-permission mode bits to ensure + that the 2 special files are really the same before hard-linking them + together. - - Fixed a bug where [`--delay-updates`](rsync.1#opt) with stale partial data - could cause a file to fail to update. +- Fixed a bug where [`--delay-updates`](rsync.1#opt) with stale partial data + could cause a file to fail to update. - - Fixed a few places that would output an INFO message with - [`--info=NAME`](rsync.1#opt) that should only have been output given - [`--verbose`](rsync.1#opt) or [`--itemize-changes`](rsync.1#opt). +- Fixed a few places that would output an INFO message with + [`--info=NAME`](rsync.1#opt) that should only have been output given + [`--verbose`](rsync.1#opt) or [`--itemize-changes`](rsync.1#opt). - - Avoid a weird failure if you run a local copy with a (useless) - [`--rsh`](rsync.1#opt) option that contains a `V` in the command. +- Avoid a weird failure if you run a local copy with a (useless) + [`--rsh`](rsync.1#opt) option that contains a `V` in the command. - - Fixed a long-standing compression bug where the compression level of the - first file transferred affected the level for all future files. Also, the - per-file compression skipping has apparently never worked, so it is now - documented as being ineffective. +- Fixed a long-standing compression bug where the compression level of the + first file transferred affected the level for all future files. Also, the + per-file compression skipping has apparently never worked, so it is now + documented as being ineffective. - - Fixed a truncate error when a `--write-devices` copy wrote a file onto a - device that was shorter than the device. +- Fixed a truncate error when a `--write-devices` copy wrote a file onto a + device that was shorter than the device. - - Made `--write-devices` support both `--checksum` and `--no-whole-file` when - copying to a device. +- Made `--write-devices` support both `--checksum` and `--no-whole-file` when + copying to a device. - - Improved how the [`--stop-at`](rsync.1#opt), [`--stop-after`](rsync.1#opt), - and (the deprecated) [`--time-limit`](rsync.1#opt) options check to see if - the allowed time is over, which should make rsync exit more consistently. +- Improved how the [`--stop-at`](rsync.1#opt), [`--stop-after`](rsync.1#opt), + and (the deprecated) [`--time-limit`](rsync.1#opt) options check to see if + the allowed time is over, which should make rsync exit more consistently. - - Tweak --progress to display "`??:??:??`" when the time-remaining value is so - large as to be meaningless. +- Tweak --progress to display "`??:??:??`" when the time-remaining value is so + large as to be meaningless. - - Silence some chmod warnings about symlinks when it looks like we have a - function to set their permissions but they can't really be set. +- Silence some chmod warnings about symlinks when it looks like we have a + function to set their permissions but they can't really be set. - - Fixed a potential issue in git-set-file-times when handling commits with - high-bit characters in the description & when handling a description that - might mimic the git raw-commit deliniators. (See the support dir.) +- Fixed a potential issue in git-set-file-times when handling commits with + high-bit characters in the description & when handling a description that + might mimic the git raw-commit deliniators. (See the support dir.) - - The bundled systemd/rsync.service file now includes `Restart=on-failure`. +- The bundled systemd/rsync.service file now includes `Restart=on-failure`. ### ENHANCEMENTS: - - Use openssl's `-verify_hostname` option in the rsync-ssl script. +- Use openssl's `-verify_hostname` option in the rsync-ssl script. - - Added extra info to the "FILENAME exists" output of - [`--ignore-existing`](rsync.1#opt) when [`--info=skip2`](rsync.1#opt) is - used. The skip message becomes "FILENAME exists (INFO)" where the INFO is - one of "type change", "sum change" (requires [`--checksum`](rsync.1#opt)), - "file change" (based on the quick check), "attr change", or "uptodate". - Prior versions only supported `--info=skip1`. +- Added extra info to the "FILENAME exists" output of + [`--ignore-existing`](rsync.1#opt) when [`--info=skip2`](rsync.1#opt) is + used. The skip message becomes "FILENAME exists (INFO)" where the INFO is + one of "type change", "sum change" (requires [`--checksum`](rsync.1#opt)), + "file change" (based on the quick check), "attr change", or "uptodate". + Prior versions only supported `--info=skip1`. - - Added the [`--fsync`](rsync.1#opt) option (promoted from the patches repo). +- Added the [`--fsync`](rsync.1#opt) option (promoted from the patches repo). - - Added the [`--copy-devices`](rsync.1#opt) option. Compared to the - historical version from the rsync-patches repo, this version: properly - handles `--checksum`; fixes a truncation bug when doing an `--inplace` copy - onto a longer file; fixes several bugs in the `--itemize` output; and only - the sending side needs the enhanced rsync for the copy to work. +- Added the [`--copy-devices`](rsync.1#opt) option. Compared to the + historical version from the rsync-patches repo, this version: properly + handles `--checksum`; fixes a truncation bug when doing an `--inplace` copy + onto a longer file; fixes several bugs in the `--itemize` output; and only + the sending side needs the enhanced rsync for the copy to work. - - Reduced memory usage for an incremental transfer that has a bunch of small - directories. +- Reduced memory usage for an incremental transfer that has a bunch of small + directories. - - The rsync daemon can now handle a client address with an implied "%scope" - suffix. +- The rsync daemon can now handle a client address with an implied "%scope" + suffix. - - Added support for [`--atimes`](rsync.1#opt) on macOS and fixed a bug where - it wouldn't work without [`--times`](rsync.1#opt). +- Added support for [`--atimes`](rsync.1#opt) on macOS and fixed a bug where + it wouldn't work without [`--times`](rsync.1#opt). - - Rsync can now update the xattrs on a read-only file when your user can - temporarily add user-write permission to the file. (It always worked for a - root transfer.) +- Rsync can now update the xattrs on a read-only file when your user can + temporarily add user-write permission to the file. (It always worked for a + root transfer.) - - Rsync can now work around an [`--inplace`](rsync.1#opt) update of a file - that is being refused due to the Linux fs.protected_regular sysctl setting. +- Rsync can now work around an [`--inplace`](rsync.1#opt) update of a file + that is being refused due to the Linux fs.protected_regular sysctl setting. - - When [`--chown`](rsync.1#opt), [`--usermap`](rsync.1#opt), or - [`--groupmap`](rsync.1#opt) is specified, rsync now makes sure that the - appropriate [`--owner`](rsync.1#opt) and/or [`--group`](rsync.1#opt) options - are enabled. +- When [`--chown`](rsync.1#opt), [`--usermap`](rsync.1#opt), or + [`--groupmap`](rsync.1#opt) is specified, rsync now makes sure that the + appropriate [`--owner`](rsync.1#opt) and/or [`--group`](rsync.1#opt) options + are enabled. - - Added the [`--info=NONREG`](rsync.1#opt) setting to control if rsync should - warn about non-regular files in the transfer. This is enabled by default - (keeping the behavior the same as before), so specifying `--info=nonreg0` - can be used to turn the warnings off. +- Added the [`--info=NONREG`](rsync.1#opt) setting to control if rsync should + warn about non-regular files in the transfer. This is enabled by default + (keeping the behavior the same as before), so specifying `--info=nonreg0` + can be used to turn the warnings off. - - An optional asm optimization for the rolling checksum from Shark64. Enable - it with `./configure --enable-roll-asm`. +- An optional asm optimization for the rolling checksum from Shark64. Enable + it with `./configure --enable-roll-asm`. - - Using `--debug=FILTER` now outputs a caution message if a filter rule - has trailing whitespace. +- Using `--debug=FILTER` now outputs a caution message if a filter rule + has trailing whitespace. - - Transformed rrsync into a python script with improvements: - - Security has been beefed up. - - The known rsync options were updated to include recent additions. - - Make rrsync reject [`--copy-links`](rsync.1#opt) (`-L`), - [`--copy-dirlinks`](rsync.1#opt) (`-k`), & - [`--keep-dirlinks`](rsync.1#opt) (`-K`) by default to make it harder to - exploit any out-of-subdir symlinks. - - A new rrsync option of [`-munge`](rrsync.1#opt) tells rrsync to always - enable rsync's [`--munge-links`](rsync.1#opt) option on the server side. - - A new rrsync option of [`-no-lock`](rrsync.1#opt) disables a new - single-use locking idiom that is the default when [`-ro`](rrsync.1#opt) is - not used (useful with [`-munge`](rrsync.1#opt)). - - A new rrsync option of [`-no-del`](rrsync.1#opt) disables all `--remove*` - and `--delete*` rsync options on the server side. - - The log format has been tweaked slightly to add seconds to the timestamp - and to output the command executed as a tuple (making the args clearer). - - An rrsync.1 manpage was added (in the support dir with rrsync). +- Transformed rrsync into a python script with improvements: - - Added options to the lsh script to facilitate rrsync testing. (See the - support dir.) + - Security has been beefed up. + - The known rsync options were updated to include recent additions. + - Make rrsync reject [`--copy-links`](rsync.1#opt) (`-L`), + [`--copy-dirlinks`](rsync.1#opt) (`-k`), & + [`--keep-dirlinks`](rsync.1#opt) (`-K`) by default to make it harder to + exploit any out-of-subdir symlinks. + - A new rrsync option of [`-munge`](rrsync.1#opt) tells rrsync to always + enable rsync's [`--munge-links`](rsync.1#opt) option on the server side. + - A new rrsync option of [`-no-lock`](rrsync.1#opt) disables a new + single-use locking idiom that is the default when [`-ro`](rrsync.1#opt) is + not used (useful with [`-munge`](rrsync.1#opt)). + - A new rrsync option of [`-no-del`](rrsync.1#opt) disables all `--remove*` + and `--delete*` rsync options on the server side. + - The log format has been tweaked slightly to add seconds to the timestamp + and to output the command executed as a tuple (making the args clearer). + - An rrsync.1 manpage was added (in the support dir with rrsync). - - Transformed the atomic-rsync script into a python script and added the - ability to ignore one or more non-zero exit codes. By default, it now - ignores code 24, the file-vanished exit code. (See the support dir.) +- Added options to the lsh script to facilitate rrsync testing. (See the + support dir.) - - Transformed the munge-symlinks script into python. (See the support dir.) +- Transformed the atomic-rsync script into a python script and added the + ability to ignore one or more non-zero exit codes. By default, it now + ignores code 24, the file-vanished exit code. (See the support dir.) - - Improved the rsync-no-vanished script to not join stdout & stderr together. - (See the support dir.) +- Transformed the munge-symlinks script into python. (See the support dir.) - - Work around a glibc bug where lchmod() breaks in a chroot w/o /proc mounted. +- Improved the rsync-no-vanished script to not join stdout & stderr together. + (See the support dir.) - - Try to support a client that sent a remote rsync a wacko stderr file handle - (such as an older File::RsyncP perl library used by BackupPC). +- Work around a glibc bug where lchmod() breaks in a chroot w/o /proc mounted. - - Lots of manpage improvements, including better HTML versions. +- Try to support a client that sent a remote rsync a wacko stderr file handle + (such as an older File::RsyncP perl library used by BackupPC). + +- Lots of manpage improvements, including better HTML versions. ### PACKAGING RELATED: - - Give configure the `--with-rrsync` option if you want `make install` to - install the (now python3) rrsync script and its new manpage. +- Give configure the `--with-rrsync` option if you want `make install` to + install the (now python3) rrsync script and its new manpage. - - If the rrsync script is installed, its package should be changed to depend - on python3 and the (suggested but not mandatory) python3 braceexpand lib. +- If the rrsync script is installed, its package should be changed to depend + on python3 and the (suggested but not mandatory) python3 braceexpand lib. - - When creating a package from a non-release version (w/o a git checkout), the - packager can elect to create git-version.h and define RSYNC_GITVER to the - string they want `--version` to output. (The file is still auto-generated - using the output of `git describe` when building inside a non-shallow git - checkout, though.) +- When creating a package from a non-release version (w/o a git checkout), the + packager can elect to create git-version.h and define RSYNC_GITVER to the + string they want `--version` to output. (The file is still auto-generated + using the output of `git describe` when building inside a non-shallow git + checkout, though.) - - Renamed configure's `--enable-simd` option to `--enable-roll-simd` and added - the option `--enable-roll-asm` to use the new asm version of the code. Both - are x86_64/amd64 only. +- Renamed configure's `--enable-simd` option to `--enable-roll-simd` and added + the option `--enable-roll-asm` to use the new asm version of the code. Both + are x86_64/amd64 only. - - Renamed configure's `--enable-asm` option to `--enable-md5-asm` to avoid - confusion with the asm option for the rolling checksum. It is also honored - even when openssl crypto is in use. This allows: normal MD4 & MD5, normal - MD4 + asm MD5, openssl MD4 & MD5, or openssl MD4 + asm MD5 depending on the - configure options selected. +- Renamed configure's `--enable-asm` option to `--enable-md5-asm` to avoid + confusion with the asm option for the rolling checksum. It is also honored + even when openssl crypto is in use. This allows: normal MD4 & MD5, normal + MD4 + asm MD5, openssl MD4 & MD5, or openssl MD4 + asm MD5 depending on the + configure options selected. - - Made SIMD & asm configure checks default to "no" on non-Linux hosts due to - various reports of problems on NetBSD & macOS hosts. These were also - tweaked to allow enabling the feature on a host_cpu of amd64 (was only - allowed on x86_64 before). +- Made SIMD & asm configure checks default to "no" on non-Linux hosts due to + various reports of problems on NetBSD & macOS hosts. These were also + tweaked to allow enabling the feature on a host_cpu of amd64 (was only + allowed on x86_64 before). - - Fixed configure to not fail at the SIMD check when cross-compiling. +- Fixed configure to not fail at the SIMD check when cross-compiling. - - Improved the IPv6 determination in configure. +- Improved the IPv6 determination in configure. - - Compile the C files with `-pedantic-errors` (when possible) so that we will - get warned if a static initialization overflows in the future (among other - things). +- Compile the C files with `-pedantic-errors` (when possible) so that we will + get warned if a static initialization overflows in the future (among other + things). - - When linking with an external zlib, rsync renames its `read_buf()` function - to `read_buf_()` to avoid a symbol clash on an unpatched zlib. +- When linking with an external zlib, rsync renames its `read_buf()` function + to `read_buf_()` to avoid a symbol clash on an unpatched zlib. - - Added a SECURITY.md file. +- Added a SECURITY.md file. ### DEVELOPER RELATED: - - Made it easier to write rsync tests that diff the output while also checking - the status code, and used the idiom to improve the existing tests. (See the - `checkdiff` and `checkdiff2` idioms in the `testsuite/*.test` files. +- Made it easier to write rsync tests that diff the output while also checking + the status code, and used the idiom to improve the existing tests. (See the + `checkdiff` and `checkdiff2` idioms in the `testsuite/*.test` files. - - The packaging scripts & related python lib got some minor enhancements. +- The packaging scripts & related python lib got some minor enhancements. ### INTERNAL - - Use setenv() instead of putenv() when it is available. +- Use setenv() instead of putenv() when it is available. - - Improve the logic in compat.c so that we don't need to try to remember to - sprinkle `!local_server` exceptions throughout the protocol logic. +- Improve the logic in compat.c so that we don't need to try to remember to + sprinkle `!local_server` exceptions throughout the protocol logic. - - One more C99 Flexible Array improvement (started in the last release) and - make use of the C99 `%zd` format string when printing size_t values (when - possible). +- One more C99 Flexible Array improvement (started in the last release) and + make use of the C99 `%zd` format string when printing size_t values (when + possible). - - Use mallinfo2() instead of mallinfo(), when available. +- Use mallinfo2() instead of mallinfo(), when available. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.3 (6 Aug 2020) @@ -1676,104 +1681,103 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a bug in the xattr code that was freeing the wrong object when trying - to cleanup the xattr list. +- Fixed a bug in the xattr code that was freeing the wrong object when trying + to cleanup the xattr list. - - Fixed a bug in the xattr code that was not leaving room for the "rsync." - prefix in some instances where it needed to be added. +- Fixed a bug in the xattr code that was not leaving room for the "rsync." + prefix in some instances where it needed to be added. - - Restored the ability to use [`--bwlimit=0`](rsync.1#opt) to specify no - bandwidth limit. (It was accidentally broken in 3.2.2.) +- Restored the ability to use [`--bwlimit=0`](rsync.1#opt) to specify no + bandwidth limit. (It was accidentally broken in 3.2.2.) - - Fixed a bug when combining [`--delete-missing-args`](rsync.1#opt) with - [`--no-implied-dirs`](rsync.1#opt) & [`-R`](rsync.1#opt) where rsync might - create the destination path of a missing arg. The code also avoids some - superfluous warnings for nested paths of removed args. +- Fixed a bug when combining [`--delete-missing-args`](rsync.1#opt) with + [`--no-implied-dirs`](rsync.1#opt) & [`-R`](rsync.1#opt) where rsync might + create the destination path of a missing arg. The code also avoids some + superfluous warnings for nested paths of removed args. - - Fixed an issue where hard-linked devices could cause the rdev_major value to - get out of sync between the sender and the receiver, which could cause a - device to get created with the wrong major value in its major,minor pair. +- Fixed an issue where hard-linked devices could cause the rdev_major value to + get out of sync between the sender and the receiver, which could cause a + device to get created with the wrong major value in its major,minor pair. - - Rsync now complains about a missing [`--temp-dir`](rsync.1#opt) before - starting any file transfers. +- Rsync now complains about a missing [`--temp-dir`](rsync.1#opt) before + starting any file transfers. - - A completely empty source arg is now a fatal error. This doesn't change - the handling of implied dot-dir args such as "localhost:" and such. +- A completely empty source arg is now a fatal error. This doesn't change + the handling of implied dot-dir args such as "localhost:" and such. ### ENHANCEMENTS: - - Allow [`--max-alloc=0`](rsync.1#opt) to specify no limit to the alloc sanity - check. +- Allow [`--max-alloc=0`](rsync.1#opt) to specify no limit to the alloc sanity + check. - - Allow [`--block-size=SIZE`](rsync.1#opt) to specify the size using units - (e.g. "100K"). +- Allow [`--block-size=SIZE`](rsync.1#opt) to specify the size using units + (e.g. "100K"). - - The name of the id-0 user & group are now sent to the receiver along with - the other user/group names in the transfer (instead of assuming that both - sides have the same id-0 names). +- The name of the id-0 user & group are now sent to the receiver along with + the other user/group names in the transfer (instead of assuming that both + sides have the same id-0 names). - - Added the [`--stop-after`](rsync.1#opt) and [`--stop-at`](rsync.1#opt) - options (with a [`--time-limit`](rsync.1#opt) alias for `--stop-after`). - This is an enhanced version of the time-limit patch from the patches repo. +- Added the [`--stop-after`](rsync.1#opt) and [`--stop-at`](rsync.1#opt) + options (with a [`--time-limit`](rsync.1#opt) alias for `--stop-after`). + This is an enhanced version of the time-limit patch from the patches repo. - - Added the [`name converter`](rsyncd.conf.5#opt) daemon parameter to make it - easier to convert user & group names inside a chrooted daemon module. This - is based on the nameconverter patch with some improvements, including a - tweak to the request protocol (so if you used this patch in the past, be - sure to update your converter script to use newlines instead of null chars). +- Added the [`name converter`](rsyncd.conf.5#opt) daemon parameter to make it + easier to convert user & group names inside a chrooted daemon module. This + is based on the nameconverter patch with some improvements, including a + tweak to the request protocol (so if you used this patch in the past, be + sure to update your converter script to use newlines instead of null chars). - - Added [`--crtimes`](rsync.1#opt) (`-N`) option for preserving the file's - create time (I believe that this is macOS only at the moment). +- Added [`--crtimes`](rsync.1#opt) (`-N`) option for preserving the file's + create time (I believe that this is macOS only at the moment). - - Added [`--mkpath`](rsync.1#opt) option to tell rsync that it should create a - non-existing path component of the destination arg. +- Added [`--mkpath`](rsync.1#opt) option to tell rsync that it should create a + non-existing path component of the destination arg. - - Added [`--stderr=errors|all|client`](rsync.1#opt) to replace the - `--msgs2stderr` and `--no-msgs2stderr` options (which are still accepted). - The default use of stderr was changed to be `--stderr=errors` where all the - processes that have stderr available output directly to stderr, which should - help error messages get to the user more quickly, especially when doing a - push (which includes local copying). This also allows rsync to exit quickly - when a receiver failure occurs, since rsync doesn't need to try to keep the - connection alive long enough for the fatal error to go from the receiver to - the generator to the sender. The old default can be requested via - `--stderr=client`. Also changed is that a non-default stderr mode is - conveyed to the remote rsync (using the older option names) instead of - requiring the user to use [`--remote-option`](rsync.1#opt) (`-M`) to tell - the remote rsync what to do. +- Added [`--stderr=errors|all|client`](rsync.1#opt) to replace the + `--msgs2stderr` and `--no-msgs2stderr` options (which are still accepted). + The default use of stderr was changed to be `--stderr=errors` where all the + processes that have stderr available output directly to stderr, which should + help error messages get to the user more quickly, especially when doing a + push (which includes local copying). This also allows rsync to exit quickly + when a receiver failure occurs, since rsync doesn't need to try to keep the + connection alive long enough for the fatal error to go from the receiver to + the generator to the sender. The old default can be requested via + `--stderr=client`. Also changed is that a non-default stderr mode is + conveyed to the remote rsync (using the older option names) instead of + requiring the user to use [`--remote-option`](rsync.1#opt) (`-M`) to tell + the remote rsync what to do. - - Added the ability to specify "@netgroup" names to the [`hosts - allow`](rsyncd.conf.5#opt) and [`hosts deny`](rsyncd.conf.5#opt) daemon - parameters. This is a finalized version of the netgroup-auth patch from the - patches repo. +- Added the ability to specify "@netgroup" names to the [`hosts allow`](rsyncd.conf.5#opt) and [`hosts deny`](rsyncd.conf.5#opt) daemon + parameters. This is a finalized version of the netgroup-auth patch from the + patches repo. - - Rsync can now hard-link symlinks on FreeBSD due to it making use of the - linkat() function when it is available. +- Rsync can now hard-link symlinks on FreeBSD due to it making use of the + linkat() function when it is available. - - Output file+line info on out-of-memory & overflow errors while also avoiding - the output of alternate build-dir path info that is not useful to the user. +- Output file+line info on out-of-memory & overflow errors while also avoiding + the output of alternate build-dir path info that is not useful to the user. - - Change configure to know that Cygwin supports Linux xattrs. +- Change configure to know that Cygwin supports Linux xattrs. - - Improved the testsuite on FreeBSD & Cygwin. +- Improved the testsuite on FreeBSD & Cygwin. - - Added some compatibility code for HPE NonStop platforms. +- Added some compatibility code for HPE NonStop platforms. - - Improved the INSTALL.md info. +- Improved the INSTALL.md info. - - Added a few more suffixes to the default skip-compress list. +- Added a few more suffixes to the default skip-compress list. - - Improved configure's error handling to notify about several issues at once - instead of one by one (for the newest optional features). +- Improved configure's error handling to notify about several issues at once + instead of one by one (for the newest optional features). ### INTERNAL: - - Use a simpler overflow check idiom in a few spots. +- Use a simpler overflow check idiom in a few spots. - - Use a C99 Flexible Array for a trailing variable-size filename in a struct - (with a fallback to the old 1-char string kluge for older compilers). +- Use a C99 Flexible Array for a trailing variable-size filename in a struct + (with a fallback to the old 1-char string kluge for older compilers). ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.2 (4 Jul 2020) @@ -1781,74 +1785,74 @@ to develop and test fixes. ### BUG FIXES: - - Avoid a crash when a daemon module enables `transfer logging` without - setting a `log format` value. +- Avoid a crash when a daemon module enables `transfer logging` without + setting a `log format` value. - - Fixed installing rsync-ssl script from an alternate build dir. +- Fixed installing rsync-ssl script from an alternate build dir. - - Fixed the updating of configure.sh from an alternate build dir. +- Fixed the updating of configure.sh from an alternate build dir. - - Apple requires the asm function name to begin with an underscore. +- Apple requires the asm function name to begin with an underscore. - - Avoid a test failure in the daemon test when `--atimes` is disabled. +- Avoid a test failure in the daemon test when `--atimes` is disabled. ### ENHANCEMENTS: - - Allow the server side to restrict checksum & compression choices via the - same environment variables the client uses. The env vars can be divided - into "client list & server list" by the "`&`" char or the same list can - apply to both. +- Allow the server side to restrict checksum & compression choices via the + same environment variables the client uses. The env vars can be divided + into "client list & server list" by the "`&`" char or the same list can + apply to both. - - Simplify how the negotiation environment variables apply when interacting - with an older rsync and also when a list contains only invalid names. +- Simplify how the negotiation environment variables apply when interacting + with an older rsync and also when a list contains only invalid names. - - Do not allow a negotiated checksum or compression choice of "none" unless - the user authorized it via an environment variable or command-line option. +- Do not allow a negotiated checksum or compression choice of "none" unless + the user authorized it via an environment variable or command-line option. - - Added the `--max-alloc=SIZE` option to be able to override the memory - allocator's sanity-check limit. It defaults to 1G (as before) but the error - message when exceeding it specifically mentions the new option so that you - can differentiate an out-of-memory error from a failure of this limit. It - also allows you to specify the value via the RSYNC_MAX_ALLOC environment - variable. +- Added the `--max-alloc=SIZE` option to be able to override the memory + allocator's sanity-check limit. It defaults to 1G (as before) but the error + message when exceeding it specifically mentions the new option so that you + can differentiate an out-of-memory error from a failure of this limit. It + also allows you to specify the value via the RSYNC_MAX_ALLOC environment + variable. - - Add the "open atime" daemon parameter to allow a daemon to always enable or - disable the use of O_NOATIME (the default is to let the user control it). +- Add the "open atime" daemon parameter to allow a daemon to always enable or + disable the use of O_NOATIME (the default is to let the user control it). - - The default systemd config was changed to remove the `ProtectHome=on` - setting since rsync is often used to serve files in /home and /root and this - seemed a bit too strict. Feel free to use `systemctl edit rsync` to add - that restriction (or maybe `ProtectHome=read-only`), if you like. See the - 3.2.0 NEWS for the other restrictions that were added compared to 3.1.3. +- The default systemd config was changed to remove the `ProtectHome=on` + setting since rsync is often used to serve files in /home and /root and this + seemed a bit too strict. Feel free to use `systemctl edit rsync` to add + that restriction (or maybe `ProtectHome=read-only`), if you like. See the + 3.2.0 NEWS for the other restrictions that were added compared to 3.1.3. - - The memory allocation functions now automatically check for a failure and - die when out of memory. This eliminated some caller-side check-and-die - code and added some missing sanity-checking of allocations. +- The memory allocation functions now automatically check for a failure and + die when out of memory. This eliminated some caller-side check-and-die + code and added some missing sanity-checking of allocations. - - Put optimizations into their own list in the `--version` output. +- Put optimizations into their own list in the `--version` output. - - Improved the manpage a bit more. +- Improved the manpage a bit more. ### PACKAGING RELATED: - - Prepared the checksum code for an upcoming xxHash release that provides new - XXH3 (64-bit) & XXH128 (128-bit) checksum routines. These will not be - compiled into rsync until the xxhash v0.8.0 include files are installed on - the build host, and that release is a few weeks away at the time this was - written. So, if it's now the future and you have packaged and installed - xxhash-0.8.0-devel, a fresh rebuild of rsync 3.2.2 will give you the new - checksum routines. Just make sure that the new rsync package depends on - xxhash >= 0.8.0. +- Prepared the checksum code for an upcoming xxHash release that provides new + XXH3 (64-bit) & XXH128 (128-bit) checksum routines. These will not be + compiled into rsync until the xxhash v0.8.0 include files are installed on + the build host, and that release is a few weeks away at the time this was + written. So, if it's now the future and you have packaged and installed + xxhash-0.8.0-devel, a fresh rebuild of rsync 3.2.2 will give you the new + checksum routines. Just make sure that the new rsync package depends on + xxhash >= 0.8.0. ### DEVELOPER RELATED: - - Moved the version number out of configure.ac into its own version.h file so - that we don't need to reconfigure just because the version number changes. +- Moved the version number out of configure.ac into its own version.h file so + that we don't need to reconfigure just because the version number changes. - - Moved the daemon parameter list into daemon-parm.txt so that an awk script - can create the interrelated structs and accessors that loadparm.c needs. +- Moved the daemon parameter list into daemon-parm.txt so that an awk script + can create the interrelated structs and accessors that loadparm.c needs. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.1 (22 Jun 2020) @@ -1856,61 +1860,61 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a potential build issue with the MD5 assembly-language code by - removing some non-portable directives. +- Fixed a potential build issue with the MD5 assembly-language code by + removing some non-portable directives. - - Use the preprocessor with the asm file to ensure that if the code is - unneeded, it doesn't get built. +- Use the preprocessor with the asm file to ensure that if the code is + unneeded, it doesn't get built. - - Avoid the stack getting set to executable when including the asm code. +- Avoid the stack getting set to executable when including the asm code. - - Some improvements in the SIMD configure testing to try to avoid build - issues, such as avoiding a clang++ core dump when `-g` is combined with - `-O2`. Note that clang++ is quite buggy in this area, and it does still - crash for some folks, so just use `--disable-simd` if you need to avoid - their buggy compiler (since the configure test is apparently not finding - all the compilers that will to crash and burn). +- Some improvements in the SIMD configure testing to try to avoid build + issues, such as avoiding a clang++ core dump when `-g` is combined with + `-O2`. Note that clang++ is quite buggy in this area, and it does still + crash for some folks, so just use `--disable-simd` if you need to avoid + their buggy compiler (since the configure test is apparently not finding + all the compilers that will to crash and burn). - - Fixed an issue in the md2man script when building from an alternate dir. +- Fixed an issue in the md2man script when building from an alternate dir. - - Disable `--atimes` on macOS (it apparently just ignores the atime change). +- Disable `--atimes` on macOS (it apparently just ignores the atime change). ### ENHANCEMENTS: - - The use of `--backup-dir=STR` now implies `--backup`. +- The use of `--backup-dir=STR` now implies `--backup`. - - Added `--zl=NUM` as a short-hand for `--compress-level=NUM`. +- Added `--zl=NUM` as a short-hand for `--compress-level=NUM`. - - Added `--early-input=FILE` option that allows the client to send some - data to a daemon's (optional) "early exec" script on its stdin. +- Added `--early-input=FILE` option that allows the client to send some + data to a daemon's (optional) "early exec" script on its stdin. - - Mention atimes in the capabilities list that `--version` outputs. +- Mention atimes in the capabilities list that `--version` outputs. - - Mention either "default protect-args" or "optional protect-args" in the - `--version` capabilities depending on how rsync was configured. +- Mention either "default protect-args" or "optional protect-args" in the + `--version` capabilities depending on how rsync was configured. - - Some info on optimizations is now elided from the `--version` capabilities - since they aren't really user-facing capabilities. You can still see the - info (plus the status of a couple extra optimizations) by repeating the - `--version` option (e.g. `-VV`). +- Some info on optimizations is now elided from the `--version` capabilities + since they aren't really user-facing capabilities. You can still see the + info (plus the status of a couple extra optimizations) by repeating the + `--version` option (e.g. `-VV`). - - Updated various URLs to be https instead of http. +- Updated various URLs to be https instead of http. - - Some documentation improvements. +- Some documentation improvements. ### PACKAGING RELATED: - - If you had to use `--disable-simd` for 3.2.0, you might want to try removing - that and see if it will succeed or auto-disable. Some buggy clang++ - compilers are still not auto disabled, though. +- If you had to use `--disable-simd` for 3.2.0, you might want to try removing + that and see if it will succeed or auto-disable. Some buggy clang++ + compilers are still not auto disabled, though. - - The MD5 asm code is now under its own configure flag (not shared with the - SIMD setting), so if you have any issues compiling it, re-run configure with - `--disable-asm`. +- The MD5 asm code is now under its own configure flag (not shared with the + SIMD setting), so if you have any issues compiling it, re-run configure with + `--disable-asm`. - - Merged the OLDNEWS.md file into NEWS.md. +- Merged the OLDNEWS.md file into NEWS.md. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.2.0 (19 Jun 2020) @@ -1918,210 +1922,210 @@ to develop and test fixes. ### BUG FIXES: - - Avoid a potential out-of-bounds read in daemon mode if argc can be made to - become 0. +- Avoid a potential out-of-bounds read in daemon mode if argc can be made to + become 0. - - Fix the default list of skip-compress files for non-daemon transfers. +- Fix the default list of skip-compress files for non-daemon transfers. - - Fix xattr filter rules losing an 'x' attribute in a non-local transfer. +- Fix xattr filter rules losing an 'x' attribute in a non-local transfer. - - Avoid an error when a check for a potential fuzzy file happens to reference - a directory. +- Avoid an error when a check for a potential fuzzy file happens to reference + a directory. - - Make the atomic-rsync helper script have a more consistent error-exit. +- Make the atomic-rsync helper script have a more consistent error-exit. - - Make sure that a signal handler's use of exit_cleanup() calls `_exit()` - instead of exit(). +- Make sure that a signal handler's use of exit_cleanup() calls `_exit()` + instead of exit(). - - Various zlib fixes, including security fixes for CVE-2016-9843, - CVE-2016-9842, CVE-2016-9841, and CVE-2016-9840. +- Various zlib fixes, including security fixes for CVE-2016-9843, + CVE-2016-9842, CVE-2016-9841, and CVE-2016-9840. - - Fixed an issue with `--remove-source-files` not removing a source symlink - when combined with `--copy-links`. +- Fixed an issue with `--remove-source-files` not removing a source symlink + when combined with `--copy-links`. - - Fixed a bug where the daemon would fail to write early fatal error messages - to the client, such as refused or unknown command-line options. +- Fixed a bug where the daemon would fail to write early fatal error messages + to the client, such as refused or unknown command-line options. - - Fixed the block-size validation logic when dealing with older protocols. +- Fixed the block-size validation logic when dealing with older protocols. - - Some rrsync fixes and enhancements to handle the latest options. +- Some rrsync fixes and enhancements to handle the latest options. - - Fixed a problem with the `--link-dest`|`--copy-dest` code when `--xattrs` - was specified along with multiple alternate-destination directories (it - could possibly choose a bad file match while trying to find a better xattr - match). +- Fixed a problem with the `--link-dest`|`--copy-dest` code when `--xattrs` + was specified along with multiple alternate-destination directories (it + could possibly choose a bad file match while trying to find a better xattr + match). - - Fixed a couple bugs in the handling of files with the `--sparse` option. +- Fixed a couple bugs in the handling of files with the `--sparse` option. - - Fixed a bug in the writing of the batch.sh file (w/`--write-batch`) when the - source & destination args were not last on the command-line. +- Fixed a bug in the writing of the batch.sh file (w/`--write-batch`) when the + source & destination args were not last on the command-line. - - Avoid a hang when an overabundance of messages clogs up all the I/O buffers. +- Avoid a hang when an overabundance of messages clogs up all the I/O buffers. - - Fixed a mismatch in the RSYNC_PID values put into the environment of - `pre-xfer exec` and a `post-xfer exec`. +- Fixed a mismatch in the RSYNC_PID values put into the environment of + `pre-xfer exec` and a `post-xfer exec`. - - Fixed a crash in the `--iconv` code. +- Fixed a crash in the `--iconv` code. - - Fixed a rare crash in the popt_unalias() code. +- Fixed a rare crash in the popt_unalias() code. ### ENHANCEMENTS: - - The default systemd config was made stricter by default. For instance, - `ProtectHome=on` (which hides content in /root and /home/USER dirs), - `ProtectSystem=full` (which makes /usr, /boot, & /etc dirs read-only), and - `PrivateDevices=on` (which hides devices). You can override any of these - using the standard `systemctl edit rsync` and add one or more directives - under a `[Service]` heading (and restart the rsync service). +- The default systemd config was made stricter by default. For instance, + `ProtectHome=on` (which hides content in /root and /home/USER dirs), + `ProtectSystem=full` (which makes /usr, /boot, & /etc dirs read-only), and + `PrivateDevices=on` (which hides devices). You can override any of these + using the standard `systemctl edit rsync` and add one or more directives + under a `[Service]` heading (and restart the rsync service). - - Various checksum enhancements, including the optional use of openssl's MD4 & - MD5 checksum algorithms, some x86-64 optimizations for the rolling checksum, - some x86-64 optimizations for the (non-openssl) MD5 checksum, the addition - of xxHash checksum support, and a negotiation heuristic that ensures that it - is easier to add new checksum algorithms in the future. The environment - variable `RSYNC_CHECKSUM_LIST` can be used to customize the preference order - of the negotiation, or use `--checksum-choice` (`--cc`) to force a choice. +- Various checksum enhancements, including the optional use of openssl's MD4 & + MD5 checksum algorithms, some x86-64 optimizations for the rolling checksum, + some x86-64 optimizations for the (non-openssl) MD5 checksum, the addition + of xxHash checksum support, and a negotiation heuristic that ensures that it + is easier to add new checksum algorithms in the future. The environment + variable `RSYNC_CHECKSUM_LIST` can be used to customize the preference order + of the negotiation, or use `--checksum-choice` (`--cc`) to force a choice. - - Various compression enhancements, including the addition of zstd and lz4 - compression algorithms and a negotiation heuristic that picks the best - compression option supported by both sides. The environment variable - `RSYNC_COMPRESS_LIST` can be used to customize the preference order of the - negotiation, or use `--compress-choice` (`--zc`) to force a choice. +- Various compression enhancements, including the addition of zstd and lz4 + compression algorithms and a negotiation heuristic that picks the best + compression option supported by both sides. The environment variable + `RSYNC_COMPRESS_LIST` can be used to customize the preference order of the + negotiation, or use `--compress-choice` (`--zc`) to force a choice. - - Added a `--debug=NSTR` option that outputs details of the new negotiation - strings (for checksums and compression). The first level just outputs the - result of each negotiation on the client, level 2 outputs the values of the - strings that were sent to and received from the server, and level 3 outputs - all those values on the server side too (when the server was given the debug - option). +- Added a `--debug=NSTR` option that outputs details of the new negotiation + strings (for checksums and compression). The first level just outputs the + result of each negotiation on the client, level 2 outputs the values of the + strings that were sent to and received from the server, and level 3 outputs + all those values on the server side too (when the server was given the debug + option). - - The `--debug=OPTS` command-line option is no longer auto-forwarded to the - remote rsync which allows for the client and server to have different levels - of debug specified. This also allows for newer debug options to be - specified, such as using `--debug=NSTR` to see the negotiated hash result, - without having the command fail if the server version is too old to handle - that debug item. Use `-M--debug=OPTS` to send the options to the remote side. +- The `--debug=OPTS` command-line option is no longer auto-forwarded to the + remote rsync which allows for the client and server to have different levels + of debug specified. This also allows for newer debug options to be + specified, such as using `--debug=NSTR` to see the negotiated hash result, + without having the command fail if the server version is too old to handle + that debug item. Use `-M--debug=OPTS` to send the options to the remote side. - - Added the `--atimes` option based on the long-standing patch (just with some - fixes that the patch has been needing). +- Added the `--atimes` option based on the long-standing patch (just with some + fixes that the patch has been needing). - - Added `--open-noatime` option to open files using `O_NOATIME`. +- Added `--open-noatime` option to open files using `O_NOATIME`. - - Added the `--write-devices` option based on the long-standing patch. +- Added the `--write-devices` option based on the long-standing patch. - - Added openssl & preliminary gnutls support to the rsync-ssl script, which is - now installed by default. This was unified with the old stunnel-rsync - helper script to simplify packaging. Note that the script accepts the use - of `--type=gnutls` for gnutls testing, but does not look for gnutls-cli on - the path yet. The use of `--type=gnutls` will not work right until - gnutls-cli no longer drops data. +- Added openssl & preliminary gnutls support to the rsync-ssl script, which is + now installed by default. This was unified with the old stunnel-rsync + helper script to simplify packaging. Note that the script accepts the use + of `--type=gnutls` for gnutls testing, but does not look for gnutls-cli on + the path yet. The use of `--type=gnutls` will not work right until + gnutls-cli no longer drops data. - - Rsync was enhanced to set the `RSYNC_PORT` environment variable when running - a daemon-over-rsh script. Its value is the user-specified port number (set - via `--port` or an rsync:// URL) or 0 if the user didn't override the port. +- Rsync was enhanced to set the `RSYNC_PORT` environment variable when running + a daemon-over-rsh script. Its value is the user-specified port number (set + via `--port` or an rsync:// URL) or 0 if the user didn't override the port. - - Added the `proxy protocol` daemon parameter that allows your rsyncd to know - the real remote IP when it is setup behind a proxy. +- Added the `proxy protocol` daemon parameter that allows your rsyncd to know + the real remote IP when it is setup behind a proxy. - - Added negated matching to the daemon's `refuse options` setting by using - match strings that start with a `!` (such as `!compress*`). This lets you - refuse all options except for a particular approved list, for example. It - also lets rsync refuse certain options by default (such as `write-devices`) - while allowing the config to override that, as desired. +- Added negated matching to the daemon's `refuse options` setting by using + match strings that start with a `!` (such as `!compress*`). This lets you + refuse all options except for a particular approved list, for example. It + also lets rsync refuse certain options by default (such as `write-devices`) + while allowing the config to override that, as desired. - - Added the `early exec` daemon parameter that runs a script before the - transfer parameters are known, allowing some early setup based on module - name. +- Added the `early exec` daemon parameter that runs a script before the + transfer parameters are known, allowing some early setup based on module + name. - - Added status output in response to a signal (via both SIGINFO & SIGVTALRM). +- Added status output in response to a signal (via both SIGINFO & SIGVTALRM). - - Added `--copy-as=USER` option to give some extra security to root-run rsync - commands into/from untrusted directories (such as backups and restores). +- Added `--copy-as=USER` option to give some extra security to root-run rsync + commands into/from untrusted directories (such as backups and restores). - - When resuming the transfer of a file in the `--partial-dir`, rsync will now - update that partial file in-place instead of creating yet another tmp file - copy. This requires both sender & receiver to be at least v3.2.0. +- When resuming the transfer of a file in the `--partial-dir`, rsync will now + update that partial file in-place instead of creating yet another tmp file + copy. This requires both sender & receiver to be at least v3.2.0. - - Added support for `RSYNC_SHELL` & `RSYNC_NO_XFER_EXEC` environment variables - that affect the early, pre-xfer, and post-xfer exec rsync daemon parameters. +- Added support for `RSYNC_SHELL` & `RSYNC_NO_XFER_EXEC` environment variables + that affect the early, pre-xfer, and post-xfer exec rsync daemon parameters. - - Optimize the `--fuzzy --fuzzy` heuristic to avoid the fuzzy directory scan - until all other basis-file options are exhausted (such as `--link-dest`). +- Optimize the `--fuzzy --fuzzy` heuristic to avoid the fuzzy directory scan + until all other basis-file options are exhausted (such as `--link-dest`). - - Have the daemon log include the normal-exit sent/received stats when the - transfer exited with an error when possible (i.e. if it is the sender). +- Have the daemon log include the normal-exit sent/received stats when the + transfer exited with an error when possible (i.e. if it is the sender). - - The daemon now locks its pid file (when configured to use one) so that it - will not fail to start when the file exists but no daemon is running. +- The daemon now locks its pid file (when configured to use one) so that it + will not fail to start when the file exists but no daemon is running. - - Various manpage improvements, including some html representations (that - aren't installed by default). +- Various manpage improvements, including some html representations (that + aren't installed by default). - - Made `-V` the short option for `--version` and improved its information. +- Made `-V` the short option for `--version` and improved its information. - - Pass the `-4` or `-6` option to the ssh command, making it easier to type - than `--rsh='ssh -4'` (or the `-6` equivalent). +- Pass the `-4` or `-6` option to the ssh command, making it easier to type + than `--rsh='ssh -4'` (or the `-6` equivalent). - - Added example config for rsyncd SSL proxy configs to rsyncd.conf. +- Added example config for rsyncd SSL proxy configs to rsyncd.conf. - - More errors messages now mention if the error is coming from the sender or - the receiver. +- More errors messages now mention if the error is coming from the sender or + the receiver. ### PACKAGING RELATED: - - Add installed bash script: /usr/bin/rsync-ssl +- Add installed bash script: /usr/bin/rsync-ssl - - Add installed manpage: /usr/man/man1/rsync-ssl.1 +- Add installed manpage: /usr/man/man1/rsync-ssl.1 - - Tweak auxiliary doc file names, such as: README.md, INSTALL.md, & NEWS.md. +- Tweak auxiliary doc file names, such as: README.md, INSTALL.md, & NEWS.md. - - The rsync-ssl script wants to run openssl or stunnel4, so consider adding a - dependency for one of those options (though it's probably fine to just let - it complain about being unable to find the program and let the user decide - if they want to install one or the other). +- The rsync-ssl script wants to run openssl or stunnel4, so consider adding a + dependency for one of those options (though it's probably fine to just let + it complain about being unable to find the program and let the user decide + if they want to install one or the other). - - If you packaged rsync + rsync-ssl + rsync-ssl-daemon as separate packages, - the rsync-ssl package is now gone (rsync-ssl should be considered to be - mainstream now that Samba requires SSL for its rsync daemon). +- If you packaged rsync + rsync-ssl + rsync-ssl-daemon as separate packages, + the rsync-ssl package is now gone (rsync-ssl should be considered to be + mainstream now that Samba requires SSL for its rsync daemon). - - Add _build_ dependency for liblz4-dev, libxxhash-dev, libzstd-dev, and - libssl-dev. These development libraries will give rsync extra compression - algorithms, extra checksum algorithms, and allow use of openssl's crypto - lib for (potentially) faster MD4/MD5 checksums. +- Add _build_ dependency for liblz4-dev, libxxhash-dev, libzstd-dev, and + libssl-dev. These development libraries will give rsync extra compression + algorithms, extra checksum algorithms, and allow use of openssl's crypto + lib for (potentially) faster MD4/MD5 checksums. - - Add _build_ dependency for g++ or clang++ on x86_64 systems to enable the - SIMD checksum optimizations. +- Add _build_ dependency for g++ or clang++ on x86_64 systems to enable the + SIMD checksum optimizations. - - Add _build_ dependency for _either_ python3-cmarkcfm or python3-commonmark - to allow for patching of manpages or building a git release. This is not - required for a release-tar build, since it comes with pre-built manpages. - Note that cmarkcfm is faster than commonmark, but they generate the same - data. The commonmark dependency is easiest to install since it's native - python, and can even be installed via `pip3 install --user commonmark` if - you want to just install it for the build user. +- Add _build_ dependency for _either_ python3-cmarkcfm or python3-commonmark + to allow for patching of manpages or building a git release. This is not + required for a release-tar build, since it comes with pre-built manpages. + Note that cmarkcfm is faster than commonmark, but they generate the same + data. The commonmark dependency is easiest to install since it's native + python, and can even be installed via `pip3 install --user commonmark` if + you want to just install it for the build user. - - Remove yodl _build_ dependency (if it was even listed before). +- Remove yodl _build_ dependency (if it was even listed before). ### DEVELOPER RELATED: - - Silenced some annoying warnings about major() & minor() by improving an - autoconf include-file check. +- Silenced some annoying warnings about major() & minor() by improving an + autoconf include-file check. - - Converted the manpages from yodl to markdown. They are now processed via a - simple python3 script using the cmarkgfm **or** commonmark library. This - should make it easier to package rsync, since yodl is rather obscure. +- Converted the manpages from yodl to markdown. They are now processed via a + simple python3 script using the cmarkgfm **or** commonmark library. This + should make it easier to package rsync, since yodl is rather obscure. - - Improved some configure checks to work better with strict C99 compilers. +- Improved some configure checks to work better with strict C99 compilers. - - Some perl building/packaging scripts were recoded into awk and python3. +- Some perl building/packaging scripts were recoded into awk and python3. - - Some defines in byteorder.h were changed into static inline functions that - will help to ensure that the args don't get evaluated multiple times on - "careful alignment" hosts. +- Some defines in byteorder.h were changed into static inline functions that + will help to ensure that the args don't get evaluated multiple times on + "careful alignment" hosts. - - Some code typos were fixed (as pointed out by a Fossies run). +- Some code typos were fixed (as pointed out by a Fossies run). ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.1.3 (28 Jan 2018) @@ -2129,69 +2133,69 @@ to develop and test fixes. ### SECURITY FIXES: - - Fixed a buffer overrun in the protocol's handling of xattr names and ensure - that the received name is null terminated. +- Fixed a buffer overrun in the protocol's handling of xattr names and ensure + that the received name is null terminated. - - Fix an issue with `--protect-args` where the user could specify the arg in the - protected-arg list and short-circuit some of the arg-sanitizing code. +- Fix an issue with `--protect-args` where the user could specify the arg in the + protected-arg list and short-circuit some of the arg-sanitizing code. ### BUG FIXES: - - Don't output about a new backup dir without appropriate info verbosity. +- Don't output about a new backup dir without appropriate info verbosity. - - Fixed some issues with the sort functions in the rsyncstats script (in the - support dir). +- Fixed some issues with the sort functions in the rsyncstats script (in the + support dir). - - Added a way to specify daemon config lists (e.g. users, groups, etc) that - contain spaces (see `auth users` in the latest rsyncd.conf manpage). +- Added a way to specify daemon config lists (e.g. users, groups, etc) that + contain spaces (see `auth users` in the latest rsyncd.conf manpage). - - If a backup fails (e.g. full disk) rsync exits with an error. +- If a backup fails (e.g. full disk) rsync exits with an error. - - Fixed a problem with a doubled `--fuzzy` option combined with `--link-dest`. +- Fixed a problem with a doubled `--fuzzy` option combined with `--link-dest`. - - Avoid invalid output in the summary if either the start or end time had an - error. +- Avoid invalid output in the summary if either the start or end time had an + error. - - We don't allow a popt alias to affect the `--daemon` or `--server` options. +- We don't allow a popt alias to affect the `--daemon` or `--server` options. - - Fix daemon exclude code to disallow attribute changes in addition to - disallowing transfers. +- Fix daemon exclude code to disallow attribute changes in addition to + disallowing transfers. - - Don't force nanoseconds to match if a non-transferred, non-checksummed file - only passed the quick-check w/o comparing nanoseconds. +- Don't force nanoseconds to match if a non-transferred, non-checksummed file + only passed the quick-check w/o comparing nanoseconds. ### ENHANCEMENTS: - - Added the ability for rsync to compare nanosecond times in its file-check - comparisons, and added support nanosecond times on Mac OS X. +- Added the ability for rsync to compare nanosecond times in its file-check + comparisons, and added support nanosecond times on Mac OS X. - - Added a short-option (`-@`) for `--modify-window`. +- Added a short-option (`-@`) for `--modify-window`. - - Added the `--checksum-choice=NAME[,NAME]` option to choose the checksum - algorithms. +- Added the `--checksum-choice=NAME[,NAME]` option to choose the checksum + algorithms. - - Added hashing of xattr names (with using `-X`) to improve the handling of - files with large numbers of xattrs. +- Added hashing of xattr names (with using `-X`) to improve the handling of + files with large numbers of xattrs. - - Added a way to filter xattr names using include/exclude/filter rules (see - the `--xattrs` option in the manpage for details). +- Added a way to filter xattr names using include/exclude/filter rules (see + the `--xattrs` option in the manpage for details). - - Added `daemon chroot|uid|gid` to the daemon config (in addition to the old - chroot|uid|gid settings that affect the daemon's transfer process). +- Added `daemon chroot|uid|gid` to the daemon config (in addition to the old + chroot|uid|gid settings that affect the daemon's transfer process). - - Added `syslog tag` to the daemon configuration. +- Added `syslog tag` to the daemon configuration. - - Some manpage improvements. +- Some manpage improvements. ### DEVELOPER RELATED: - - Tweak the `make` output when yodl isn't around to create the manpages. +- Tweak the `make` output when yodl isn't around to create the manpages. - - Changed an obsolete autoconf compile macro. +- Changed an obsolete autoconf compile macro. - - Support newer yodl versions when converting manpages. +- Support newer yodl versions when converting manpages. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.1.2 (21 Dec 2015) @@ -2199,64 +2203,64 @@ to develop and test fixes. ### SECURITY FIXES: - - Make sure that all transferred files use only path names from inside the - transfer. This makes it impossible for a malicious sender to try to make the - receiver use an unsafe destination path for a transferred file, such as a - just-sent symlink. +- Make sure that all transferred files use only path names from inside the + transfer. This makes it impossible for a malicious sender to try to make the + receiver use an unsafe destination path for a transferred file, such as a + just-sent symlink. ### BUG FIXES: - - Change the checksum seed order in the per-block checksums. This prevents - someone from trying to create checksum blocks that match in sum but not - content. +- Change the checksum seed order in the per-block checksums. This prevents + someone from trying to create checksum blocks that match in sum but not + content. - - Fixed a with the per-dir filter files (using `-FF`) that could trigger an - assert failure. +- Fixed a with the per-dir filter files (using `-FF`) that could trigger an + assert failure. - - Only skip `set_modtime()` on a transferred file if the time is exactly - right. +- Only skip `set_modtime()` on a transferred file if the time is exactly + right. - - Don't create an empty backup dir for a transferred file that doesn't exist - yet. +- Don't create an empty backup dir for a transferred file that doesn't exist + yet. - - Fixed a bug where `--link-dest` and `--xattrs` could cause rsync to exit if - a filename had a matching dir of the same name in the alt-dest area. +- Fixed a bug where `--link-dest` and `--xattrs` could cause rsync to exit if + a filename had a matching dir of the same name in the alt-dest area. - - Allow more than 32 group IDs per user in the daemon's gid=LIST config. +- Allow more than 32 group IDs per user in the daemon's gid=LIST config. - - Fix the logging of %b & %c via `--log-file` (daemon logging was already - correct, as was `--out-format='%b/%c'`). +- Fix the logging of %b & %c via `--log-file` (daemon logging was already + correct, as was `--out-format='%b/%c'`). - - Fix erroneous acceptance of `--info=5` & `--debug=5` (an empty flag name is - not valid). +- Fix erroneous acceptance of `--info=5` & `--debug=5` (an empty flag name is + not valid). ### ENHANCEMENTS: - - Added `(DRY RUN)` info to the `--debug=exit` output line. +- Added `(DRY RUN)` info to the `--debug=exit` output line. - - Use usleep() for our msleep() function if it is available. +- Use usleep() for our msleep() function if it is available. - - Added a few extra long-option names to rrsync script, which will make - BackupPC happier. +- Added a few extra long-option names to rrsync script, which will make + BackupPC happier. - - Made configure choose to use Linux xattrs on NetBSD (rather than not - supporting xattrs). +- Made configure choose to use Linux xattrs on NetBSD (rather than not + supporting xattrs). - - Added `-wo` (write-only) option to rrsync support script. +- Added `-wo` (write-only) option to rrsync support script. - - Misc. manpage tweaks. +- Misc. manpage tweaks. ### DEVELOPER RELATED: - - Fixed a bug with the Makefile's use of `INSTALL_STRIP`. +- Fixed a bug with the Makefile's use of `INSTALL_STRIP`. - - Improve a test in the suite that could get an erroneous timestamp error. +- Improve a test in the suite that could get an erroneous timestamp error. - - Tweaks for newer versions of git in the packaging tools. +- Tweaks for newer versions of git in the packaging tools. - - Improved the m4 generation rules and some autoconf idioms. +- Improved the m4 generation rules and some autoconf idioms. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.1.1 (22 Jun 2014) @@ -2264,118 +2268,118 @@ to develop and test fixes. ### BUG FIXES: - - If the receiver gets bogus filenames from the sender (an unexpected leading - slash or a `..` infix dir), exit with an error. This prevents a malicious - sender from trying to inject filenames that would affect an area outside the - destination directories. +- If the receiver gets bogus filenames from the sender (an unexpected leading + slash or a `..` infix dir), exit with an error. This prevents a malicious + sender from trying to inject filenames that would affect an area outside the + destination directories. - - Fixed a failure to remove the partial-transfer temp file when interrupted - (and rsync is not saving the partial files). +- Fixed a failure to remove the partial-transfer temp file when interrupted + (and rsync is not saving the partial files). - - Changed the chown/group/xattr-set order to avoid losing some security- - related xattr info (that would get cleared by a chown). +- Changed the chown/group/xattr-set order to avoid losing some security- + related xattr info (that would get cleared by a chown). - - Fixed a bug in the xattr-finding code that could make a non-root-run - receiver not able to find some xattr numbers. +- Fixed a bug in the xattr-finding code that could make a non-root-run + receiver not able to find some xattr numbers. - - Fixed a bug in the early daemon protocol where a timeout failed to be - honored (e.g. if the remote side fails to send us the initial protocol - greeting). +- Fixed a bug in the early daemon protocol where a timeout failed to be + honored (e.g. if the remote side fails to send us the initial protocol + greeting). - - Fixed unintended inclusion of commas in file numbers in the daemon log. +- Fixed unintended inclusion of commas in file numbers in the daemon log. - - We once again send the 'f' sub-flag (of `-e`) to the server side so it knows - that we can handle incremental-recursion directory errors properly in older - protocols. +- We once again send the 'f' sub-flag (of `-e`) to the server side so it knows + that we can handle incremental-recursion directory errors properly in older + protocols. - - Fixed an issue with too-aggressive keep-alive messages causing a problem for - older rsync versions early in the transfer. +- Fixed an issue with too-aggressive keep-alive messages causing a problem for + older rsync versions early in the transfer. - - Fixed an incorrect message about backup-directory-creation when using - `--dry-run` and the backup dir is not an absolute path. +- Fixed an incorrect message about backup-directory-creation when using + `--dry-run` and the backup dir is not an absolute path. - - Fixed a bug where a failed deletion and/or a failed sender-side removal - would not affect the exit code. +- Fixed a bug where a failed deletion and/or a failed sender-side removal + would not affect the exit code. - - Fixed a bug that caused a failure when combining `--delete-missing-args` - with `--xattrs` and/or `--acls`. +- Fixed a bug that caused a failure when combining `--delete-missing-args` + with `--xattrs` and/or `--acls`. - - Fixed a strange `dir_depth` assertion error that was caused by empty-dir - removals and/or duplicate files in the transfer. +- Fixed a strange `dir_depth` assertion error that was caused by empty-dir + removals and/or duplicate files in the transfer. - - Fixed a problem with `--info=progress2`'s output stats where rsync would - only update the stats at the end of each file's transfer. It now uses the - data that is flowing for the current file, making the stats more accurate - and less jumpy. +- Fixed a problem with `--info=progress2`'s output stats where rsync would + only update the stats at the end of each file's transfer. It now uses the + data that is flowing for the current file, making the stats more accurate + and less jumpy. - - Fixed an itemize bug that affected the combo of `--link-dest`, `-X`, and - `-n`. +- Fixed an itemize bug that affected the combo of `--link-dest`, `-X`, and + `-n`. - - Fixed a problem with delete messages not appearing in the log file when the - user didn't use `--verbose`. +- Fixed a problem with delete messages not appearing in the log file when the + user didn't use `--verbose`. - - Improve chunked xattr reading for OS X. +- Improve chunked xattr reading for OS X. - - Removed an attempted hard-link xattr optimization that was causing a - transfer failure. This removal is flagged in the compatibility code, so if a - better fix can be discovered, we have a way to flip it on again. +- Removed an attempted hard-link xattr optimization that was causing a + transfer failure. This removal is flagged in the compatibility code, so if a + better fix can be discovered, we have a way to flip it on again. - - Fixed a bug when the receiver is not configured to be able to hard link - symlimks/devices/special-file items but the sender sent some of these items - flagged as hard-linked. +- Fixed a bug when the receiver is not configured to be able to hard link + symlimks/devices/special-file items but the sender sent some of these items + flagged as hard-linked. - - We now generate a better error if the buffer overflows in `do_mknod()`. +- We now generate a better error if the buffer overflows in `do_mknod()`. - - Fixed a problem reading more than 16 ACLs on some OSes. +- Fixed a problem reading more than 16 ACLs on some OSes. - - Fixed the reading of the secrets file to avoid an infinite wait when the - username is missing. +- Fixed the reading of the secrets file to avoid an infinite wait when the + username is missing. - - Fixed a parsing problem in the `--usermap`/`--groupmap` options when using - MIN-MAX numbers. +- Fixed a parsing problem in the `--usermap`/`--groupmap` options when using + MIN-MAX numbers. - - Switched Cygwin back to using socketpair `pipes` to try to speed it up. +- Switched Cygwin back to using socketpair `pipes` to try to speed it up. - - Added knowledge of a few new options to rrsync. +- Added knowledge of a few new options to rrsync. ### ENHANCEMENTS: - - Tweaked the temp-file naming when `--temp-dir=DIR` is used: the temp-file - names will not get a '.' prepended. +- Tweaked the temp-file naming when `--temp-dir=DIR` is used: the temp-file + names will not get a '.' prepended. - - Added support for a new-compression idiom that does not compress all the - matching data in a transfer. This can help rsync to use less cpu when a - transfer has a lot of matching data, and also makes rsync compatible with a - non-bundled zlib. See the `--new-compress` and `--old-compress` options in - the manpage. +- Added support for a new-compression idiom that does not compress all the + matching data in a transfer. This can help rsync to use less cpu when a + transfer has a lot of matching data, and also makes rsync compatible with a + non-bundled zlib. See the `--new-compress` and `--old-compress` options in + the manpage. - - Added the rsync-no-vanished shell script. (See the support dir.) +- Added the rsync-no-vanished shell script. (See the support dir.) - - Made configure more prominently mention when we failed to find yodl (in case - the user wants to be able to generate manpages from `*.yo` files). +- Made configure more prominently mention when we failed to find yodl (in case + the user wants to be able to generate manpages from `*.yo` files). - - Have manpage mention how a daemon's max-verbosity setting affects info and - debug options. Also added more clarification on backslash removals for - excludes that contain wildcards. +- Have manpage mention how a daemon's max-verbosity setting affects info and + debug options. Also added more clarification on backslash removals for + excludes that contain wildcards. - - Have configure check if for the attr lib (for getxattr) for those systems - that need to link against it explicitly. +- Have configure check if for the attr lib (for getxattr) for those systems + that need to link against it explicitly. - - Change the early dir-creation logic to only use that idiom in an - inc-recursive copy that is preserving directory times. e.g. using - `--omit-dir-times` will avoid these early directories being created. +- Change the early dir-creation logic to only use that idiom in an + inc-recursive copy that is preserving directory times. e.g. using + `--omit-dir-times` will avoid these early directories being created. - - Fix a bug in `cmp_time()` that would return a wrong result if the 2 times - differed by an amount greater than what a `time_t` can hold. +- Fix a bug in `cmp_time()` that would return a wrong result if the 2 times + differed by an amount greater than what a `time_t` can hold. ### DEVELOPER RELATED: - - We now include an example systemd file (in packaging/systemd). +- We now include an example systemd file (in packaging/systemd). - - Tweaked configure to make sure that any intended use of the included popt - and/or zlib code is put early in the CFLAGS. +- Tweaked configure to make sure that any intended use of the included popt + and/or zlib code is put early in the CFLAGS. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.1.0 (28 Sep 2013) @@ -2383,249 +2387,248 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 31. +- The protocol number was changed to 31. ### OUTPUT CHANGES: - - Output numbers in 3-digit groups by default (e.g. 1,234,567). See the - `--human-readable` option for a way to turn it off. See also the daemon's - `log format` parameter and related command-line options (including - `--out-format`) for a modifier that can be used to request digit-grouping or - human-readable output in log escapes. (Note that log output is unchanged by - default.) - - - The `--list-only` option is now affected by the `--human-readable` setting. - It will display digit groupings by default, and unit suffixes if higher - levels of readability are requested. Also, the column width for the size - output has increased from 11 to 14 characters when human readability is - enabled. Use `--no-h` to get the old-style output and column size. - - - The output of the `--progress` option has changed: the string `xfer` was - shortened to `xfr`, and the string `to-check` was shortened to `to-chk`, - both designed to make room for the (by default) wider display of file size - numbers without making the total line-length longer. Also, when incremental - recursion is enabled, the string `ir-chk` will be used instead of `to-chk` - up until the incremental-recursion scan is done, letting you know that the - value to check and the total value will still be increasing as new files are - found. - - - Enhanced the `--stats` output: 1) to mention how many files were created - (protocol >= 28), 2) to mention how many files were deleted (a new line for - protocol 31, but only output when `--delete` is in effect), and 3) to follow - the file-count, created-count, and deleted-count with a subcount list that - shows the counts by type. The wording of the transferred count has also - changed so that it is clearer that it is only a count of regular files. +- Output numbers in 3-digit groups by default (e.g. 1,234,567). See the + `--human-readable` option for a way to turn it off. See also the daemon's + `log format` parameter and related command-line options (including + `--out-format`) for a modifier that can be used to request digit-grouping or + human-readable output in log escapes. (Note that log output is unchanged by + default.) + +- The `--list-only` option is now affected by the `--human-readable` setting. + It will display digit groupings by default, and unit suffixes if higher + levels of readability are requested. Also, the column width for the size + output has increased from 11 to 14 characters when human readability is + enabled. Use `--no-h` to get the old-style output and column size. + +- The output of the `--progress` option has changed: the string `xfer` was + shortened to `xfr`, and the string `to-check` was shortened to `to-chk`, + both designed to make room for the (by default) wider display of file size + numbers without making the total line-length longer. Also, when incremental + recursion is enabled, the string `ir-chk` will be used instead of `to-chk` + up until the incremental-recursion scan is done, letting you know that the + value to check and the total value will still be increasing as new files are + found. + +- Enhanced the `--stats` output: 1) to mention how many files were created + (protocol >= 28), 2) to mention how many files were deleted (a new line for + protocol 31, but only output when `--delete` is in effect), and 3) to follow + the file-count, created-count, and deleted-count with a subcount list that + shows the counts by type. The wording of the transferred count has also + changed so that it is clearer that it is only a count of regular files. ### BUG FIXES: - - Fixed a bug in the iconv code when EINVAL or EILSEQ is returned with a full - output buffer. +- Fixed a bug in the iconv code when EINVAL or EILSEQ is returned with a full + output buffer. - - Fixed some rare bugs in `--iconv` processing that might cause a multi-byte - character to get translated incorrectly. +- Fixed some rare bugs in `--iconv` processing that might cause a multi-byte + character to get translated incorrectly. - - Fixed a bogus `vanished file` error if some files were specified with `./` - prefixes and others were not. +- Fixed a bogus `vanished file` error if some files were specified with `./` + prefixes and others were not. - - Fixed a bug in `--sparse` where an extra gap could get inserted after a - partial write. +- Fixed a bug in `--sparse` where an extra gap could get inserted after a + partial write. - - Changed the way `--progress` overwrites its prior output in order to make it - nearly impossible for the progress to get overwritten by an error. +- Changed the way `--progress` overwrites its prior output in order to make it + nearly impossible for the progress to get overwritten by an error. - - Improved the propagation of abnormal-exit error messages. This should help - the client side to receive errors from the server when it is exiting - abnormally, and should also avoid dying with an `connection unexpectedly - closed` exit when the closed connection is really expected. +- Improved the propagation of abnormal-exit error messages. This should help + the client side to receive errors from the server when it is exiting + abnormally, and should also avoid dying with an `connection unexpectedly closed` exit when the closed connection is really expected. - - The sender now checks each file it plans to remove to ensure that it hasn't - changed from the first stat's info. This helps to avoid losing file data - when the user is not using the option in a safe manner. +- The sender now checks each file it plans to remove to ensure that it hasn't + changed from the first stat's info. This helps to avoid losing file data + when the user is not using the option in a safe manner. - - Fixed a data-duplication bug in the compress option that made compression - less efficient. This improves protocol 31 onward, while behaving in a - compatible (buggy) manner with older rsync protocols. +- Fixed a data-duplication bug in the compress option that made compression + less efficient. This improves protocol 31 onward, while behaving in a + compatible (buggy) manner with older rsync protocols. - - When creating a temp-file, rsync is now a bit smarter about it dot-char - choices, which can fix a problem on OS X with names that start with `..`. +- When creating a temp-file, rsync is now a bit smarter about it dot-char + choices, which can fix a problem on OS X with names that start with `..`. - - Rsync now sets a cleanup flag for `--inplace` and `--append` transfers that - will flush the write buffer if the transfer aborts. This ensures that more - received data gets written out to the disk on an aborted transfer (which is - quite helpful on a slow, flaky connection). +- Rsync now sets a cleanup flag for `--inplace` and `--append` transfers that + will flush the write buffer if the transfer aborts. This ensures that more + received data gets written out to the disk on an aborted transfer (which is + quite helpful on a slow, flaky connection). - - The reads that `map_ptr()` now does are aligned on 1K boundaries. This helps - some filesystems and/or files that don't like unaligned reads. +- The reads that `map_ptr()` now does are aligned on 1K boundaries. This helps + some filesystems and/or files that don't like unaligned reads. - - Fix an issue in the msleep() function if time jumps backwards. +- Fix an issue in the msleep() function if time jumps backwards. - - Fix daemon-server module-name splitting bug where an arg would get split - even if `--protect-args` was used. +- Fix daemon-server module-name splitting bug where an arg would get split + even if `--protect-args` was used. ### ENHANCEMENTS: - - Added the `--remote-option=OPT` (`-M OPT`) command-line option that is - useful for things like sending a remote `--log-file=FILE` or `--fake-super` - option. +- Added the `--remote-option=OPT` (`-M OPT`) command-line option that is + useful for things like sending a remote `--log-file=FILE` or `--fake-super` + option. - - Added the `--info=FLAGS` and `--debug=FLAGS` options to allow finer-grained - control over what is output. Added an extra type of `--progress` output - using `--info=progress2`. +- Added the `--info=FLAGS` and `--debug=FLAGS` options to allow finer-grained + control over what is output. Added an extra type of `--progress` output + using `--info=progress2`. - - The `--msgs2stderr` option can help with debugging rsync by allowing the - debug messages to get output to stderr rather than travel via the socket - protocol. +- The `--msgs2stderr` option can help with debugging rsync by allowing the + debug messages to get output to stderr rather than travel via the socket + protocol. - - Added the `--delete-missing-args` and `--ignore-missing-args` options to - either delete or ignore user-specified files on the receiver that are - missing on the sender (normally the absence of user-specified files - generates an error). +- Added the `--delete-missing-args` and `--ignore-missing-args` options to + either delete or ignore user-specified files on the receiver that are + missing on the sender (normally the absence of user-specified files + generates an error). - - Added a `T` (terabyte) category to the `--human-readable` size suffixes. +- Added a `T` (terabyte) category to the `--human-readable` size suffixes. - - Added the `--usermap`/`--groupmap`/`--chown` options for manipulating file - ownership during the copy. +- Added the `--usermap`/`--groupmap`/`--chown` options for manipulating file + ownership during the copy. - - Added the `%C` escape to the log-output handling, which will output the MD5 - checksum of any transferred file, or all files if `--checksum` was specified - (when protocol 30 or above is in effect). +- Added the `%C` escape to the log-output handling, which will output the MD5 + checksum of any transferred file, or all files if `--checksum` was specified + (when protocol 30 or above is in effect). - - Added the `reverse lookup` parameter to the rsync daemon config file to - allow reverse-DNS lookups to be disabled. +- Added the `reverse lookup` parameter to the rsync daemon config file to + allow reverse-DNS lookups to be disabled. - - Added a forward-DNS lookup for the daemon's hosts allow/deny config. Can be - disabled via `forward lookup` parameter (defaults to enabled). +- Added a forward-DNS lookup for the daemon's hosts allow/deny config. Can be + disabled via `forward lookup` parameter (defaults to enabled). - - Added a way for more than one group to be specified in the daemon's config - file, including a way to specify that you want all of the specified user's - groups without having to name them. Also changed the daemon to complain - about an inability to set explicitly-specified uid/gid values, even when not - run by a super-user. +- Added a way for more than one group to be specified in the daemon's config + file, including a way to specify that you want all of the specified user's + groups without having to name them. Also changed the daemon to complain + about an inability to set explicitly-specified uid/gid values, even when not + run by a super-user. - - The daemon now tries to send the user the error messages from the pre-xfer - exec script when it fails. +- The daemon now tries to send the user the error messages from the pre-xfer + exec script when it fails. - - Improved the use of alt-dest options into an existing hierarchy of files: If - a match is found in an alt-dir, it takes precedence over an existing file. - (We'll need to wait for a future version before attribute-changes on - otherwise unchanged files are safe when using an existing hierarchy.) +- Improved the use of alt-dest options into an existing hierarchy of files: If + a match is found in an alt-dir, it takes precedence over an existing file. + (We'll need to wait for a future version before attribute-changes on + otherwise unchanged files are safe when using an existing hierarchy.) - - Added per-user authorization options and group-authorization support to the - daemon's `auth users` parameter. +- Added per-user authorization options and group-authorization support to the + daemon's `auth users` parameter. - - Added a way to reference environment variables in a daemon's config file - (using %VAR% references). +- Added a way to reference environment variables in a daemon's config file + (using %VAR% references). - - When replacing a non-dir with a symlink/hard-link/device/special-file, the - update should now be done in an atomic manner. +- When replacing a non-dir with a symlink/hard-link/device/special-file, the + update should now be done in an atomic manner. - - Avoid re-sending xattr info for hard-linked files w/the same xattrs - (protocol 31). +- Avoid re-sending xattr info for hard-linked files w/the same xattrs + (protocol 31). - - The backup code was improved to use better logic maintaining the backup - directory hierarchy. Also, when a file is being backed up, rsync tries to - hard-link it into place so that the upcoming replacement of the destination - file will be atomic (for the normal, non-inplace logic). +- The backup code was improved to use better logic maintaining the backup + directory hierarchy. Also, when a file is being backed up, rsync tries to + hard-link it into place so that the upcoming replacement of the destination + file will be atomic (for the normal, non-inplace logic). - - Added the ability to synchronize nanosecond modified times. +- Added the ability to synchronize nanosecond modified times. - - Added a few more default suffixes for the `dont compress` settings. +- Added a few more default suffixes for the `dont compress` settings. - - Added the checking of the `RSYNC_PROTECT_ARGS` environment variable to allow - the default for the `--protect-args` command-line option to be overridden. +- Added the checking of the `RSYNC_PROTECT_ARGS` environment variable to allow + the default for the `--protect-args` command-line option to be overridden. - - Added the `--preallocate` command-line option. +- Added the `--preallocate` command-line option. - - Allow `--password-file=-` to read the password from stdin (filename `-`). +- Allow `--password-file=-` to read the password from stdin (filename `-`). - - Rsync now comes packaged with an rsync-ssl helper script that can be used to - contact a remote rsync daemon using a piped-stunnel command. It also - includes an stunnel config file to run the server side to support ssl daemon - connections. See the packaging/lsb/rsync.spec file for one way to package - the resulting files. (Suggestions for how to make this even easier to - install & use are welcomed.) +- Rsync now comes packaged with an rsync-ssl helper script that can be used to + contact a remote rsync daemon using a piped-stunnel command. It also + includes an stunnel config file to run the server side to support ssl daemon + connections. See the packaging/lsb/rsync.spec file for one way to package + the resulting files. (Suggestions for how to make this even easier to + install & use are welcomed.) - - Improved the speed of some `--inplace` updates when there are lots of - identical checksum blocks that end up being unusable. +- Improved the speed of some `--inplace` updates when there are lots of + identical checksum blocks that end up being unusable. - - Added the `--outbuf=N|L|B` option for choosing the output buffering. +- Added the `--outbuf=N|L|B` option for choosing the output buffering. - - Repeating the `--fuzzy` option now causes the code to look for fuzzy matches - inside alt-dest directories too. +- Repeating the `--fuzzy` option now causes the code to look for fuzzy matches + inside alt-dest directories too. - - The `--chmod` option now supports numeric modes, e.g. `--chmod=644,D755` +- The `--chmod` option now supports numeric modes, e.g. `--chmod=644,D755` - - Added some Solaris xattr code. +- Added some Solaris xattr code. - - Made an rsync daemon (the listening process) exit with a 0 status when it - was signaled to die. This helps launchd. +- Made an rsync daemon (the listening process) exit with a 0 status when it + was signaled to die. This helps launchd. - - Improved the `RSYNC_*` environment variables for the pre-xfer exec script: - when a daemon is sent multiple request args, they are now joined into a - single return value (separated by spaces) so that the `RSYNC_REQUEST` - environment variable is accurate for any `pre-xfer exec`. The values in - `RSYNC_ARG#` vars are no longer truncated at the `.` arg (prior to the - request dirs/files), so that all the requested values are also listed - (separately) in `RSYNC_ARG#` variables. +- Improved the `RSYNC_*` environment variables for the pre-xfer exec script: + when a daemon is sent multiple request args, they are now joined into a + single return value (separated by spaces) so that the `RSYNC_REQUEST` + environment variable is accurate for any `pre-xfer exec`. The values in + `RSYNC_ARG#` vars are no longer truncated at the `.` arg (prior to the + request dirs/files), so that all the requested values are also listed + (separately) in `RSYNC_ARG#` variables. ### EXTRAS: - - Added an `instant-rsyncd` script to the support directory, which makes it - easy to configure a simple rsync daemon in the current directory. +- Added an `instant-rsyncd` script to the support directory, which makes it + easy to configure a simple rsync daemon in the current directory. - - Added the `mapfrom` and `mapto` scripts to the support directory, which - makes it easier to do user/group mapping in a local transfer based on - passwd/group files from another machine. +- Added the `mapfrom` and `mapto` scripts to the support directory, which + makes it easier to do user/group mapping in a local transfer based on + passwd/group files from another machine. - - There's a new, improved version of the lsh script in the support dir: it's - written in perl and supports `-u` without resorting to using sudo (when run - as root). The old shell version is now named lsh.sh. +- There's a new, improved version of the lsh script in the support dir: it's + written in perl and supports `-u` without resorting to using sudo (when run + as root). The old shell version is now named lsh.sh. - - There is a helper script named rsync-slash-strip in the support directory - for anyone that wants to change the way rsync handles args with trailing - slashes. (e.g. arg/ would get stripped to arg while arg/. would turn into - arg/). +- There is a helper script named rsync-slash-strip in the support directory + for anyone that wants to change the way rsync handles args with trailing + slashes. (e.g. arg/ would get stripped to arg while arg/. would turn into + arg/). ### INTERNAL: - - The I/O code was rewritten to be simpler and do bigger buffered reads over - the socket. The I/O between the receiver and the generator was changed to be - standard multiplexed-I/O (like that over the socket). +- The I/O code was rewritten to be simpler and do bigger buffered reads over + the socket. The I/O between the receiver and the generator was changed to be + standard multiplexed-I/O (like that over the socket). - - The sender tries to use any dead time while the generator is looking for - files to transfer in order to do sender-side directory scanning in a more - parallel manner. +- The sender tries to use any dead time while the generator is looking for + files to transfer in order to do sender-side directory scanning in a more + parallel manner. - - A daemon can now inform a client about a daemon-configured timeout value so - that the client can assist in the keep-alive activity (protocol 31). +- A daemon can now inform a client about a daemon-configured timeout value so + that the client can assist in the keep-alive activity (protocol 31). - - The filter code received some refactoring to make it more extendable, to - read better, and do better sanity checking. +- The filter code received some refactoring to make it more extendable, to + read better, and do better sanity checking. - - Really big numbers are now output using our own big-num routine rather than - casting them to a double and using a %.0f conversion. +- Really big numbers are now output using our own big-num routine rather than + casting them to a double and using a %.0f conversion. - - The `pool_alloc` library has received some minor improvements in alignment - handling. +- The `pool_alloc` library has received some minor improvements in alignment + handling. - - Added `init_stat_x()` function to avoid duplication of acl/xattr init code. +- Added `init_stat_x()` function to avoid duplication of acl/xattr init code. - - The included zlib was upgraded from 1.2.3 to 1.2.8. +- The included zlib was upgraded from 1.2.3 to 1.2.8. - - Rsync can now be compiled to use an unmodified zlib library instead of the - tweaked one that is included with rsync. This will eventually become the - default, at which point we'll start the countdown to removing the included - zlib. Until then, feel free to configure using: +- Rsync can now be compiled to use an unmodified zlib library instead of the + tweaked one that is included with rsync. This will eventually become the + default, at which point we'll start the countdown to removing the included + zlib. Until then, feel free to configure using: - ./configure `--with-included-zlib=no` + ./configure `--with-included-zlib=no` ### DEVELOPER RELATED: - - Added more conditional debug output. +- Added more conditional debug output. - - Fixed some build issues for Android and Minix. +- Fixed some build issues for Android and Minix. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.9 (23 Sep 2011) @@ -2633,58 +2636,58 @@ to develop and test fixes. ### BUG FIXES: - - Fix a crash bug in checksum scanning when `--inplace` is used. +- Fix a crash bug in checksum scanning when `--inplace` is used. - - Fix a hang if a hard-linked file cannot be opened by the sender (e.g. if it - has no read permission). +- Fix a hang if a hard-linked file cannot be opened by the sender (e.g. if it + has no read permission). - - Fix preservation of a symlink's system xattrs (e.g. selinux) on Linux. +- Fix preservation of a symlink's system xattrs (e.g. selinux) on Linux. - - Fix a memory leak in the xattr code. +- Fix a memory leak in the xattr code. - - Fixed a bug with `--delete-excluded` when a filter merge file has a rule - that specifies a receiver-only side restriction. +- Fixed a bug with `--delete-excluded` when a filter merge file has a rule + that specifies a receiver-only side restriction. - - Fix a bug with the modifying of unwritable directories. +- Fix a bug with the modifying of unwritable directories. - - Fix `--fake-super`'s interaction with `--link-dest` same-file comparisons. +- Fix `--fake-super`'s interaction with `--link-dest` same-file comparisons. - - Fix the updating of the `curr_dir` buffer to avoid a duplicate slash. +- Fix the updating of the `curr_dir` buffer to avoid a duplicate slash. - - Fix the directory permissions on an implied dot-dir when using `--relative` - (e.g. /outside/path/././send/path). +- Fix the directory permissions on an implied dot-dir when using `--relative` + (e.g. /outside/path/././send/path). - - Fixed some too-long sleeping instances when using `--bwlimit`. +- Fixed some too-long sleeping instances when using `--bwlimit`. - - Fixed when symlink ownership difference-checking gets compiled into - `unchanged_attrs()`. +- Fixed when symlink ownership difference-checking gets compiled into + `unchanged_attrs()`. - - Improved the socket-error reporting when multiple protocols fail. +- Improved the socket-error reporting when multiple protocols fail. - - Fixed a case where a socket error could reference just-freed memory. +- Fixed a case where a socket error could reference just-freed memory. - - Failing to use a password file that was specified on the command-line is now - a fatal error. +- Failing to use a password file that was specified on the command-line is now + a fatal error. - - Fix the non-root updating of directories that don't have the read and/or - execute permission. +- Fix the non-root updating of directories that don't have the read and/or + execute permission. - - Make daemon-excluded file errors more error-like. +- Make daemon-excluded file errors more error-like. - - Fix a compilation issue on older C compilers (due to a misplaced var - declaration). +- Fix a compilation issue on older C compilers (due to a misplaced var + declaration). - - Make configure avoid finding socketpair on Cygwin. +- Make configure avoid finding socketpair on Cygwin. - - Avoid trying to reference `SO_BROADCAST` if the OS doesn't support it. +- Avoid trying to reference `SO_BROADCAST` if the OS doesn't support it. - - Fix some issues with the post-processing of the manpages. +- Fix some issues with the post-processing of the manpages. - - Fixed the user home-dir handling in the lsh script. (See the support dir.) +- Fixed the user home-dir handling in the lsh script. (See the support dir.) - - Some minor manpage improvements. +- Some minor manpage improvements. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.8 (26 Mar 2011) @@ -2692,137 +2695,137 @@ to develop and test fixes. ### BUG FIXES: - - Fixed two buffer-overflow issues: one where a directory path that is exactly - MAXPATHLEN was not handled correctly, and one handling a `--backup-dir` that - is extra extra large. +- Fixed two buffer-overflow issues: one where a directory path that is exactly + MAXPATHLEN was not handled correctly, and one handling a `--backup-dir` that + is extra extra large. - - Fixed a data-corruption issue when preserving hard-links without preserving - file ownership, and doing deletions either before or during the transfer - (CVE-2011-1097). This fixes some assert errors in the hard-linking code, and - some potential failed checksums (via `-c`) that should have matched. +- Fixed a data-corruption issue when preserving hard-links without preserving + file ownership, and doing deletions either before or during the transfer + (CVE-2011-1097). This fixes some assert errors in the hard-linking code, and + some potential failed checksums (via `-c`) that should have matched. - - Fixed a potential crash when an rsync daemon has a filter/exclude list and - the transfer is using ACLs or xattrs. +- Fixed a potential crash when an rsync daemon has a filter/exclude list and + the transfer is using ACLs or xattrs. - - Fixed a hang if a really large file is being processed by an rsync that - can't handle 64-bit numbers. Rsync will now complain about the file being - too big and skip it. +- Fixed a hang if a really large file is being processed by an rsync that + can't handle 64-bit numbers. Rsync will now complain about the file being + too big and skip it. - - For devices and special files, we now avoid gathering useless ACL and/or - xattr information for files that aren't being copied. (The un-copied files - are still put into the file list, but there's no need to gather data that is - not going to be used.) This ensures that if the user uses `--no-D`, that - rsync can't possibly complain about being unable to gather extended - information from special files that are in the file list (but not in the - transfer). +- For devices and special files, we now avoid gathering useless ACL and/or + xattr information for files that aren't being copied. (The un-copied files + are still put into the file list, but there's no need to gather data that is + not going to be used.) This ensures that if the user uses `--no-D`, that + rsync can't possibly complain about being unable to gather extended + information from special files that are in the file list (but not in the + transfer). - - Properly handle requesting remote filenames that start with a dash. This - avoids a potential error where a filename could be interpreted as a (usually - invalid) option. +- Properly handle requesting remote filenames that start with a dash. This + avoids a potential error where a filename could be interpreted as a (usually + invalid) option. - - Fixed a bug in the comparing of upper-case letters in file suffixes for - `--skip-compress`. +- Fixed a bug in the comparing of upper-case letters in file suffixes for + `--skip-compress`. - - If an rsync daemon has a module configured without a path setting, rsync - will now disallow access to that module. +- If an rsync daemon has a module configured without a path setting, rsync + will now disallow access to that module. - - If the destination arg is an empty string, it will be treated as a reference - to the current directory (as 2.x used to do). +- If the destination arg is an empty string, it will be treated as a reference + to the current directory (as 2.x used to do). - - If rsync was compiled with a newer time-setting function (such as lutimes), - rsync will fall-back to an older function (such as utimes) on a system where - the newer function is not around. This helps to make the rsync binary more - portable in mixed-OS-release situations. +- If rsync was compiled with a newer time-setting function (such as lutimes), + rsync will fall-back to an older function (such as utimes) on a system where + the newer function is not around. This helps to make the rsync binary more + portable in mixed-OS-release situations. - - Fixed a batch-file writing bug that would not write out the full set of - compatibility flags that the transfer was using. This fixes a potential - protocol problem for a batch file that contains a sender-side I/O error: it - would have been sent in a way that the batch-reader wasn't expecting. +- Fixed a batch-file writing bug that would not write out the full set of + compatibility flags that the transfer was using. This fixes a potential + protocol problem for a batch file that contains a sender-side I/O error: it + would have been sent in a way that the batch-reader wasn't expecting. - - Some improvements to the hard-linking code to ensure that device-number - hashing is working right, and to supply more information if the hard-link - code fails. +- Some improvements to the hard-linking code to ensure that device-number + hashing is working right, and to supply more information if the hard-link + code fails. - - The `--inplace` code was improved to not search for an impossible checksum - position. The quadruple-verbose chunk[N] message will now mention when an - inplace chunk was handled by a seek rather than a read+write. +- The `--inplace` code was improved to not search for an impossible checksum + position. The quadruple-verbose chunk[N] message will now mention when an + inplace chunk was handled by a seek rather than a read+write. - - Improved ACL mask handling, e.g. for Solaris. +- Improved ACL mask handling, e.g. for Solaris. - - Fixed a bug that prevented `--numeric-ids` from disabling the translation of - user/group IDs for ACLs. +- Fixed a bug that prevented `--numeric-ids` from disabling the translation of + user/group IDs for ACLs. - - Fixed an issue where an xattr and/or ACL transfer that used an alt-dest - option (e.g. `--link-dest`) could output an error trying to itemize the - changes against the alt-dest directory's xattr/ACL info but was instead - trying to access the not-yet-existing new destination directory. +- Fixed an issue where an xattr and/or ACL transfer that used an alt-dest + option (e.g. `--link-dest`) could output an error trying to itemize the + changes against the alt-dest directory's xattr/ACL info but was instead + trying to access the not-yet-existing new destination directory. - - Improved xattr system-error messages to mention the full path to the file. +- Improved xattr system-error messages to mention the full path to the file. - - The `--link-dest` checking for identical symlinks now avoids considering - attribute differences that cannot be changed on the receiver. +- The `--link-dest` checking for identical symlinks now avoids considering + attribute differences that cannot be changed on the receiver. - - Avoid trying to read/write xattrs on certain file types for certain OSes. - Improved configure to set `NO_SYMLINK_XATTRS`, `NO_DEVICE_XATTRS`, and/or - `NO_SPECIAL_XATTRS` defines in config.h. +- Avoid trying to read/write xattrs on certain file types for certain OSes. + Improved configure to set `NO_SYMLINK_XATTRS`, `NO_DEVICE_XATTRS`, and/or + `NO_SPECIAL_XATTRS` defines in config.h. - - Improved the unsafe-symlink errors messages. +- Improved the unsafe-symlink errors messages. - - Fixed a bug setting xattrs on new files that aren't user writable. +- Fixed a bug setting xattrs on new files that aren't user writable. - - Avoid re-setting xattrs on a hard-linked file w/the same xattrs. +- Avoid re-setting xattrs on a hard-linked file w/the same xattrs. - - Fixed a bug with `--fake-super` when copying files and dirs that aren't user - writable. +- Fixed a bug with `--fake-super` when copying files and dirs that aren't user + writable. - - Fixed a bug where a sparse file could have its last sparse block turned into - a real block when rsync sets the file size (requires ftruncate). +- Fixed a bug where a sparse file could have its last sparse block turned into + a real block when rsync sets the file size (requires ftruncate). - - If a temp-file name is too long, rsync now avoids truncating the name in the - middle of adjacent high-bit characters. This prevents a potential filename - error if the filesystem doesn't allow a name to contain an invalid - multi-byte sequence. +- If a temp-file name is too long, rsync now avoids truncating the name in the + middle of adjacent high-bit characters. This prevents a potential filename + error if the filesystem doesn't allow a name to contain an invalid + multi-byte sequence. - - If a muli-protocol socket connection fails (i.e., when contacting a daemon), - we now report all the failures, not just the last one. This avoids losing a - relevant error (e.g. an IPv4 connection-refused error) that happened before - the final error (e.g. an IPv6 protocol-not-supported error). +- If a muli-protocol socket connection fails (i.e., when contacting a daemon), + we now report all the failures, not just the last one. This avoids losing a + relevant error (e.g. an IPv4 connection-refused error) that happened before + the final error (e.g. an IPv6 protocol-not-supported error). - - Generate a transfer error if we try to call chown with a `-1` for a uid or a - gid (which is not settable). +- Generate a transfer error if we try to call chown with a `-1` for a uid or a + gid (which is not settable). - - Fixed the working of `--force` when used with `--one-file-system`. +- Fixed the working of `--force` when used with `--one-file-system`. - - Fix the popt arg parsing so that an option that doesn't take an arg will - reject an attempt to supply one (can configure `--with-included-popt` if - your system's popt library doesn't yet have this fix). +- Fix the popt arg parsing so that an option that doesn't take an arg will + reject an attempt to supply one (can configure `--with-included-popt` if + your system's popt library doesn't yet have this fix). - - A couple minor option tweaks to the rrsync script, and also some regex - changes that make vim highlighting happier. (See the support dir.) +- A couple minor option tweaks to the rrsync script, and also some regex + changes that make vim highlighting happier. (See the support dir.) - - Fixed some issues in the mnt-excl script. (See the support dir.) +- Fixed some issues in the mnt-excl script. (See the support dir.) - - Various manpage improvements. +- Various manpage improvements. ### ENHANCEMENTS: - - Added `.hg/` to the default cvs excludes (see `-C` & `--cvs-exclude`). +- Added `.hg/` to the default cvs excludes (see `-C` & `--cvs-exclude`). ### DEVELOPER RELATED: - - Use lchmod() whenever it is available (not just on symlinks). +- Use lchmod() whenever it is available (not just on symlinks). - - A couple fixes to the `socketpair_tcp()` routine. +- A couple fixes to the `socketpair_tcp()` routine. - - Updated the helper scripts in the packaging subdirectory. +- Updated the helper scripts in the packaging subdirectory. - - Renamed configure.in to configure.ac. +- Renamed configure.in to configure.ac. - - Fixed configure's checking for iconv routines for newer OS X versions. +- Fixed configure's checking for iconv routines for newer OS X versions. - - Fixed the testsuite/xattrs.test script on OS X. +- Fixed the testsuite/xattrs.test script on OS X. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.7 (31 Dec 2009) @@ -2830,66 +2833,66 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a bogus free when using `--xattrs` with `--backup`. +- Fixed a bogus free when using `--xattrs` with `--backup`. - - Avoid an error when `--dry-run` was trying to stat a prior hard-link file - that hasn't really been created. +- Avoid an error when `--dry-run` was trying to stat a prior hard-link file + that hasn't really been created. - - Fixed a problem with `--compress` (`-z`) where the receiving side could - return the error "`inflate (token) returned -5`". +- Fixed a problem with `--compress` (`-z`) where the receiving side could + return the error "`inflate (token) returned -5`". - - Fixed a bug where `--delete-during` could delete in a directory before it - noticed that the sending side sent an I/O error for that directory (both - sides of the transfer must be at least 3.0.7). +- Fixed a bug where `--delete-during` could delete in a directory before it + noticed that the sending side sent an I/O error for that directory (both + sides of the transfer must be at least 3.0.7). - - Improved `--skip-compress`'s error handling of bad character-sets and got - rid of a lingering debug fprintf(). +- Improved `--skip-compress`'s error handling of bad character-sets and got + rid of a lingering debug fprintf(). - - Fixed the daemon's conveyance of `io_error` value from the sender. +- Fixed the daemon's conveyance of `io_error` value from the sender. - - An rsync daemon use seteuid() (when available) if it used setuid(). +- An rsync daemon use seteuid() (when available) if it used setuid(). - - Get the permissions right on a `--fake-super` transferred directory that - needs more owner permissions to emulate root behavior. +- Get the permissions right on a `--fake-super` transferred directory that + needs more owner permissions to emulate root behavior. - - An absolute-path filter rule (i.e. with a '/' modifier) no longer loses its - modifier when sending the filter rules to the remote rsync. +- An absolute-path filter rule (i.e. with a '/' modifier) no longer loses its + modifier when sending the filter rules to the remote rsync. - - Improved the "`--delete does not work without -r or -d`" message. +- Improved the "`--delete does not work without -r or -d`" message. - - Improved rsync's handling of `--timeout` to avoid a weird timeout case where - the sender could timeout even though it has recently written data to the - socket (but hasn't read data recently, due to the writing). +- Improved rsync's handling of `--timeout` to avoid a weird timeout case where + the sender could timeout even though it has recently written data to the + socket (but hasn't read data recently, due to the writing). - - Some misc manpage improvements. +- Some misc manpage improvements. - - Fixed the chmod-temp-dir testsuite on a system without /var/tmp. +- Fixed the chmod-temp-dir testsuite on a system without /var/tmp. - - Make sure that a timeout specified in the daemon's config is used as a - maximum timeout value when the user also specifies a timeout. +- Make sure that a timeout specified in the daemon's config is used as a + maximum timeout value when the user also specifies a timeout. - - Improved the error-exit reporting when rsync gets an error trying to cleanup - after an error: the initial error is reported. +- Improved the error-exit reporting when rsync gets an error trying to cleanup + after an error: the initial error is reported. - - Improved configure's detection of IPv6 for Solaris and Cygwin. +- Improved configure's detection of IPv6 for Solaris and Cygwin. - - The AIX sysacls routines will now return ENOSYS if ENOTSUP is missing. +- The AIX sysacls routines will now return ENOSYS if ENOTSUP is missing. - - Made our (only used if missing) getaddrinfo() routine use `inet_pton()` - (which we also provide) instead of `inet_aton()`. +- Made our (only used if missing) getaddrinfo() routine use `inet_pton()` + (which we also provide) instead of `inet_aton()`. - - The exit-related debug messages now mention the program's role so it is - clear who output what message. +- The exit-related debug messages now mention the program's role so it is + clear who output what message. ### DEVELOPER RELATED: - - Got rid of type-punned compiler warnings output by newer gcc versions. +- Got rid of type-punned compiler warnings output by newer gcc versions. - - The Makefile now ensures that proto.h will be rebuilt if config.h changes. +- The Makefile now ensures that proto.h will be rebuilt if config.h changes. - - The testsuite no longer uses `id -u`, so it works better on Solaris. +- The testsuite no longer uses `id -u`, so it works better on Solaris. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.6 (8 May 2009) @@ -2897,57 +2900,57 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a `--read-batch` hang when rsync is reading a batch file that was - created from an incremental-recursion transfer. +- Fixed a `--read-batch` hang when rsync is reading a batch file that was + created from an incremental-recursion transfer. - - Fixed the daemon's socket code to handle the simultaneous arrival of - multiple connections. +- Fixed the daemon's socket code to handle the simultaneous arrival of + multiple connections. - - Fix `--safe-links`/`--copy-unsafe-links` to properly handle symlinks that - have consecutive slashes in the value. +- Fix `--safe-links`/`--copy-unsafe-links` to properly handle symlinks that + have consecutive slashes in the value. - - Fixed the parsing of an `[IPv6_LITERAL_ADDR]` when a USER@ is prefixed. +- Fixed the parsing of an `[IPv6_LITERAL_ADDR]` when a USER@ is prefixed. - - The sender now skips a (bogus) symlink that has a 0-length value, which - avoids a transfer error in the receiver. +- The sender now skips a (bogus) symlink that has a 0-length value, which + avoids a transfer error in the receiver. - - Fixed a case where the sender could die with a tag-0 error if there was an - I/O during the sending of the file list. +- Fixed a case where the sender could die with a tag-0 error if there was an + I/O during the sending of the file list. - - Fixed the rrsync script to avoid a server-side problem when `-e` is at the - start of the short options. +- Fixed the rrsync script to avoid a server-side problem when `-e` is at the + start of the short options. - - Fixed a problem where a vanished directory could turn into an exit code 23 - instead of the proper exit code 24. +- Fixed a problem where a vanished directory could turn into an exit code 23 + instead of the proper exit code 24. - - Fixed the `--iconv` conversion of symlinks when doing a local copy. +- Fixed the `--iconv` conversion of symlinks when doing a local copy. - - Fixed a problem where `--one-file-system` was not stopping deletions on the - receiving side when a mount-point directory did not match a directory in the - transfer. +- Fixed a problem where `--one-file-system` was not stopping deletions on the + receiving side when a mount-point directory did not match a directory in the + transfer. - - Fixed the dropping of an ACL mask when no named ACL values were present. +- Fixed the dropping of an ACL mask when no named ACL values were present. - - Fixed an ACL/xattr corruption issue where the `--backup` option could cause - rsync to associate the wrong ACL/xattr information with received files. +- Fixed an ACL/xattr corruption issue where the `--backup` option could cause + rsync to associate the wrong ACL/xattr information with received files. - - Fixed the use of `--xattrs` with `--only-write-batch`. +- Fixed the use of `--xattrs` with `--only-write-batch`. - - Fixed the use of `--dry-run` with `--read-batch`. +- Fixed the use of `--dry-run` with `--read-batch`. - - Fixed configure's erroneous use of target. +- Fixed configure's erroneous use of target. - - Fixed configure's `--disable-debug` option. +- Fixed configure's `--disable-debug` option. - - Fixed a run-time issue for systems that can't find `iconv_open()` by adding - the `--disable-iconv-open` configure option. +- Fixed a run-time issue for systems that can't find `iconv_open()` by adding + the `--disable-iconv-open` configure option. - - Complain and die if the user tries to combine `--remove-source-files` (or - the deprecated `--remove-sent-files`) with `--read-batch`. +- Complain and die if the user tries to combine `--remove-source-files` (or + the deprecated `--remove-sent-files`) with `--read-batch`. - - Fixed an failure transferring special files from Solaris to Linux. +- Fixed an failure transferring special files from Solaris to Linux. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.5 (28 Dec 2008) @@ -2955,63 +2958,63 @@ to develop and test fixes. ### BUG FIXES: - - Initialize xattr data in a couple spots in the hlink code, which avoids a - crash when the xattr pointer's memory happens to start out non-zero. Also - fixed the itemizing of an alt-dest file's xattrs when hard-linking. +- Initialize xattr data in a couple spots in the hlink code, which avoids a + crash when the xattr pointer's memory happens to start out non-zero. Also + fixed the itemizing of an alt-dest file's xattrs when hard-linking. - - Don't send a bogus `-` option to an older server if there were no short - options specified. +- Don't send a bogus `-` option to an older server if there were no short + options specified. - - Fixed skipping of unneeded updates in a batch file when incremental - recursion is active. Added a test for this. Made batch-mode handle `redo` - files properly (and without hanging). +- Fixed skipping of unneeded updates in a batch file when incremental + recursion is active. Added a test for this. Made batch-mode handle `redo` + files properly (and without hanging). - - Fix the %P logfile escape when the daemon logs from inside a chroot. +- Fix the %P logfile escape when the daemon logs from inside a chroot. - - Fixed the use of `-s` (`--protect-args`) when used with a remote source or - destination that had an empty path (e.g. `host:`). Also fixed a problem when - `-s` was used when accessing a daemon via a remote-shell. +- Fixed the use of `-s` (`--protect-args`) when used with a remote source or + destination that had an empty path (e.g. `host:`). Also fixed a problem when + `-s` was used when accessing a daemon via a remote-shell. - - Fixed the use of a dot-dir path (e.g. foo/./bar) inside a `--files-from` - file when the root of the transfer isn't the current directory. +- Fixed the use of a dot-dir path (e.g. foo/./bar) inside a `--files-from` + file when the root of the transfer isn't the current directory. - - Fixed a bug with `-K --delete` removing symlinks to directories when - incremental recursion is active. +- Fixed a bug with `-K --delete` removing symlinks to directories when + incremental recursion is active. - - Fixed a hard to trigger hang when using `--remove-source-files`. +- Fixed a hard to trigger hang when using `--remove-source-files`. - - Got rid of an annoying delay when accessing a daemon via a remote-shell. +- Got rid of an annoying delay when accessing a daemon via a remote-shell. - - Properly ignore (superfluous) source args on a `--read-batch` command. +- Properly ignore (superfluous) source args on a `--read-batch` command. - - Improved the manpage's description of the `*` wildcard to remove the - confusing `non-empty` qualifier. +- Improved the manpage's description of the `*` wildcard to remove the + confusing `non-empty` qualifier. - - Fixed reverse lookups in the compatibility-library version of getnameinfo(). +- Fixed reverse lookups in the compatibility-library version of getnameinfo(). - - Fixed a bug when using `--sparse` on a sparse file that has over 2GB of - consecutive sparse data. +- Fixed a bug when using `--sparse` on a sparse file that has over 2GB of + consecutive sparse data. - - Avoid a hang when using at least 3 `--verbose` options on a transfer with a - client sender (which includes local copying). +- Avoid a hang when using at least 3 `--verbose` options on a transfer with a + client sender (which includes local copying). - - Fixed a problem with `--delete-delay` reporting an error when it was ready - to remove a directory that was now gone. +- Fixed a problem with `--delete-delay` reporting an error when it was ready + to remove a directory that was now gone. - - Got rid of a bunch of `warn_unused_result` compiler warnings. +- Got rid of a bunch of `warn_unused_result` compiler warnings. - - If an ftruncate() on a received file fails, it now causes a partial- - transfer warning. +- If an ftruncate() on a received file fails, it now causes a partial- + transfer warning. - - Allow a path with a leading `//` to be preserved (CYGWIN only). +- Allow a path with a leading `//` to be preserved (CYGWIN only). ### ENHANCEMENTS: - - Made the atomic-rsync script able to perform a fully atomic update of the - copied hierarchy when the destination is setup using a particular symlink - idiom. (See the support dir.) +- Made the atomic-rsync script able to perform a fully atomic update of the + copied hierarchy when the destination is setup using a particular symlink + idiom. (See the support dir.) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.4 (6 Sep 2008) @@ -3019,66 +3022,66 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a bug in the hard-linking code where it would sometimes try to - allocate 0 bytes of memory (which fails on some OSes, such as AIX). +- Fixed a bug in the hard-linking code where it would sometimes try to + allocate 0 bytes of memory (which fails on some OSes, such as AIX). - - Fixed the hard-linking of files from a device that has a device number of 0 - (which seems to be a common device number on NetBSD). +- Fixed the hard-linking of files from a device that has a device number of 0 + (which seems to be a common device number on NetBSD). - - Fixed the handling of a `--partial-dir` that cannot be created. This - particularly impacts the `--delay-updates` option (since the files cannot be - delayed without a partial-dir), and was potentially destructive if the - `--remove-source-files` was also specified. +- Fixed the handling of a `--partial-dir` that cannot be created. This + particularly impacts the `--delay-updates` option (since the files cannot be + delayed without a partial-dir), and was potentially destructive if the + `--remove-source-files` was also specified. - - Fixed a couple issues in the `--fake-super` handling of xattrs when the - destination files have root-level attributes (e.g. selinux values) that a - non-root copy can't affect. +- Fixed a couple issues in the `--fake-super` handling of xattrs when the + destination files have root-level attributes (e.g. selinux values) that a + non-root copy can't affect. - - Improved the keep-alive check in the generator to fire consistently in - incremental-recursion mode when `--timeout` is enabled. +- Improved the keep-alive check in the generator to fire consistently in + incremental-recursion mode when `--timeout` is enabled. - - The `--iconv` option now converts the content of a symlink too, instead of - leaving it in the wrong character-set (requires 3.0.4 on both sides of the - transfer). +- The `--iconv` option now converts the content of a symlink too, instead of + leaving it in the wrong character-set (requires 3.0.4 on both sides of the + transfer). - - When using `--iconv`, if a filename fails to convert on the receiving side, - this no longer makes deletions in the root-dir of the transfer fail silently - (the user now gets a warning about deletions being disabled due to IO error - as long as `--ignore-errors` was not specified). +- When using `--iconv`, if a filename fails to convert on the receiving side, + this no longer makes deletions in the root-dir of the transfer fail silently + (the user now gets a warning about deletions being disabled due to IO error + as long as `--ignore-errors` was not specified). - - When using `--iconv`, if a server-side receiver can't convert a filename, - the error message sent back to the client no longer mangles the name with - the wrong charset conversion. +- When using `--iconv`, if a server-side receiver can't convert a filename, + the error message sent back to the client no longer mangles the name with + the wrong charset conversion. - - Fixed a potential alignment issue in the IRIX ACL code when allocating the - initial `struct acl` object. Also, cast mallocs to avoid warnings. +- Fixed a potential alignment issue in the IRIX ACL code when allocating the + initial `struct acl` object. Also, cast mallocs to avoid warnings. - - Changed some errors that were going to stdout to go to stderr. +- Changed some errors that were going to stdout to go to stderr. - - Made `human_num()` and `human_dnum()` able to output a negative number - (rather than outputting a cryptic string of punctuation). +- Made `human_num()` and `human_dnum()` able to output a negative number + (rather than outputting a cryptic string of punctuation). ### ENHANCEMENTS: - - Rsync will avoid sending an `-e` option to the server if an older protocol - is requested (and thus the option would not be useful). This lets the user - specify the `--protocol=29` option to access an overly-restrictive server - that is rejecting the protocol-30 use of `-e` to the server. +- Rsync will avoid sending an `-e` option to the server if an older protocol + is requested (and thus the option would not be useful). This lets the user + specify the `--protocol=29` option to access an overly-restrictive server + that is rejecting the protocol-30 use of `-e` to the server. - - Improved the message output for an `RERR_PARTIAL` exit. +- Improved the message output for an `RERR_PARTIAL` exit. ### DEVELOPER RELATED: - - The Makefile will not halt for just a timestamp change on the Makefile or - the configure files, only for actual changes in content. +- The Makefile will not halt for just a timestamp change on the Makefile or + the configure files, only for actual changes in content. - - Changed some commands in the testsuite's xattrs.test that called `rsync` - instead of `$RSYNC`. +- Changed some commands in the testsuite's xattrs.test that called `rsync` + instead of `$RSYNC`. - - Enhanced the release scripts to be able to handle a branch release and to do - even more consistency checks on the files. +- Enhanced the release scripts to be able to handle a branch release and to do + even more consistency checks on the files. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.3 (29 Jun 2008) @@ -3086,89 +3089,88 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a wildcard matching problem in the daemon when a module has `use - chroot` enabled. +- Fixed a wildcard matching problem in the daemon when a module has `use chroot` enabled. - - Fixed a crash bug in the hard-link code. +- Fixed a crash bug in the hard-link code. - - Fixed the sending of xattr directory information when the code finds a - `--link-dest` or `--copy-dest` directory with unchanged xattrs -- the - destination directory now gets these unchanged xattrs properly applied. +- Fixed the sending of xattr directory information when the code finds a + `--link-dest` or `--copy-dest` directory with unchanged xattrs -- the + destination directory now gets these unchanged xattrs properly applied. - - Fixed an xattr-sending glitch that could cause an `Internal abbrev` error. +- Fixed an xattr-sending glitch that could cause an `Internal abbrev` error. - - Fixed the combination of `--xattrs` and `--backup`. +- Fixed the combination of `--xattrs` and `--backup`. - - The generator no longer allows a '.' dir to be excluded by a daemon-exclude - rule. +- The generator no longer allows a '.' dir to be excluded by a daemon-exclude + rule. - - Fixed deletion handling when copying a single, empty directory (with no - files) to a differently named, non-existent directory. +- Fixed deletion handling when copying a single, empty directory (with no + files) to a differently named, non-existent directory. - - Fixed the conversion of spaces into dashes in the %M log escape. +- Fixed the conversion of spaces into dashes in the %M log escape. - - Fixed several places in the code that were not returning the right errno - when a function failed. +- Fixed several places in the code that were not returning the right errno + when a function failed. - - Fixed the backing up of a device or special file into a backup dir. +- Fixed the backing up of a device or special file into a backup dir. - - Moved the setting of the socket options prior to the connect(). +- Moved the setting of the socket options prior to the connect(). - - If rsync exits in the middle of a `--progress` output, it now outputs a - newline to help prevent the progress line from being overwritten. +- If rsync exits in the middle of a `--progress` output, it now outputs a + newline to help prevent the progress line from being overwritten. - - Fixed a problem with how a destination path with a trailing slash or a - trailing dot-dir was compared against the daemon excludes. +- Fixed a problem with how a destination path with a trailing slash or a + trailing dot-dir was compared against the daemon excludes. - - Fixed the sending of large (size > 16GB) files when talking to an older - rsync (protocols < 30): we now use a compatible block size limit. +- Fixed the sending of large (size > 16GB) files when talking to an older + rsync (protocols < 30): we now use a compatible block size limit. - - If a file's length is so huge that we overflow a checksum buffer count (i.e. - several hundred TB), warn the user and avoid sending an invalid checksum - struct over the wire. +- If a file's length is so huge that we overflow a checksum buffer count (i.e. + several hundred TB), warn the user and avoid sending an invalid checksum + struct over the wire. - - If a source arg is excluded, `--relative` no longer adds the excluded arg's - implied dirs to the transfer. This fix also made the exclude check happen in - the better place in the sending code. +- If a source arg is excluded, `--relative` no longer adds the excluded arg's + implied dirs to the transfer. This fix also made the exclude check happen in + the better place in the sending code. - - Use the `overflow_exit()` function for overflows, not `out_of_memory()`. +- Use the `overflow_exit()` function for overflows, not `out_of_memory()`. - - Improved the code to better handle a system that has only 32-bit file - offsets. +- Improved the code to better handle a system that has only 32-bit file + offsets. ### ENHANCEMENTS: - - The rsyncd.conf manpage now consistently refers to the parameters in the - daemon config file as `parameters`. +- The rsyncd.conf manpage now consistently refers to the parameters in the + daemon config file as `parameters`. - - The description of the `--inplace` option was improved. +- The description of the `--inplace` option was improved. ### EXTRAS: - - Added a new script in the support directory, deny-rsync, which allows an - admin to (temporarily) replace the rsync command with a script that sends an - error message to the remote client via the rsync protocol. +- Added a new script in the support directory, deny-rsync, which allows an + admin to (temporarily) replace the rsync command with a script that sends an + error message to the remote client via the rsync protocol. ### DEVELOPER RELATED: - - Fixed a testcase failure if the tests are run as root and made some - compatibility improvements. +- Fixed a testcase failure if the tests are run as root and made some + compatibility improvements. - - Improved the daemon tests, including checking module comments, the listing - of files, and the ensuring that daemon excludes can't affect a dot-dir arg. +- Improved the daemon tests, including checking module comments, the listing + of files, and the ensuring that daemon excludes can't affect a dot-dir arg. - - Improved some build rules for those that build in a separate directory from - the source, including better install rules for the manpages, and the fixing - of a proto.h-tstamp rule that could make the binaries get rebuild without - cause. +- Improved some build rules for those that build in a separate directory from + the source, including better install rules for the manpages, and the fixing + of a proto.h-tstamp rule that could make the binaries get rebuild without + cause. - - Improved the testsuite to work around a problem with some utilities (e.g. - `cp -p` & `touch -r`) rounding sub-second timestamps. +- Improved the testsuite to work around a problem with some utilities (e.g. + `cp -p` & `touch -r`) rounding sub-second timestamps. - - Ensure that the early patches don't cause any generated-file hunks to - bleed-over into patches that follow. +- Ensure that the early patches don't cause any generated-file hunks to + bleed-over into patches that follow. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.2 (8 Apr 2008) @@ -3176,20 +3178,20 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a potential buffer overflow in the xattr code. +- Fixed a potential buffer overflow in the xattr code. ### ENHANCEMENTS: - - None. +- None. ### DEVELOPER RELATED: - - The RPM spec file was improved to install more useful files. +- The RPM spec file was improved to install more useful files. - - A few developer-oriented scripts were moved from the support dir to the - packaging dir. +- A few developer-oriented scripts were moved from the support dir to the + packaging dir. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.1 (3 Apr 2008) @@ -3197,137 +3199,137 @@ to develop and test fixes. ### NOTABLE CHANGES IN BEHAVIOR: - - Added the 'c'-flag to the itemizing of non-regular files so that the - itemized output doesn't get hidden if there were no attribute changes, and - also so that the itemizing of a `--copy-links` run will distinguish between - copying an identical non-regular file and the creation of a revised version - with a new value (e.g. a changed symlink referent, a new device number, - etc.). +- Added the 'c'-flag to the itemizing of non-regular files so that the + itemized output doesn't get hidden if there were no attribute changes, and + also so that the itemizing of a `--copy-links` run will distinguish between + copying an identical non-regular file and the creation of a revised version + with a new value (e.g. a changed symlink referent, a new device number, + etc.). ### BUG FIXES: - - Fixed a crash bug when a single-use rsync daemon (via remote shell) was run - without specifying a `--config=FILE` option. +- Fixed a crash bug when a single-use rsync daemon (via remote shell) was run + without specifying a `--config=FILE` option. - - Fixed a crash when backing up a directory that has a default ACL. +- Fixed a crash when backing up a directory that has a default ACL. - - Fixed a bug in the handling of xattr values that could cause rsync to not - think that a file's extended attributes are up-to-date. +- Fixed a bug in the handling of xattr values that could cause rsync to not + think that a file's extended attributes are up-to-date. - - Fixed the working of `--fake-super` with `--link-dest` and `--xattrs`. +- Fixed the working of `--fake-super` with `--link-dest` and `--xattrs`. - - Fixed a hang when combining `--dry-run` with `--remove-source-files`. +- Fixed a hang when combining `--dry-run` with `--remove-source-files`. - - Fixed a bug with `--iconv`'s handling of files that cannot be converted: a - failed name can no longer cause a transfer failure. +- Fixed a bug with `--iconv`'s handling of files that cannot be converted: a + failed name can no longer cause a transfer failure. - - Fixed the building of the rounding.h file on systems that need custom - CPPFLAGS to be used. Also improved the error reporting if the building of - rounding.h fails. +- Fixed the building of the rounding.h file on systems that need custom + CPPFLAGS to be used. Also improved the error reporting if the building of + rounding.h fails. - - Fixed the use of the `--protect-args` (`-s`) option when talking to a - daemon. +- Fixed the use of the `--protect-args` (`-s`) option when talking to a + daemon. - - Fixed the `--ignore-existing` option's protection of files on the receiver - that are non-regular files on the sender (e.g. if a symlink or a dir on the - sender is trying to replace a file on the receiver). The reverse protection - (protecting a dir/symlink/device from being replaced by a file) was already - working. +- Fixed the `--ignore-existing` option's protection of files on the receiver + that are non-regular files on the sender (e.g. if a symlink or a dir on the + sender is trying to replace a file on the receiver). The reverse protection + (protecting a dir/symlink/device from being replaced by a file) was already + working. - - Fixed an assert failure if `--hard-links` is combined with an option that - can skip a file in a set of hard-linked files (i.e. `--ignore-existing`, - `--append`, etc.), without skipping all the files in the set. +- Fixed an assert failure if `--hard-links` is combined with an option that + can skip a file in a set of hard-linked files (i.e. `--ignore-existing`, + `--append`, etc.), without skipping all the files in the set. - - Avoid setting the modify time on a directory that already has the right - modify time set. This avoids tweaking the dir's ctime. +- Avoid setting the modify time on a directory that already has the right + modify time set. This avoids tweaking the dir's ctime. - - Improved the daemon-exclude handling to do a better job of applying the - exclude rules to path entries. It also sends the user an error just as if - the files were actually missing (instead of silently ignoring the user's - args), and avoids sending the user the filter-action messages for these - non-user-initiated rules. +- Improved the daemon-exclude handling to do a better job of applying the + exclude rules to path entries. It also sends the user an error just as if + the files were actually missing (instead of silently ignoring the user's + args), and avoids sending the user the filter-action messages for these + non-user-initiated rules. - - Fixed some glitches with the dry-run code's missing-directory handling, - including a problem when combined with `--fuzzy`. +- Fixed some glitches with the dry-run code's missing-directory handling, + including a problem when combined with `--fuzzy`. - - Fixed some glitches with the skipped-directory handling. +- Fixed some glitches with the skipped-directory handling. - - Fixed the 'T'-flag itemizing of symlinks when `--time` isn't preserved. +- Fixed the 'T'-flag itemizing of symlinks when `--time` isn't preserved. - - Fixed a glitch in the itemizing of permissions with the `-E` option. +- Fixed a glitch in the itemizing of permissions with the `-E` option. - - The `--append` option's restricting of transfers to those that add data no - longer prevents the updating of non-content changes to otherwise up-to-date - files (i.e. those with the same content but differing permissions, - ownership, xattrs, etc.). +- The `--append` option's restricting of transfers to those that add data no + longer prevents the updating of non-content changes to otherwise up-to-date + files (i.e. those with the same content but differing permissions, + ownership, xattrs, etc.). - - Don't allow `--fake-super` to be specified with `-XX` (double `--xattrs`) - because the options conflict. If a daemon has `fake super` enabled, it - automatically downgrades a `-XX` request to `-X`. +- Don't allow `--fake-super` to be specified with `-XX` (double `--xattrs`) + because the options conflict. If a daemon has `fake super` enabled, it + automatically downgrades a `-XX` request to `-X`. - - Fixed a couple bugs in the parsing of daemon-config excludes that could make - a floating exclude rule get treated as matching an absolute path. +- Fixed a couple bugs in the parsing of daemon-config excludes that could make + a floating exclude rule get treated as matching an absolute path. - - A daemon doesn't try to auto-refuse the `iconv` option if iconv-support - wasn't compiled in to the daemon (avoiding a warning in the logs). +- A daemon doesn't try to auto-refuse the `iconv` option if iconv-support + wasn't compiled in to the daemon (avoiding a warning in the logs). - - Fixed the inclusion of per-dir merge files from implied dirs. +- Fixed the inclusion of per-dir merge files from implied dirs. - - Fixed the rrsync script to work with the latest options that rsync sends, - including its flag-specifying use of `-e` to the server. (See the support - dir.) +- Fixed the rrsync script to work with the latest options that rsync sends, + including its flag-specifying use of `-e` to the server. (See the support + dir.) ### ENHANCEMENTS: - - Added the `--old-dirs` (`--old-d`) option to make it easier for a user to - ask for file-listings with older rsync versions (this is easier than having - to type `-r --exclude='/*/*'` manually). +- Added the `--old-dirs` (`--old-d`) option to make it easier for a user to + ask for file-listings with older rsync versions (this is easier than having + to type `-r --exclude='/*/*'` manually). - - When getting an error while asking an older rsync daemon for a file listing, - rsync will try to notice if the error is a rejection of the `--dirs` (`-d`) - option and let the user know how to work around the issue. +- When getting an error while asking an older rsync daemon for a file listing, + rsync will try to notice if the error is a rejection of the `--dirs` (`-d`) + option and let the user know how to work around the issue. - - Added a few more `--no-OPTION` overrides. +- Added a few more `--no-OPTION` overrides. - - Improved the documentation of the `--append` option. +- Improved the documentation of the `--append` option. - - Improved the documentation of the filter/exclude/include daemon parameters. +- Improved the documentation of the filter/exclude/include daemon parameters. ### INTERNAL: - - Fixed a couple minor bugs in the included popt library (ones which I sent to - the official popt project for inclusion in the 1.14 release). +- Fixed a couple minor bugs in the included popt library (ones which I sent to + the official popt project for inclusion in the 1.14 release). - - Fixed a stat() call that should have been `do_stat()` so that the proper - normal/64-bit stat() function gets called. (Was in an area that should not - have caused problems, though.) +- Fixed a stat() call that should have been `do_stat()` so that the proper + normal/64-bit stat() function gets called. (Was in an area that should not + have caused problems, though.) - - Changed the file-glob code to do a directory scan without using the `glob` - and `glob.h`. This lets us do the globbing with less memory churn, and also - avoid adding daemon-excluded items to the returned args. +- Changed the file-glob code to do a directory scan without using the `glob` + and `glob.h`. This lets us do the globbing with less memory churn, and also + avoid adding daemon-excluded items to the returned args. ### DEVELOPER RELATED: - - The configure script tries to get the user's compiler to not warn about - unused function parameters if the build is not including one or more of the - ACL/xattrs/iconv features. +- The configure script tries to get the user's compiler to not warn about + unused function parameters if the build is not including one or more of the + ACL/xattrs/iconv features. - - The configure script now has better checks for figuring out if the included - popt code should be used or not. +- The configure script now has better checks for figuring out if the included + popt code should be used or not. - - Fixed two testsuite glitches: avoid a failure if someone's `cd` command - outputs the current directory when cd-ing to a relative path, and made the - itemized test query how rsync was built to determine if it should expect - hard-linked symlinks or not. +- Fixed two testsuite glitches: avoid a failure if someone's `cd` command + outputs the current directory when cd-ing to a relative path, and made the + itemized test query how rsync was built to determine if it should expect + hard-linked symlinks or not. - - Updated the testsuite to verify that various bug fixes remain fixed. +- Updated the testsuite to verify that various bug fixes remain fixed. - - The RPM spec file was updated to have: (1) comments for how to use the - rsync-patch tar file, and (2) an /etc/xinetd.d/rsync file. +- The RPM spec file was updated to have: (1) comments for how to use the + rsync-patch tar file, and (2) an /etc/xinetd.d/rsync file. - - Updated the build scripts to work with a revised FTP directory structure. +- Updated the build scripts to work with a revised FTP directory structure. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 3.0.0 (1 Mar 2008) @@ -3335,349 +3337,349 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 30. +- The protocol number was changed to 30. ### NOTABLE CHANGES IN BEHAVIOR: - - The handling of implied directories when using `--relative` has changed to - send them as directories (e.g. no implied dir is ever sent as a symlink). - This avoids unexpected behavior and should not adversely affect most people. - If you're one of those rare individuals who relied upon having an implied - dir be duplicated as a symlink, you should specify the transfer of the - symlink and the transfer of the referent directory as separate args. (See - also `--keep-dirlinks` and `--no-implied-dirs`.) Also, exclude rules no - longer have a partial effect on implied dirs. - - - Requesting a remote file-listing without specifying `-r` (`--recursive`) now - sends the `-d` (`--dirs`) option to the remote rsync rather than sending - `-r` along with an extra exclude of `/*/*`. If the remote rsync does not - understand the `-d` option (i.e. it is 2.6.3 or older), you will need to - either turn off `-d` (`--no-d`), or specify `-r --exclude='/*/*'` manually. - - - In `--dry-run` mode, the last line of the verbose summary text is output - with a "(DRY RUN)" suffix to help remind you that no updates were made. - Similarly, `--only-write-batch` outputs `(BATCH ONLY)`. - - - A writable rsync daemon with `use chroot` disabled now defaults to a - symlink-munging behavior designed to make symlinks safer while also allowing - absolute symlinks to be stored and retrieved. This also has the effect of - making symlinks unusable while they're in the daemon's hierarchy. See the - daemon's `munge symlinks` parameter for details. - - - Starting up an extra copy of an rsync daemon will not clobber the pidfile - for the running daemon -- if the pidfile exists, the new daemon will exit - with an error. This means that your wrapper script that starts the rsync - daemon should be made to handle lock-breaking (if you want any automatic - breaking of locks to be done). +- The handling of implied directories when using `--relative` has changed to + send them as directories (e.g. no implied dir is ever sent as a symlink). + This avoids unexpected behavior and should not adversely affect most people. + If you're one of those rare individuals who relied upon having an implied + dir be duplicated as a symlink, you should specify the transfer of the + symlink and the transfer of the referent directory as separate args. (See + also `--keep-dirlinks` and `--no-implied-dirs`.) Also, exclude rules no + longer have a partial effect on implied dirs. + +- Requesting a remote file-listing without specifying `-r` (`--recursive`) now + sends the `-d` (`--dirs`) option to the remote rsync rather than sending + `-r` along with an extra exclude of `/*/*`. If the remote rsync does not + understand the `-d` option (i.e. it is 2.6.3 or older), you will need to + either turn off `-d` (`--no-d`), or specify `-r --exclude='/*/*'` manually. + +- In `--dry-run` mode, the last line of the verbose summary text is output + with a "(DRY RUN)" suffix to help remind you that no updates were made. + Similarly, `--only-write-batch` outputs `(BATCH ONLY)`. + +- A writable rsync daemon with `use chroot` disabled now defaults to a + symlink-munging behavior designed to make symlinks safer while also allowing + absolute symlinks to be stored and retrieved. This also has the effect of + making symlinks unusable while they're in the daemon's hierarchy. See the + daemon's `munge symlinks` parameter for details. + +- Starting up an extra copy of an rsync daemon will not clobber the pidfile + for the running daemon -- if the pidfile exists, the new daemon will exit + with an error. This means that your wrapper script that starts the rsync + daemon should be made to handle lock-breaking (if you want any automatic + breaking of locks to be done). ### BUG FIXES: - - A daemon with `use chroot = no` and excluded items listed in the daemon - config file now properly checks an absolute-path arg specified for these - options: `--compare-dest`, `--link-dest`, `--copy-dest`, `--partial-dir`, - `--backup-dir`, `--temp-dir`, and `--files-from`. +- A daemon with `use chroot = no` and excluded items listed in the daemon + config file now properly checks an absolute-path arg specified for these + options: `--compare-dest`, `--link-dest`, `--copy-dest`, `--partial-dir`, + `--backup-dir`, `--temp-dir`, and `--files-from`. - - A daemon can now be told to disable all user- and group-name translation on - a per-module basis. This avoids a potential problem with a writable daemon - module that has `use chroot` enabled -- if precautions weren't taken, a user - could try to add a missing library and get rsync to use it. This makes rsync - safer by default, and more configurable when id-translation is not desired. - See the daemon's `numeric ids` parameter for full details. +- A daemon can now be told to disable all user- and group-name translation on + a per-module basis. This avoids a potential problem with a writable daemon + module that has `use chroot` enabled -- if precautions weren't taken, a user + could try to add a missing library and get rsync to use it. This makes rsync + safer by default, and more configurable when id-translation is not desired. + See the daemon's `numeric ids` parameter for full details. - - A chroot daemon can now indicate which part of its path should affect the - chroot call, and which part should become an inside-chroot path for the - module. This allows you to have outside-the-transfer paths (such as for - libraries) even when you enable chroot protection. The idiom used in the - rsyncd.conf file is: `path = /chroot/dirs/./dirs/inside` +- A chroot daemon can now indicate which part of its path should affect the + chroot call, and which part should become an inside-chroot path for the + module. This allows you to have outside-the-transfer paths (such as for + libraries) even when you enable chroot protection. The idiom used in the + rsyncd.conf file is: `path = /chroot/dirs/./dirs/inside` - - If a file's data arrived successfully on the receiving side but the rename - of the temporary file to the destination file failed AND the - `--remove-source-files` (or the deprecated `--remove-sent-files`) option was - specified, rsync no longer erroneously removes the associated source file. +- If a file's data arrived successfully on the receiving side but the rename + of the temporary file to the destination file failed AND the + `--remove-source-files` (or the deprecated `--remove-sent-files`) option was + specified, rsync no longer erroneously removes the associated source file. - - Fixed the output of `-ii` when combined with one of the `--*-dest` options: - it now itemizes all the items, not just the changed ones. +- Fixed the output of `-ii` when combined with one of the `--*-dest` options: + it now itemizes all the items, not just the changed ones. - - Made the output of all file types consistent when using a `--*-dest` option. - Prior versions would output too many creation events for matching items. +- Made the output of all file types consistent when using a `--*-dest` option. + Prior versions would output too many creation events for matching items. - - The code that waits for a child pid now handles being interrupted by a - signal. This fixes a problem with the pre-xfer exec function not being able - to get the exit status from the script. +- The code that waits for a child pid now handles being interrupted by a + signal. This fixes a problem with the pre-xfer exec function not being able + to get the exit status from the script. - - A negated filter rule (i.e. with a '!' modifier) no longer loses the - negation when sending the filter rules to the remote rsync. +- A negated filter rule (i.e. with a '!' modifier) no longer loses the + negation when sending the filter rules to the remote rsync. - - Fixed a problem with the `--out-format` (aka `--log-format`) option %f: it - no longer outputs superfluous directory info for a non-daemon rsync. +- Fixed a problem with the `--out-format` (aka `--log-format`) option %f: it + no longer outputs superfluous directory info for a non-daemon rsync. - - Fixed a problem with `-vv` (double `--verbose`) and `--stats` when `pushing` - files (which includes local copies). Version 2.6.9 would complete the copy, - but exit with an error when the receiver output its memory stats. +- Fixed a problem with `-vv` (double `--verbose`) and `--stats` when `pushing` + files (which includes local copies). Version 2.6.9 would complete the copy, + but exit with an error when the receiver output its memory stats. - - If `--password-file` is used on a non-daemon transfer, rsync now complains - and exits. This should help users figure out that they can't use this option - to control a remote shell's password prompt. +- If `--password-file` is used on a non-daemon transfer, rsync now complains + and exits. This should help users figure out that they can't use this option + to control a remote shell's password prompt. - - Make sure that directory permissions of a newly-created destination - directory are handled right when `--perms` is left off. +- Make sure that directory permissions of a newly-created destination + directory are handled right when `--perms` is left off. - - The itemized output of a newly-created destination directory is now output - as a creation event, not a change event. +- The itemized output of a newly-created destination directory is now output + as a creation event, not a change event. - - Improved `--hard-link` so that more corner cases are handled correctly when - combined with options such as `--link-dest` and/or `--ignore-existing`. +- Improved `--hard-link` so that more corner cases are handled correctly when + combined with options such as `--link-dest` and/or `--ignore-existing`. - - The `--append` option no longer updates a file that has the same size. +- The `--append` option no longer updates a file that has the same size. - - Fixed a bug when combining `--backup` and `--backup-dir` with `--inplace`: - any missing backup directories are now created. +- Fixed a bug when combining `--backup` and `--backup-dir` with `--inplace`: + any missing backup directories are now created. - - Fixed a bug when using `--backup` and `--inplace` with `--whole-file` or - `--read-batch`: backup files are actually created now. +- Fixed a bug when using `--backup` and `--inplace` with `--whole-file` or + `--read-batch`: backup files are actually created now. - - The daemon pidfile is checked and created sooner in the startup sequence. +- The daemon pidfile is checked and created sooner in the startup sequence. - - If a daemon module's `path` value is not an absolute pathname, the code now - makes it absolute internally (making it work properly). +- If a daemon module's `path` value is not an absolute pathname, the code now + makes it absolute internally (making it work properly). - - Ensure that a temporary file always has owner-write permission while we are - writing to it. This avoids problems with some network filesystems when - transferring read-only files. +- Ensure that a temporary file always has owner-write permission while we are + writing to it. This avoids problems with some network filesystems when + transferring read-only files. - - Any errors output about password-file reading no longer cause an error at - the end of the run about a partial transfer. +- Any errors output about password-file reading no longer cause an error at + the end of the run about a partial transfer. - - The `--read-batch` option for protocol 30 now ensures that several more - options are set correctly for the current batch file: `--iconv`, `--acls`, - `--xattrs`, `--inplace`, `--append`, and `--append-verify`. +- The `--read-batch` option for protocol 30 now ensures that several more + options are set correctly for the current batch file: `--iconv`, `--acls`, + `--xattrs`, `--inplace`, `--append`, and `--append-verify`. - - Using `--only-write-batch` to a daemon receiver now works properly (older - versions would update some files while writing the batch). +- Using `--only-write-batch` to a daemon receiver now works properly (older + versions would update some files while writing the batch). - - Avoid outputting a "file has vanished" message when the file is a broken - symlink and `--copy-unsafe-links` or `--copy-dirlinks` is used (the code - already handled this for `--copy-links`). +- Avoid outputting a "file has vanished" message when the file is a broken + symlink and `--copy-unsafe-links` or `--copy-dirlinks` is used (the code + already handled this for `--copy-links`). - - Fixed the combination of `--only-write-batch` and `--dry-run`. +- Fixed the combination of `--only-write-batch` and `--dry-run`. - - Fixed rsync's ability to remove files that are not writable by the file's - owner when rsync is running as the same user. +- Fixed rsync's ability to remove files that are not writable by the file's + owner when rsync is running as the same user. - - When transferring large files, the sender's hashtable of checksums is kept - at a more reasonable state of fullness (no more than 80% full) so that the - scanning of the hashtable will not bog down as the number of blocks - increases. +- When transferring large files, the sender's hashtable of checksums is kept + at a more reasonable state of fullness (no more than 80% full) so that the + scanning of the hashtable will not bog down as the number of blocks + increases. ### ENHANCEMENTS: - - A new incremental-recursion algorithm is now used when rsync is talking to - another 3.x version. This starts the transfer going more quickly (before all - the files have been found), and requires much less memory. See the - `--recursive` option in the manpage for some restrictions. - - - Lowered memory use in the non-incremental-recursion algorithm for typical - option values (usually saving from 21-29 bytes per file). - - - The default `--delete` algorithm is now `--delete-during` when talking to a - 3.x rsync. This is a faster scan than using `--delete-before` (which is the - default when talking to older rsync versions), and is compatible with the - new incremental recursion mode. - - - Rsync now allows multiple remote-source args to be specified rather than - having to rely on a special space-splitting side-effect of the remote- - shell. Additional remote args must specify the same host or an empty one - (e.g. empty: `:file1` or `::module/file2`). For example, this means that - local use of brace expansion now works: `rsync -av host:dir/{f1,f2} .` - - - Added the `--protect-args` (`-s`) option, that tells rsync to send most of - the command-line args at the start of the transfer rather than as args to - the remote-shell command. This protects them from space-splitting, and only - interprets basic wildcard special shell characters (`*?[`). - - - Added the `--delete-delay` option, which is a more efficient way to delete - files at the end of the transfer without needing a separate delete pass. - - - Added the `--acls` (`-A`) option to preserve Access Control Lists. This is - an improved version of the prior patch that was available, and it even - supports OS X ACLs. If you need to have backward compatibility with old, - ACL-patched versions of rsync, apply the acls.diff file from the patches - dir. - - - Added the `--xattrs` (`-X`) option to preserve extended attributes. This is - an improved version of the prior patch that was available, and it even - supports OS X xattrs (which includes their resource fork data). If you need - to have backward compatibility with old, xattr-patched versions of rsync, - apply the xattrs.diff file from the patches dir. - - - Added the `--fake-super` option that allows a non-super user to preserve all - attributes of a file by using a special extended-attribute idiom. It even - supports the storing of foreign ACL data on your backup server. There is - also an analogous `fake super` parameter for an rsync daemon. - - - Added the `--iconv` option, which allows rsync to convert filenames from one - character-set to another during the transfer. The default is to make this - feature available as long as your system has `iconv_open()`. If compilation - fails, specify `--disable-iconv` to configure, and then rebuild. If you want - rsync to perform character-set conversions by default, you can specify - `--enable-iconv=CONVERT_STRING` with the default value for the `--iconv` - option that you wish to use. For example, `--enable-iconv=.` is a good - choice. See the rsync manpage for an explanation of the `--iconv` option's - settings. - - - A new daemon config parameter, `charset`, lets you control the character- - set that is used during an `--iconv` transfer to/from a daemon module. You - can also set your daemon to refuse `no-iconv` if you want to force the - client to use an `--iconv` transfer (requiring an rsync 3.x client). - - - Added the `--skip-compress=LIST` option to override the default list of file - suffixes that will not be compressed when using `--compress` (`-z`). - - - The daemon's default for `dont compress` was extended to include: `*.7z` - `*.mp[34]` `*.mov` `*.avi` `*.ogg` `*.jpg` `*.jpeg` and the name-matching routine was also - optimized to run more quickly. - - - The `--max-delete` option now outputs a warning if it skipped any file - deletions, including a count of how many deletions were skipped. (Older - versions just silently stopped deleting things.) - - - You may specify `--max-delete=0` to a 3.0.0 client to request that it warn - about extraneous files without deleting anything. If you're not sure what - version the client is, you can use the less-obvious `--max-delete=-1`, as - both old and new versions will treat that as the same request (though older - versions don't warn). - - - The `--hard-link` option now uses less memory on both the sending and - receiving side for all protocol versions. For protocol 30, the use of a - hashtable on the sending side allows us to more efficiently convey to the - receiver what files are linked together. This reduces the amount of data - sent over the socket by a considerable margin (rather than adding more - data), and limits the in-memory storage of the device+inode information to - just the sending side for the new protocol 30, or to the receiving side when - speaking an older protocol (note that older rsync versions kept the - device+inode information on both sides). - - - The filter rules now support a perishable (`p`) modifier that marks rules - that should not have an effect in a directory that is being deleted. e.g. - `-f '-p .svn/'` would only affect `live` .svn directories. - - - Rsync checks all the alternate-destination args for validity (e.g. - `--link-dest`). This lets the user know when they specified a directory that - does not exist. - - - If we get an ENOSYS error setting the time on a symlink, we don't complain - about it anymore (for those systems that even support the setting of the - modify-time on a symlink). - - - Protocol 30 now uses MD5 checksums instead of MD4. - - - Changed the `--append` option to not checksum the existing data in the - destination file, which speeds up file appending. - - - Added the `--append-verify` option, which works like the older `--append` - option (verifying the existing data in the destination file). For - compatibility with older rsync versions, any use of `--append` that is - talking protocol 29 or older will revert to the `--append-verify` method. - - - Added the `--contimeout=SECONDS` option that lets the user specify a - connection timeout for rsync daemon access. - - - Documented and extended the support for the `RSYNC_CONNECT_PROG` variable - that can be used to enhance the client side of a daemon connection. - - - Improved the dashes and double-quotes in the nroff manpage output. - - - Rsync now supports a lot more `--no-OPTION` override options. +- A new incremental-recursion algorithm is now used when rsync is talking to + another 3.x version. This starts the transfer going more quickly (before all + the files have been found), and requires much less memory. See the + `--recursive` option in the manpage for some restrictions. + +- Lowered memory use in the non-incremental-recursion algorithm for typical + option values (usually saving from 21-29 bytes per file). + +- The default `--delete` algorithm is now `--delete-during` when talking to a + 3.x rsync. This is a faster scan than using `--delete-before` (which is the + default when talking to older rsync versions), and is compatible with the + new incremental recursion mode. + +- Rsync now allows multiple remote-source args to be specified rather than + having to rely on a special space-splitting side-effect of the remote- + shell. Additional remote args must specify the same host or an empty one + (e.g. empty: `:file1` or `::module/file2`). For example, this means that + local use of brace expansion now works: `rsync -av host:dir/{f1,f2} .` + +- Added the `--protect-args` (`-s`) option, that tells rsync to send most of + the command-line args at the start of the transfer rather than as args to + the remote-shell command. This protects them from space-splitting, and only + interprets basic wildcard special shell characters (`*?[`). + +- Added the `--delete-delay` option, which is a more efficient way to delete + files at the end of the transfer without needing a separate delete pass. + +- Added the `--acls` (`-A`) option to preserve Access Control Lists. This is + an improved version of the prior patch that was available, and it even + supports OS X ACLs. If you need to have backward compatibility with old, + ACL-patched versions of rsync, apply the acls.diff file from the patches + dir. + +- Added the `--xattrs` (`-X`) option to preserve extended attributes. This is + an improved version of the prior patch that was available, and it even + supports OS X xattrs (which includes their resource fork data). If you need + to have backward compatibility with old, xattr-patched versions of rsync, + apply the xattrs.diff file from the patches dir. + +- Added the `--fake-super` option that allows a non-super user to preserve all + attributes of a file by using a special extended-attribute idiom. It even + supports the storing of foreign ACL data on your backup server. There is + also an analogous `fake super` parameter for an rsync daemon. + +- Added the `--iconv` option, which allows rsync to convert filenames from one + character-set to another during the transfer. The default is to make this + feature available as long as your system has `iconv_open()`. If compilation + fails, specify `--disable-iconv` to configure, and then rebuild. If you want + rsync to perform character-set conversions by default, you can specify + `--enable-iconv=CONVERT_STRING` with the default value for the `--iconv` + option that you wish to use. For example, `--enable-iconv=.` is a good + choice. See the rsync manpage for an explanation of the `--iconv` option's + settings. + +- A new daemon config parameter, `charset`, lets you control the character- + set that is used during an `--iconv` transfer to/from a daemon module. You + can also set your daemon to refuse `no-iconv` if you want to force the + client to use an `--iconv` transfer (requiring an rsync 3.x client). + +- Added the `--skip-compress=LIST` option to override the default list of file + suffixes that will not be compressed when using `--compress` (`-z`). + +- The daemon's default for `dont compress` was extended to include: `*.7z` + `*.mp[34]` `*.mov` `*.avi` `*.ogg` `*.jpg` `*.jpeg` and the name-matching routine was also + optimized to run more quickly. + +- The `--max-delete` option now outputs a warning if it skipped any file + deletions, including a count of how many deletions were skipped. (Older + versions just silently stopped deleting things.) + +- You may specify `--max-delete=0` to a 3.0.0 client to request that it warn + about extraneous files without deleting anything. If you're not sure what + version the client is, you can use the less-obvious `--max-delete=-1`, as + both old and new versions will treat that as the same request (though older + versions don't warn). + +- The `--hard-link` option now uses less memory on both the sending and + receiving side for all protocol versions. For protocol 30, the use of a + hashtable on the sending side allows us to more efficiently convey to the + receiver what files are linked together. This reduces the amount of data + sent over the socket by a considerable margin (rather than adding more + data), and limits the in-memory storage of the device+inode information to + just the sending side for the new protocol 30, or to the receiving side when + speaking an older protocol (note that older rsync versions kept the + device+inode information on both sides). + +- The filter rules now support a perishable (`p`) modifier that marks rules + that should not have an effect in a directory that is being deleted. e.g. + `-f '-p .svn/'` would only affect `live` .svn directories. + +- Rsync checks all the alternate-destination args for validity (e.g. + `--link-dest`). This lets the user know when they specified a directory that + does not exist. + +- If we get an ENOSYS error setting the time on a symlink, we don't complain + about it anymore (for those systems that even support the setting of the + modify-time on a symlink). + +- Protocol 30 now uses MD5 checksums instead of MD4. + +- Changed the `--append` option to not checksum the existing data in the + destination file, which speeds up file appending. + +- Added the `--append-verify` option, which works like the older `--append` + option (verifying the existing data in the destination file). For + compatibility with older rsync versions, any use of `--append` that is + talking protocol 29 or older will revert to the `--append-verify` method. + +- Added the `--contimeout=SECONDS` option that lets the user specify a + connection timeout for rsync daemon access. + +- Documented and extended the support for the `RSYNC_CONNECT_PROG` variable + that can be used to enhance the client side of a daemon connection. + +- Improved the dashes and double-quotes in the nroff manpage output. + +- Rsync now supports a lot more `--no-OPTION` override options. ### INTERNAL: - - The file-list sorting algorithm now uses a sort that keeps any same-named - items in the same order as they were specified. This allows rsync to always - ensure that the first of the duplicates is the one that will be included in - the copy. The new sort is also faster than the glibc version of qsort() and - mergesort(). +- The file-list sorting algorithm now uses a sort that keeps any same-named + items in the same order as they were specified. This allows rsync to always + ensure that the first of the duplicates is the one that will be included in + the copy. The new sort is also faster than the glibc version of qsort() and + mergesort(). - - Rsync now supports the transfer of 64-bit timestamps (`time_t` values). +- Rsync now supports the transfer of 64-bit timestamps (`time_t` values). - - Made the file-deletion code use a little less stack when recursing through a - directory hierarchy of extraneous files. +- Made the file-deletion code use a little less stack when recursing through a + directory hierarchy of extraneous files. - - Fixed a build problem with older (2.x) versions of gcc. +- Fixed a build problem with older (2.x) versions of gcc. - - Added some isType() functions that make dealing with signed characters - easier without forcing variables via casts. +- Added some isType() functions that make dealing with signed characters + easier without forcing variables via casts. - - Changed strcat/strcpy/sprintf function calls to use safer versions. +- Changed strcat/strcpy/sprintf function calls to use safer versions. - - Upgraded the included popt version to 1.10.2 and improved its use of - string-handling functions. +- Upgraded the included popt version to 1.10.2 and improved its use of + string-handling functions. - - Added missing prototypes for compatibility functions from the lib dir. +- Added missing prototypes for compatibility functions from the lib dir. - - Configure determines if iconv() has a const arg, allowing us to avoid a - compiler warning. +- Configure determines if iconv() has a const arg, allowing us to avoid a + compiler warning. - - Made the sending of some numbers more efficient for protocol 30. +- Made the sending of some numbers more efficient for protocol 30. - - Make sure that a daemon process doesn't mind if the client was weird and - omitted the `--server` option. +- Make sure that a daemon process doesn't mind if the client was weird and + omitted the `--server` option. - - There are more internal logging categories available in protocol 30 than the - age-old FINFO and FERROR, including `FERROR_XFER` and FWARN. These new - categories allow some errors and warnings to go to stderr without causing an - erroneous end-of-run warning about some files not being able to be - transferred. +- There are more internal logging categories available in protocol 30 than the + age-old FINFO and FERROR, including `FERROR_XFER` and FWARN. These new + categories allow some errors and warnings to go to stderr without causing an + erroneous end-of-run warning about some files not being able to be + transferred. - - Improved the use of `const` on pointers. +- Improved the use of `const` on pointers. - - Improved J.W.'s `pool_alloc` routines to add a way of incrementally freeing - older sections of a pool's memory. +- Improved J.W.'s `pool_alloc` routines to add a way of incrementally freeing + older sections of a pool's memory. - - The getaddrinfo.c compatibility code in the `lib` dir was replaced with some - new code (derived from samba, derived from PostgreSQL) that has a better - license than the old code. +- The getaddrinfo.c compatibility code in the `lib` dir was replaced with some + new code (derived from samba, derived from PostgreSQL) that has a better + license than the old code. ### DEVELOPER RELATED: - - Rsync is now licensed under the GPLv3 or later. +- Rsync is now licensed under the GPLv3 or later. - - Rsync is now being maintained in a `git` repository instead of CVS (though - the old CVS repository still exists for historical access). Several - maintenance scripts were updated to work with git. +- Rsync is now being maintained in a `git` repository instead of CVS (though + the old CVS repository still exists for historical access). Several + maintenance scripts were updated to work with git. - - Generated files are no longer committed into the source repository. The - autoconf and autoheader commands are now automatically run during the normal - use of `configure` and `make`. The latest dev versions of all generated - files can also be copied from the samba.org web site (see the prepare-source - script's fetch option). +- Generated files are no longer committed into the source repository. The + autoconf and autoheader commands are now automatically run during the normal + use of `configure` and `make`. The latest dev versions of all generated + files can also be copied from the samba.org web site (see the prepare-source + script's fetch option). - - The `patches` directory of diff files is now built from branches in the - rsync git repository (branch patch/FOO creates file patches/FOO.diff). This - directory is now distributed in a separate separate tar file named - rsync-patches-VERSION.tar.gz instead of the main rsync-VERSION.tar.gz. +- The `patches` directory of diff files is now built from branches in the + rsync git repository (branch patch/FOO creates file patches/FOO.diff). This + directory is now distributed in a separate separate tar file named + rsync-patches-VERSION.tar.gz instead of the main rsync-VERSION.tar.gz. - - The proto.h file is now built using a simple perl script rather than a - complex awk script, which proved to be more widely compatible. +- The proto.h file is now built using a simple perl script rather than a + complex awk script, which proved to be more widely compatible. - - When running the tests, we now put our per-test temp dirs into a sub- - directory named testtmp (which is created, if missing). This allows someone - to symlink the testtmp directory to another filesystem (which is useful if - the build dir's filesystem does not support ACLs and xattrs, but another - filesystem does). +- When running the tests, we now put our per-test temp dirs into a sub- + directory named testtmp (which is created, if missing). This allows someone + to symlink the testtmp directory to another filesystem (which is useful if + the build dir's filesystem does not support ACLs and xattrs, but another + filesystem does). - - Rsync now has a way of handling protocol-version changes during the - development of a new protocol version. This causes any out-of-sync versions - to speak an older protocol rather than fail in a cryptic manner. This - addition makes it safer to deploy a pre-release version that may interact - with the public. This new exchange of sub-version info does not interfere - with the `{MIN,MAX}_PROTOCOL_VERSION` checking algorithm (which does not - have enough range to allow the main protocol number to be incremented for - every minor tweak in that happens during development). +- Rsync now has a way of handling protocol-version changes during the + development of a new protocol version. This causes any out-of-sync versions + to speak an older protocol rather than fail in a cryptic manner. This + addition makes it safer to deploy a pre-release version that may interact + with the public. This new exchange of sub-version info does not interfere + with the `{MIN,MAX}_PROTOCOL_VERSION` checking algorithm (which does not + have enough range to allow the main protocol number to be incremented for + every minor tweak in that happens during development). - - The csprotocol.txt file was updated to mention the daemon protocol change in - the 3.0.0 release. +- The csprotocol.txt file was updated to mention the daemon protocol change in + the 3.0.0 release. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.9 (6 Nov 2006) @@ -3685,158 +3687,158 @@ to develop and test fixes. ### BUG FIXES: - - If rsync is interrupted via a handled signal (such as SIGINT), it will once - again clean-up its temp file from the destination dir. +- If rsync is interrupted via a handled signal (such as SIGINT), it will once + again clean-up its temp file from the destination dir. - - Fixed an overzealous sanitizing bug in the handling of the `--link-dest`, - `--copy-dest`, and `--compare-dest` options to a daemon without chroot: if - the copy's destination dir is deeper than the top of the module's path, - these options now accept a safe number of parent-dir (../) references (since - these options are relative to the destination dir). The old code incorrectly - chopped off all `../` prefixes for these options, no matter how deep the - destination directory was in the module's hierarchy. +- Fixed an overzealous sanitizing bug in the handling of the `--link-dest`, + `--copy-dest`, and `--compare-dest` options to a daemon without chroot: if + the copy's destination dir is deeper than the top of the module's path, + these options now accept a safe number of parent-dir (../) references (since + these options are relative to the destination dir). The old code incorrectly + chopped off all `../` prefixes for these options, no matter how deep the + destination directory was in the module's hierarchy. - - Fixed a bug where a deferred info/error/log message could get sent directly - to the sender instead of being handled by rwrite() in the generator. This - fixes an `unexpected tag 3` fatal error, and should also fix a potential - problem where a deferred info/error message from the receiver might bypass - the log file and get sent only to the client process. (These problems could - only affect an rsync daemon that was receiving files.) +- Fixed a bug where a deferred info/error/log message could get sent directly + to the sender instead of being handled by rwrite() in the generator. This + fixes an `unexpected tag 3` fatal error, and should also fix a potential + problem where a deferred info/error message from the receiver might bypass + the log file and get sent only to the client process. (These problems could + only affect an rsync daemon that was receiving files.) - - Fixed a bug when `--inplace` was combined with a `--*-dest` option and we - update a file's data using an alternate basis file. The code now notices - that it needs to copy the matching data from the basis file instead of - (wrongly) assuming that it was already present in the file. +- Fixed a bug when `--inplace` was combined with a `--*-dest` option and we + update a file's data using an alternate basis file. The code now notices + that it needs to copy the matching data from the basis file instead of + (wrongly) assuming that it was already present in the file. - - Fixed a bug where using `--dry-run` with a `--*-dest` option with a path - relative to a directory that does not yet exist: the affected option gets - its proper path value so that the output of the dry-run is right. +- Fixed a bug where using `--dry-run` with a `--*-dest` option with a path + relative to a directory that does not yet exist: the affected option gets + its proper path value so that the output of the dry-run is right. - - Fixed a bug in the %f logfile escape when receiving files: the destination - path is now included in the output (e.g. you can now tell when a user - specifies a subdir inside a module). +- Fixed a bug in the %f logfile escape when receiving files: the destination + path is now included in the output (e.g. you can now tell when a user + specifies a subdir inside a module). - - If the receiving side fails to create a directory, it will now skip trying - to update everything that is inside that directory. +- If the receiving side fails to create a directory, it will now skip trying + to update everything that is inside that directory. - - If `--link-dest` is specified with `--checksum` but without `--times`, rsync - will now allow a hard-link to be created to a matching link-dest file even - when the file's modify-time doesn't match the server's file. +- If `--link-dest` is specified with `--checksum` but without `--times`, rsync + will now allow a hard-link to be created to a matching link-dest file even + when the file's modify-time doesn't match the server's file. - - The daemon now calls more timezone-using functions prior to doing a chroot. - This should help some C libraries to generate proper timestamps from inside - a chrooted daemon (and to not try to access /etc/timezone over and over - again). +- The daemon now calls more timezone-using functions prior to doing a chroot. + This should help some C libraries to generate proper timestamps from inside + a chrooted daemon (and to not try to access /etc/timezone over and over + again). - - Fixed a bug in the handling of an absolute `--partial-dir=ABS_PATH` option: - it now deletes an alternate basis file from the partial-dir that was used to - successfully update a destination file. +- Fixed a bug in the handling of an absolute `--partial-dir=ABS_PATH` option: + it now deletes an alternate basis file from the partial-dir that was used to + successfully update a destination file. - - Fixed a bug in the handling of `--delete-excluded` when using a per-dir - merge file: the merge file is now honored on the receiving side, and only - its unqualified include/exclude commands are ignored (just as is done for - global include/excludes). +- Fixed a bug in the handling of `--delete-excluded` when using a per-dir + merge file: the merge file is now honored on the receiving side, and only + its unqualified include/exclude commands are ignored (just as is done for + global include/excludes). - - Fixed a recent bug where `--delete` was not working when transferring from - the root (/) of the filesystem with `--relative` enabled. +- Fixed a recent bug where `--delete` was not working when transferring from + the root (/) of the filesystem with `--relative` enabled. - - Fixed a recent bug where an `--exclude='*'` could affect the root (/) of the - filesystem with `--relative` enabled. +- Fixed a recent bug where an `--exclude='*'` could affect the root (/) of the + filesystem with `--relative` enabled. - - When `--inplace` creates a file, it is now created with owner read/write - permissions (0600) instead of no permissions at all. This avoids a problem - continuing a transfer that was interrupted (since `--inplace` will not - update a file that has no write permissions). +- When `--inplace` creates a file, it is now created with owner read/write + permissions (0600) instead of no permissions at all. This avoids a problem + continuing a transfer that was interrupted (since `--inplace` will not + update a file that has no write permissions). - - If either `--remove-source-files` or `--remove-sent-files` is enabled and we - are unable to remove the source file, rsync now outputs an error. +- If either `--remove-source-files` or `--remove-sent-files` is enabled and we + are unable to remove the source file, rsync now outputs an error. - - Fixed a bug in the daemon's `incoming chmod` rule: newly-created directories - no longer get the 'F' (file) rules applied to them. +- Fixed a bug in the daemon's `incoming chmod` rule: newly-created directories + no longer get the 'F' (file) rules applied to them. - - Fixed an infinite loop bug when a filter rule was rejected due to being - overly long. +- Fixed an infinite loop bug when a filter rule was rejected due to being + overly long. - - When the server receives a `--partial-dir` option from the client, it no - longer runs the client-side code that adds an assumed filter rule (since the - client will be sending us the rules in the usual manner, and they may have - chosen to override the auto-added rule). +- When the server receives a `--partial-dir` option from the client, it no + longer runs the client-side code that adds an assumed filter rule (since the + client will be sending us the rules in the usual manner, and they may have + chosen to override the auto-added rule). ### ENHANCEMENTS: - - Added the `--log-file=FILE` and `--log-file-format=FORMAT` options. These - can be used to tell any rsync to output what it is doing to a log file. - They work with a client rsync, a non-daemon server rsync (see the manpage - for instructions), and also allows the overriding of rsyncd.conf settings - when starting a daemon. - - - The `--log-format` option was renamed to be `--out-format` to avoid - confusing it with affecting the log-file output. (The old option remains as - an alias for the new to preserve backward compatibility.) - - - Made `log file` and `syslog facility` settable on a per-module basis in the - daemon's config file. - - - Added the `--remove-source-files` option as a replacement for the (now - deprecated) `--remove-sent-files` option. This new option removes all - non-dirs from the source directories, even if the file was already - up-to-date. This fixes a problem where interrupting an rsync that was using - `--remove-sent-files` and restarting it could leave behind a file that the - earlier rsync synchronized, but didn't get to remove. (The deprecated - `--remove-sent-files` is still understood for now, and still behaves in the - same way as before.) - - - Added the option `--no-motd` to suppress the message-of-the-day output from - a daemon when doing a copy. (See the manpage for a caveat.) - - - Added a new environment variable to the pre-/post-xfer exec commands (in the - daemon's config file): `RSYNC_PID`. This value will be the same in both the - pre- and post-xfer commands, so it can be used as a unique ID if the - pre-xfer command wants to cache some arg/request info for the post-xfer - command. +- Added the `--log-file=FILE` and `--log-file-format=FORMAT` options. These + can be used to tell any rsync to output what it is doing to a log file. + They work with a client rsync, a non-daemon server rsync (see the manpage + for instructions), and also allows the overriding of rsyncd.conf settings + when starting a daemon. + +- The `--log-format` option was renamed to be `--out-format` to avoid + confusing it with affecting the log-file output. (The old option remains as + an alias for the new to preserve backward compatibility.) + +- Made `log file` and `syslog facility` settable on a per-module basis in the + daemon's config file. + +- Added the `--remove-source-files` option as a replacement for the (now + deprecated) `--remove-sent-files` option. This new option removes all + non-dirs from the source directories, even if the file was already + up-to-date. This fixes a problem where interrupting an rsync that was using + `--remove-sent-files` and restarting it could leave behind a file that the + earlier rsync synchronized, but didn't get to remove. (The deprecated + `--remove-sent-files` is still understood for now, and still behaves in the + same way as before.) + +- Added the option `--no-motd` to suppress the message-of-the-day output from + a daemon when doing a copy. (See the manpage for a caveat.) + +- Added a new environment variable to the pre-/post-xfer exec commands (in the + daemon's config file): `RSYNC_PID`. This value will be the same in both the + pre- and post-xfer commands, so it can be used as a unique ID if the + pre-xfer command wants to cache some arg/request info for the post-xfer + command. ### INTERNAL: - - Did a code audit using IBM's code-checker program and made several changes, - including: replacing most of the strcpy() and sprintf() calls with - strlcpy(), snprintf(), and memcpy(), adding a 0-value to an enum that had - been intermingling a literal 0 with the defined enum values, silencing some - uninitialized memory checks, marking some functions with a `noreturn` - attribute, and changing an `if` that could never succeed on some platforms - into a pre-processor directive that conditionally compiles the code. +- Did a code audit using IBM's code-checker program and made several changes, + including: replacing most of the strcpy() and sprintf() calls with + strlcpy(), snprintf(), and memcpy(), adding a 0-value to an enum that had + been intermingling a literal 0 with the defined enum values, silencing some + uninitialized memory checks, marking some functions with a `noreturn` + attribute, and changing an `if` that could never succeed on some platforms + into a pre-processor directive that conditionally compiles the code. - - Fixed a potential bug in `f_name_cmp()` when both the args are a top-level - `.` dir (which doesn't happen in normal operations). +- Fixed a potential bug in `f_name_cmp()` when both the args are a top-level + `.` dir (which doesn't happen in normal operations). - - Changed `exit_cleanup()` so that it can never return instead of exit. The - old code might return if it found the `exit_cleanup()` function was being - called recursively. The new code is segmented so that any recursive calls - move on to the next step of the exit-processing. +- Changed `exit_cleanup()` so that it can never return instead of exit. The + old code might return if it found the `exit_cleanup()` function was being + called recursively. The new code is segmented so that any recursive calls + move on to the next step of the exit-processing. - - The macro WIFEXITED(stat) will now be defined if the OS didn't already - define it. +- The macro WIFEXITED(stat) will now be defined if the OS didn't already + define it. ### DEVELOPER RELATED: - - The acls.diff and xattrs.diff patches have received a bunch of work to make - them much closer to being acceptable in the main distribution. The xattrs - patch also has some preliminary Mac OS X and FreeBSD compatibility code that - various system types to exchange extended file-attributes. +- The acls.diff and xattrs.diff patches have received a bunch of work to make + them much closer to being acceptable in the main distribution. The xattrs + patch also has some preliminary Mac OS X and FreeBSD compatibility code that + various system types to exchange extended file-attributes. - - A new diff in the patches dir, fake-root.diff, allows rsync to maintain a - backup hierarchy with full owner, group, and device info without actually - running as root. It does this using a special extended attribute, so it - depends on xattrs.diff (which depends on acls.diff). +- A new diff in the patches dir, fake-root.diff, allows rsync to maintain a + backup hierarchy with full owner, group, and device info without actually + running as root. It does this using a special extended attribute, so it + depends on xattrs.diff (which depends on acls.diff). - - The rsync.yo and rsyncd.conf.yo files have been updated to work better with - the latest yodl 2.x releases. +- The rsync.yo and rsyncd.conf.yo files have been updated to work better with + the latest yodl 2.x releases. - - Updated config.guess and config.sub to their 2006-07-02 versions. +- Updated config.guess and config.sub to their 2006-07-02 versions. - - Updated various files to include the latest FSF address and to have - consistent opening comments. +- Updated various files to include the latest FSF address and to have + consistent opening comments. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.8 (22 Apr 2006) @@ -3844,68 +3846,68 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a bug in the exclude code where an anchored exclude without any - wildcards fails to match an absolute source arg, but only when `--relative` - is in effect. +- Fixed a bug in the exclude code where an anchored exclude without any + wildcards fails to match an absolute source arg, but only when `--relative` + is in effect. - - Improved the I/O code for the generator to fix a potential hang when the - receiver gets an EOF on the socket but the generator's select() call never - indicates that the socket is writable for it to be notified about the EOF. - (This can happen when using stunnel). +- Improved the I/O code for the generator to fix a potential hang when the + receiver gets an EOF on the socket but the generator's select() call never + indicates that the socket is writable for it to be notified about the EOF. + (This can happen when using stunnel). - - Fixed a problem with the file-reading code where a failed read (such as that - caused by a bad sector) would not advance the file's read-position beyond - the failed read's data. +- Fixed a problem with the file-reading code where a failed read (such as that + caused by a bad sector) would not advance the file's read-position beyond + the failed read's data. - - Fixed a logging bug where the `log file` directive was not being honored in - a single-use daemon (one spawned by a remote-shell connection or by init). +- Fixed a logging bug where the `log file` directive was not being honored in + a single-use daemon (one spawned by a remote-shell connection or by init). - - If rsync cannot honor the `--delete` option, we output an error and exit - instead of silently ignoring the option. +- If rsync cannot honor the `--delete` option, we output an error and exit + instead of silently ignoring the option. - - Fixed a bug in the `--link-dest` code that prevented special files (such as - fifos) from being linked. +- Fixed a bug in the `--link-dest` code that prevented special files (such as + fifos) from being linked. - - The ability to hard-link symlinks and special files is now determined at - configure time instead of at runtime. This fixes a bug with `--link-dest` - creating a hard-link to a symlink's referent on a BSD system. +- The ability to hard-link symlinks and special files is now determined at + configure time instead of at runtime. This fixes a bug with `--link-dest` + creating a hard-link to a symlink's referent on a BSD system. ### ENHANCEMENTS: - - In daemon mode, if rsync fails to bind to the requested port, the error(s) - returned by socket() and/or bind() are now logged. +- In daemon mode, if rsync fails to bind to the requested port, the error(s) + returned by socket() and/or bind() are now logged. - - When we output a fatal error, we now output the version of rsync in the - message. +- When we output a fatal error, we now output the version of rsync in the + message. - - Improved the documentation for the `--owner` and `--group` options. +- Improved the documentation for the `--owner` and `--group` options. - - The rsyncstats script in `support` has an improved line-parsing regex that - is easier to read and also makes it to parse syslog-generated lines. +- The rsyncstats script in `support` has an improved line-parsing regex that + is easier to read and also makes it to parse syslog-generated lines. - - A new script in `support`: file-attr-restore, can be used to restore the - attributes of a file-set (the permissions, ownership, and group info) taken - from the cached output of a `find ARG... -ls` command. +- A new script in `support`: file-attr-restore, can be used to restore the + attributes of a file-set (the permissions, ownership, and group info) taken + from the cached output of a `find ARG... -ls` command. ### DEVELOPER RELATED: - - Removed the unused function `write_int_named()`, the unused variable - `io_read_phase`, and the rarely used variable `io_write_phase`. This also - elides the confusing 'phase "unknown"' part of one error message. +- Removed the unused function `write_int_named()`, the unused variable + `io_read_phase`, and the rarely used variable `io_write_phase`. This also + elides the confusing 'phase "unknown"' part of one error message. - - Removed two unused configure checks and two related (also unused) - compatibility functions. +- Removed two unused configure checks and two related (also unused) + compatibility functions. - - The xattrs.diff patch received a security fix that prevents a potential - buffer overflow in the `receive_xattr()` code. +- The xattrs.diff patch received a security fix that prevents a potential + buffer overflow in the `receive_xattr()` code. - - The acls.diff patch has been improved quite a bit, with more to come. +- The acls.diff patch has been improved quite a bit, with more to come. - - A new patch was added: log-file.diff. This contains an early version of a - future option, `--log-file=FILE`, that will allow any rsync to log its - actions to a file (something that only a daemon supports at present). +- A new patch was added: log-file.diff. This contains an early version of a + future option, `--log-file=FILE`, that will allow any rsync to log its + actions to a file (something that only a daemon supports at present). ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.7 (11 Mar 2006) @@ -3913,322 +3915,320 @@ to develop and test fixes. ### OUTPUT CHANGES: - - The letter 'D' in the itemized output was being used for both devices - (character or block) as well as other special files (such as fifos and named - sockets). This has changed to separate non-device special files under the - 'S' designation (e.g. `cS+++++++ path/fifo`). See also the `--specials` - option, below. - - - The way rsync escapes unreadable characters has changed. First, rsync now - has support for recognizing valid multi-byte character sequences in your - current locale, allowing it to escape fewer characters than before for a - locale such as UTF-8. Second, it now uses an escape idiom of `\#123`, which - is the literal string `\#` followed by exactly 3 octal digits. Rsync no - longer doubles a backslash character in a filename (e.g. it used to output - `foo\\bar` when copying `foo\bar`) -- now it only escapes a backslash that - is followed by a hash-sign and 3 digits (0-9) (e.g. it will output - `foo\#134#789` when copying `foo\#789`). See also the `--8-bit-output` - (`-8`) option, mentioned below. - - Script writers: the local rsync is the one that outputs escaped names, so if - you need to support unescaping of filenames for older rsyncs, I'd suggest - that you parse the output of `rsync --version` and only use the old - unescaping rules for 2.6.5 and 2.6.6. +- The letter 'D' in the itemized output was being used for both devices + (character or block) as well as other special files (such as fifos and named + sockets). This has changed to separate non-device special files under the + 'S' designation (e.g. `cS+++++++ path/fifo`). See also the `--specials` + option, below. + +- The way rsync escapes unreadable characters has changed. First, rsync now + has support for recognizing valid multi-byte character sequences in your + current locale, allowing it to escape fewer characters than before for a + locale such as UTF-8. Second, it now uses an escape idiom of `\#123`, which + is the literal string `\#` followed by exactly 3 octal digits. Rsync no + longer doubles a backslash character in a filename (e.g. it used to output + `foo\\bar` when copying `foo\bar`) -- now it only escapes a backslash that + is followed by a hash-sign and 3 digits (0-9) (e.g. it will output + `foo\#134#789` when copying `foo\#789`). See also the `--8-bit-output` + (`-8`) option, mentioned below. + + Script writers: the local rsync is the one that outputs escaped names, so if + you need to support unescaping of filenames for older rsyncs, I'd suggest + that you parse the output of `rsync --version` and only use the old + unescaping rules for 2.6.5 and 2.6.6. ### BUG FIXES: - - Fixed a really old bug that caused `--checksum` (`-c`) to checksum all the - files encountered during the delete scan (ouch). +- Fixed a really old bug that caused `--checksum` (`-c`) to checksum all the + files encountered during the delete scan (ouch). - - Fixed a potential hang in a remote generator: when the receiver gets a - read-error on the socket, it now signals the generator about this so that - the generator does not try to send any of the terminating error messages to - the client (avoiding a potential hang in some setups). +- Fixed a potential hang in a remote generator: when the receiver gets a + read-error on the socket, it now signals the generator about this so that + the generator does not try to send any of the terminating error messages to + the client (avoiding a potential hang in some setups). - - Made hard-links work with symlinks and devices again. +- Made hard-links work with symlinks and devices again. - - If the sender gets an early EOF reading a source file, we propagate this - error to the receiver so that it can discard the file and try requesting it - again (which is the existing behavior for other kinds of read errors). +- If the sender gets an early EOF reading a source file, we propagate this + error to the receiver so that it can discard the file and try requesting it + again (which is the existing behavior for other kinds of read errors). - - If a device-file/special-file changes permissions, rsync now updates the - permissions without recreating the file. +- If a device-file/special-file changes permissions, rsync now updates the + permissions without recreating the file. - - If the user specifies a remote-host for both the source and destination, we - now output a syntax error rather than trying to open the destination - hostspec as a filename. +- If the user specifies a remote-host for both the source and destination, we + now output a syntax error rather than trying to open the destination + hostspec as a filename. - - When `--inplace` creates a new destination file, rsync now creates it with - permissions 0600 instead of 0000 -- this makes restarting possible when the - transfer gets interrupted in the middle of sending a new file. +- When `--inplace` creates a new destination file, rsync now creates it with + permissions 0600 instead of 0000 -- this makes restarting possible when the + transfer gets interrupted in the middle of sending a new file. - - Reject the combination of `--inplace` and `--sparse` since the sparse-output - algorithm doesn't work when overwriting existing data. +- Reject the combination of `--inplace` and `--sparse` since the sparse-output + algorithm doesn't work when overwriting existing data. - - Fixed the directory name in the error that is output when `pop_dir()` fails. +- Fixed the directory name in the error that is output when `pop_dir()` fails. - - Really fixed the parsing of a `!` entry in .cvsignore files this time. +- Really fixed the parsing of a `!` entry in .cvsignore files this time. - - If the generator gets a stat() error on a file, output it (this used to - require at least `-vv` for the error to be seen). +- If the generator gets a stat() error on a file, output it (this used to + require at least `-vv` for the error to be seen). - - If waitpid() fails or the child rsync didn't exit cleanly, we now handle the - exit status properly and generate a better error. +- If waitpid() fails or the child rsync didn't exit cleanly, we now handle the + exit status properly and generate a better error. - - Fixed some glitches in the double-verbose output when using `--copy-dest`, - `--link-dest`, or `--compare-dest`. Also improved how the verbose output - handles hard-links (within the transfer) that had an up-to-date alternate - `dest` file, and copied files (via `--copy-dest`). +- Fixed some glitches in the double-verbose output when using `--copy-dest`, + `--link-dest`, or `--compare-dest`. Also improved how the verbose output + handles hard-links (within the transfer) that had an up-to-date alternate + `dest` file, and copied files (via `--copy-dest`). - - Fixed the matching of the dont-compress items (e.g. `*.gz`) against files - that have a path component containing a slash. +- Fixed the matching of the dont-compress items (e.g. `*.gz`) against files + that have a path component containing a slash. - - If the code reading a filter/exclude file gets an EINTR error, rsync now - clears the error flag on the file handle so it can keep on reading. +- If the code reading a filter/exclude file gets an EINTR error, rsync now + clears the error flag on the file handle so it can keep on reading. - - If `--relative` is active, the sending side cleans up trailing `/` or `/.` - suffixes to avoid triggering a bug in older rsync versions. Also, we now - reject a `..` dir if it would be sent as a relative dir. +- If `--relative` is active, the sending side cleans up trailing `/` or `/.` + suffixes to avoid triggering a bug in older rsync versions. Also, we now + reject a `..` dir if it would be sent as a relative dir. - - If a non-directory is in the way of a directory and rsync is run with - `--dry-run` and `--delete`, rsync no longer complains about not being able - to opendir() the not-yet present directory. +- If a non-directory is in the way of a directory and rsync is run with + `--dry-run` and `--delete`, rsync no longer complains about not being able + to opendir() the not-yet present directory. - - When `--list-only` is used and a non-existent local destination dir was also - specified as a destination, rsync no longer generates a warning about being - unable to create the missing directory. +- When `--list-only` is used and a non-existent local destination dir was also + specified as a destination, rsync no longer generates a warning about being + unable to create the missing directory. - - Fixed some problems with `--relative --no-implied-dirs` when the destination - directory did not yet exist: we can now create a symlink or device when it - is the first thing in the missing dir, and `--fuzzy` no longer complains - about being unable to open the missing dir. +- Fixed some problems with `--relative --no-implied-dirs` when the destination + directory did not yet exist: we can now create a symlink or device when it + is the first thing in the missing dir, and `--fuzzy` no longer complains + about being unable to open the missing dir. - - Fixed a bug where the `--copy-links` option would not affect implied - directories without `--copy-unsafe-links` (see `--relative`). +- Fixed a bug where the `--copy-links` option would not affect implied + directories without `--copy-unsafe-links` (see `--relative`). - - Got rid of the need for `--force` to be used in some circumstances with - `--delete-after` (making it consistent with - `--delete-before`/`--delete-during`). +- Got rid of the need for `--force` to be used in some circumstances with + `--delete-after` (making it consistent with + `--delete-before`/`--delete-during`). - - Rsync now ignores the SIGXFSZ signal, just in case your OS sends this when a - file is too large (rsync handles the write error). +- Rsync now ignores the SIGXFSZ signal, just in case your OS sends this when a + file is too large (rsync handles the write error). - - Fixed a bug in the Proxy-Authorization header's base64-encoded value: it was - not properly padded with trailing '=' chars. This only affects a user that - need to use a password-authenticated proxy for an outgoing daemon-rsync - connection. +- Fixed a bug in the Proxy-Authorization header's base64-encoded value: it was + not properly padded with trailing '=' chars. This only affects a user that + need to use a password-authenticated proxy for an outgoing daemon-rsync + connection. - - If we're transferring an empty directory to a new name, rsync no longer - forces `S_IWUSR` if it wasn't already set, nor does it accidentally leave it - set. +- If we're transferring an empty directory to a new name, rsync no longer + forces `S_IWUSR` if it wasn't already set, nor does it accidentally leave it + set. - - Fixed a bug in the debug output (`-vvvvv`) that could mention the wrong - checksum for the current file offset. +- Fixed a bug in the debug output (`-vvvvv`) that could mention the wrong + checksum for the current file offset. - - Rsync no longer allows a single directory to be copied over a non-directory - destination arg. +- Rsync no longer allows a single directory to be copied over a non-directory + destination arg. ### ENHANCEMENTS: - - Added the `--append` option that makes rsync append data onto files that are - longer on the source than the destination (this includes new files). - - - Added the `--min-size=SIZE` option to exclude small files from the transfer. - - - Added the `--compress-level` option to allow you to set how aggressive - rsync's compression should be (this option implies `--compress`). - - - Enhanced the parsing of the SIZE value for `--min-size` and `--max-size` to - allow easy entry of multiples of 1000 (instead of just multiples of 1024) - and off-by-one values too (e.g. `--max-size=8mb-1`). - - - Added the `--8-bit-output` (`-8`) option, which tells rsync to avoid - escaping high-bit characters that it thinks are unreadable in the current - locale. +- Added the `--append` option that makes rsync append data onto files that are + longer on the source than the destination (this includes new files). + +- Added the `--min-size=SIZE` option to exclude small files from the transfer. + +- Added the `--compress-level` option to allow you to set how aggressive + rsync's compression should be (this option implies `--compress`). + +- Enhanced the parsing of the SIZE value for `--min-size` and `--max-size` to + allow easy entry of multiples of 1000 (instead of just multiples of 1024) + and off-by-one values too (e.g. `--max-size=8mb-1`). + +- Added the `--8-bit-output` (`-8`) option, which tells rsync to avoid + escaping high-bit characters that it thinks are unreadable in the current + locale. + +- The new option `--human-readable` (`-h`) changes the output of `--progress`, + `--stats`, and the end-of-run summary to be easier to read. If repeated, the + units become powers of 1024 instead of powers of 1000. (The old meaning of + `-h`, as a shorthand for `--help`, still works as long as you just use it on + its own, as in `rsync -h`.) + +- If lutimes() and/or lchmod() are around, use them to allow the preservation + of attributes on symlinks. + +- The `--link-dest` option now affects symlinks and devices (when possible). + +- Added two config items to the rsyncd.conf parsing: `pre-xfer exec` and + `post-xfer exec`. These allow a command to be specified on a per-module + basis that will be run before and/or after a daemon-mode transfer. (See the + manpage for a list of the environment variables that are set with + information about the transfer.) + +- When using the `--relative` option, you can now insert a dot dir in the + source path to indicate where the replication of the source dirs should + start. For example, if you specify a source path of + rsync://host/module/foo/bar/./baz/dir with `-R`, rsync will now only + replicate the `baz/dir` part of the source path (note: a trailing dot dir is + unaffected unless it also has a trailing slash). + +- Added some new `--no-FOO` options that make it easier to override unwanted + implied or default options. For example, `-a --no-o` (aka `--archive --no-owner`) can be used to turn off the preservation of file ownership that + is implied by `-a`. - - The new option `--human-readable` (`-h`) changes the output of `--progress`, - `--stats`, and the end-of-run summary to be easier to read. If repeated, the - units become powers of 1024 instead of powers of 1000. (The old meaning of - `-h`, as a shorthand for `--help`, still works as long as you just use it on - its own, as in `rsync -h`.) +- Added the `--chmod=MODE` option that allows the destination permissions to + be changed from the source permissions. E.g. `--chmod=g+w,o-rwx` - - If lutimes() and/or lchmod() are around, use them to allow the preservation - of attributes on symlinks. +- Added the `incoming chmod` and `outgoing chmod` daemon options that allow a + module to specify what permissions changes should be applied to all files + copied to and from the daemon. - - The `--link-dest` option now affects symlinks and devices (when possible). +- Allow the `--temp-dir` option to be specified when starting a daemon, which + sets the default temporary directory for incoming files. - - Added two config items to the rsyncd.conf parsing: `pre-xfer exec` and - `post-xfer exec`. These allow a command to be specified on a per-module - basis that will be run before and/or after a daemon-mode transfer. (See the - manpage for a list of the environment variables that are set with - information about the transfer.) +- If `--delete` is combined with `--dirs` without `--recursive`, rsync will + now delete in any directory whose content is being synchronized. - - When using the `--relative` option, you can now insert a dot dir in the - source path to indicate where the replication of the source dirs should - start. For example, if you specify a source path of - rsync://host/module/foo/bar/./baz/dir with `-R`, rsync will now only - replicate the `baz/dir` part of the source path (note: a trailing dot dir is - unaffected unless it also has a trailing slash). +- If `--backup` is combined with `--delete` without `--backup-dir` (and + without `--delete-excluded`), we add a `protect` filter-rule to ensure that + files with the backup suffix are not deleted. - - Added some new `--no-FOO` options that make it easier to override unwanted - implied or default options. For example, `-a --no-o` (aka `--archive - --no-owner`) can be used to turn off the preservation of file ownership that - is implied by `-a`. +- The file-count stats that are output by `--progress` were improved to better + indicate what the numbers mean. For instance, the output: `(xfer#5, to-check=8383/9999)` indicates that this was the fifth file to be + transferred, and we still need to check 8383 more files out of a total of + 9999\. - - Added the `--chmod=MODE` option that allows the destination permissions to - be changed from the source permissions. E.g. `--chmod=g+w,o-rwx` +- The include/exclude code now allows a `dir/***` directive (with 3 trailing + stars) to match both the dir itself as well as all the content below the dir + (`dir/**` would not match the dir). - - Added the `incoming chmod` and `outgoing chmod` daemon options that allow a - module to specify what permissions changes should be applied to all files - copied to and from the daemon. +- Added the `--prune-empty-dirs` (`-m`) option that makes the receiving rsync + discard empty chains of directories from the file-list. This makes it easier + to selectively copy files from a source hierarchy and end up with just the + directories needed to hold the resulting files. - - Allow the `--temp-dir` option to be specified when starting a daemon, which - sets the default temporary directory for incoming files. +- If the `--itemize-changes` (`-i`) option is repeated, rsync now includes + unchanged files in the itemized output (similar to `-vv`, but without all + the other verbose messages that can get in the way). Of course, the client + must be version 2.6.7 for this to work, but the remote rsync only needs to + be 2.6.7 if you're pushing files. - - If `--delete` is combined with `--dirs` without `--recursive`, rsync will - now delete in any directory whose content is being synchronized. +- Added the `--specials` option to tell rsync to copy non-device special files + (which rsync now attempts even as a normal user). The `--devices` option now + requests the copying of just devices (character and block). The `-D` option + still requests both (e.g. `--devices` and `--specials`), `-a` still implies + `-D`, and non-root users still get a silent downgrade that omits device + copying. - - If `--backup` is combined with `--delete` without `--backup-dir` (and - without `--delete-excluded`), we add a `protect` filter-rule to ensure that - files with the backup suffix are not deleted. +- Added the `--super` option to make the receiver always attempt super-user + activities. This is useful for systems that allow things such as devices to + be created or ownership to be set without being UID 0, and is also useful + for someone who wants to ensure that errors will be output if the receiving + rsync isn't being run as root. - - The file-count stats that are output by `--progress` were improved to better - indicate what the numbers mean. For instance, the output: `(xfer#5, - to-check=8383/9999)` indicates that this was the fifth file to be - transferred, and we still need to check 8383 more files out of a total of - 9999. +- Added the `--sockopts` option for those few who want to customize the TCP + options used to contact a daemon rsync. - - The include/exclude code now allows a `dir/***` directive (with 3 trailing - stars) to match both the dir itself as well as all the content below the dir - (`dir/**` would not match the dir). +- Added a way for the `--temp-dir` option to be combined with a partial-dir + setting that lets rsync avoid non-atomic updates (for those times when + `--temp-dir` is not being used because space is tight). - - Added the `--prune-empty-dirs` (`-m`) option that makes the receiving rsync - discard empty chains of directories from the file-list. This makes it easier - to selectively copy files from a source hierarchy and end up with just the - directories needed to hold the resulting files. +- A new support script, files-to-excludes, will transform a list of files into + a set of include/exclude directives that will copy those files. - - If the `--itemize-changes` (`-i`) option is repeated, rsync now includes - unchanged files in the itemized output (similar to `-vv`, but without all - the other verbose messages that can get in the way). Of course, the client - must be version 2.6.7 for this to work, but the remote rsync only needs to - be 2.6.7 if you're pushing files. +- A new option, `--executability` (`-E`) can be used to preserve just the + execute bit on files, for those times when using the `--perms` option is not + desired. - - Added the `--specials` option to tell rsync to copy non-device special files - (which rsync now attempts even as a normal user). The `--devices` option now - requests the copying of just devices (character and block). The `-D` option - still requests both (e.g. `--devices` and `--specials`), `-a` still implies - `-D`, and non-root users still get a silent downgrade that omits device - copying. +- The daemon now logs each connection and also each module-list request that + it receives. - - Added the `--super` option to make the receiver always attempt super-user - activities. This is useful for systems that allow things such as devices to - be created or ownership to be set without being UID 0, and is also useful - for someone who wants to ensure that errors will be output if the receiving - rsync isn't being run as root. +- New log-format options: %M (modtime), %U (uid), %G (gid), and %B (permission + bits, e.g. `rwxr-xrwt`). + +- The `--dry-run` option no longer forces the enabling of `--verbose`. - - Added the `--sockopts` option for those few who want to customize the TCP - options used to contact a daemon rsync. +- The `--remove-sent-files` option now does a better job of incrementally + removing the sent files on the sending side (older versions tended to clump + up all the removals at the end). - - Added a way for the `--temp-dir` option to be combined with a partial-dir - setting that lets rsync avoid non-atomic updates (for those times when - `--temp-dir` is not being used because space is tight). +- A daemon now supersedes its minimal SIGCHLD handler with the standard + PID-remembering version after forking. This ensures that the generator can + get the child-exit status from the receiver. - - A new support script, files-to-excludes, will transform a list of files into - a set of include/exclude directives that will copy those files. - - - A new option, `--executability` (`-E`) can be used to preserve just the - execute bit on files, for those times when using the `--perms` option is not - desired. - - - The daemon now logs each connection and also each module-list request that - it receives. - - - New log-format options: %M (modtime), %U (uid), %G (gid), and %B (permission - bits, e.g. `rwxr-xrwt`). - - - The `--dry-run` option no longer forces the enabling of `--verbose`. - - - The `--remove-sent-files` option now does a better job of incrementally - removing the sent files on the sending side (older versions tended to clump - up all the removals at the end). +- Use of the `--bwlimit` option no longer interferes with the remote rsync + sending error messages about invalid/refused options. - - A daemon now supersedes its minimal SIGCHLD handler with the standard - PID-remembering version after forking. This ensures that the generator can - get the child-exit status from the receiver. - - - Use of the `--bwlimit` option no longer interferes with the remote rsync - sending error messages about invalid/refused options. - - - Rsync no longer returns a usage error when used with one local source arg - and no destination: this now implies the `--list-only` option, just like the - comparable situation with a remote source arg. +- Rsync no longer returns a usage error when used with one local source arg + and no destination: this now implies the `--list-only` option, just like the + comparable situation with a remote source arg. - - Added the `--copy-dirlinks` option, a more limited version of - `--copy-links`. - - - Various documentation improvements, including: a better synopsis, some - improved examples, a better discussion of the presence and absence of - `--perms` (including how it interacts with the new `--executability` and - `--chmod` options), an extended discussion of `--temp-dir`, an improved - discussion of `--partial-dir`, a better description of rsync's pattern - matching characters, an improved `--no-implied-dirs` section, and the - documenting of what the `--stats` option outputs. +- Added the `--copy-dirlinks` option, a more limited version of + `--copy-links`. + +- Various documentation improvements, including: a better synopsis, some + improved examples, a better discussion of the presence and absence of + `--perms` (including how it interacts with the new `--executability` and + `--chmod` options), an extended discussion of `--temp-dir`, an improved + discussion of `--partial-dir`, a better description of rsync's pattern + matching characters, an improved `--no-implied-dirs` section, and the + documenting of what the `--stats` option outputs. - - Various new and updated diffs in the patches dir, including: acls.diff, - xattrs.diff, atimes.diff, detect-renamed.diff, and slp.diff. +- Various new and updated diffs in the patches dir, including: acls.diff, + xattrs.diff, atimes.diff, detect-renamed.diff, and slp.diff. ### INTERNAL: - - We now use sigaction() and sigprocmask() if possible, and fall back on - signal() if not. Using sigprocmask() ensures that rsync enables all the - signals that it needs, just in case it was started in a masked state. +- We now use sigaction() and sigprocmask() if possible, and fall back on + signal() if not. Using sigprocmask() ensures that rsync enables all the + signals that it needs, just in case it was started in a masked state. - - Some buffer sizes were expanded a bit, particularly on systems where - MAXPATHLEN is overly small (e.g. Cygwin). +- Some buffer sizes were expanded a bit, particularly on systems where + MAXPATHLEN is overly small (e.g. Cygwin). - - If `io_printf()` tries to format more data than fits in the buffer, exit - with an error instead of transmitting a truncated buffer. +- If `io_printf()` tries to format more data than fits in the buffer, exit + with an error instead of transmitting a truncated buffer. - - If a `va_copy` macro is defined, lib/snprintf.c will use it when defining - the `VA_COPY` macro. +- If a `va_copy` macro is defined, lib/snprintf.c will use it when defining + the `VA_COPY` macro. - - Reduced the amount of stack memory needed for each level of directory - recursion by nearly MAXPATHLEN bytes. +- Reduced the amount of stack memory needed for each level of directory + recursion by nearly MAXPATHLEN bytes. - - The wildmatch function was extended to allow an array of strings to be - supplied as the string to match. This allows the exclude code to do less - string copying. +- The wildmatch function was extended to allow an array of strings to be + supplied as the string to match. This allows the exclude code to do less + string copying. - - Got rid of the `safe_fname()` function (and all the myriad calls) and - replaced it with a new function in the log.c code that filters all the - output going to the terminal. +- Got rid of the `safe_fname()` function (and all the myriad calls) and + replaced it with a new function in the log.c code that filters all the + output going to the terminal. - - Unified the `f_name()` and the `f_name_to()` functions. +- Unified the `f_name()` and the `f_name_to()` functions. - - Improved the hash-table code the sender uses to handle checksums to make it - use slightly less memory and run just a little faster. +- Improved the hash-table code the sender uses to handle checksums to make it + use slightly less memory and run just a little faster. ### DEVELOPER RELATED: - - The diffs in the patches dir now require `patch -p1 high` in `clean_flist()` was wrong for an empty list. - This could cause `flist_find()` to crash in certain rare circumstances (e.g. - if just the right directory setup was around when `--fuzzy` was combined - with `--link-dest`). +- The setting of `flist->high` in `clean_flist()` was wrong for an empty list. + This could cause `flist_find()` to crash in certain rare circumstances (e.g. + if just the right directory setup was around when `--fuzzy` was combined + with `--link-dest`). - - The outputting of hard-linked files when verbosity was > 1 was not right: - (1) Without `-i` it would output the name of each hard-linked file as though - it had been changed; it now outputs a `is hard linked` message for the file. - (2) With `-i` it would output all dots for the unchanged attributes of a - hard-link; it now changes those dots to spaces, as is done for other totally - unchanged items. +- The outputting of hard-linked files when verbosity was > 1 was not right: + (1) Without `-i` it would output the name of each hard-linked file as though + it had been changed; it now outputs a `is hard linked` message for the file. + (2) With `-i` it would output all dots for the unchanged attributes of a + hard-link; it now changes those dots to spaces, as is done for other totally + unchanged items. - - When backing up a changed symlink or device, get rid of any old backup item - so that we don't get an `already exists` error. +- When backing up a changed symlink or device, get rid of any old backup item + so that we don't get an `already exists` error. - - A couple places that were comparing a local and a remote modification-time - were not honoring the `--modify-window` option. +- A couple places that were comparing a local and a remote modification-time + were not honoring the `--modify-window` option. - - Fixed a bug where the 'p' (permissions) itemized-changes flag might get set - too often (if some non-significant mode bits differed). +- Fixed a bug where the 'p' (permissions) itemized-changes flag might get set + too often (if some non-significant mode bits differed). - - Fixed a really old, minor bug that could cause rsync to warn about being - unable to mkdir() a path that ends in `/.` because it just created the - directory (required `--relative`, `--no-implied-dirs`, a source path that - ended in either a trailing slash or a trailing `/.`, and a non-existing - destination dir to tickle the bug in a recent version). +- Fixed a really old, minor bug that could cause rsync to warn about being + unable to mkdir() a path that ends in `/.` because it just created the + directory (required `--relative`, `--no-implied-dirs`, a source path that + ended in either a trailing slash or a trailing `/.`, and a non-existing + destination dir to tickle the bug in a recent version). ### ENHANCEMENTS: - - Made the `max verbosity` setting in the rsyncd.conf file settable on a - per-module basis (which now matches the documentation). +- Made the `max verbosity` setting in the rsyncd.conf file settable on a + per-module basis (which now matches the documentation). - - The rrsync script has been upgraded to verify the args of options that take - args (instead of rejecting any such options). It was also changed to try to - be more secure and to fix a problem in the parsing of a pull operation that - has multiple source args. (See the support dir.) +- The rrsync script has been upgraded to verify the args of options that take + args (instead of rejecting any such options). It was also changed to try to + be more secure and to fix a problem in the parsing of a pull operation that + has multiple source args. (See the support dir.) - - Improved the documentation that explains the difference between a normal - daemon transfer and a daemon-over remote-shell transfer. +- Improved the documentation that explains the difference between a normal + daemon transfer and a daemon-over remote-shell transfer. - - Some of the diffs supplied in the patches dir were fixed and/or improved. +- Some of the diffs supplied in the patches dir were fixed and/or improved. ### BUILD CHANGES: - - Made configure define `NOBODY_USER` (currently hard-wired to `nobody`) and - `NOBODY_GROUP` (set to either `nobody` or `nogroup` depending on what we - find in the /etc/group file). +- Made configure define `NOBODY_USER` (currently hard-wired to `nobody`) and + `NOBODY_GROUP` (set to either `nobody` or `nogroup` depending on what we + find in the /etc/group file). - - Added a test to the test suite, itemized.test, that tests the output of `-i` - (log-format w/%i) and some double-verbose messages. +- Added a test to the test suite, itemized.test, that tests the output of `-i` + (log-format w/%i) and some double-verbose messages. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.5 (1 Jun 2005) @@ -4301,179 +4301,179 @@ to develop and test fixes. ### OUTPUT CHANGES: - - Non-printable chars in filenames are now output using backslash-escaped - characters rather than '?'s. Any non-printable character is output using 3 - digits of octal (e.g. `\n` -> `\012`), and a backslash is now output as - `\\`. Rsync also uses your locale setting, which can make it treat fewer - high-bit characters as non-printable. +- Non-printable chars in filenames are now output using backslash-escaped + characters rather than '?'s. Any non-printable character is output using 3 + digits of octal (e.g. `\n` -> `\012`), and a backslash is now output as + `\\`. Rsync also uses your locale setting, which can make it treat fewer + high-bit characters as non-printable. - - If rsync received an empty file-list when pulling files, it would output a - `nothing to do` message and exit with a 0 (success) exit status, even if the - remote rsync returned an error (it did not do this under the same conditions - when pushing files). This was changed to make the pulling behavior the same - as the pushing behavior: we now do the normal end-of-run outputting - (depending on options) and exit with the appropriate exit status. +- If rsync received an empty file-list when pulling files, it would output a + `nothing to do` message and exit with a 0 (success) exit status, even if the + remote rsync returned an error (it did not do this under the same conditions + when pushing files). This was changed to make the pulling behavior the same + as the pushing behavior: we now do the normal end-of-run outputting + (depending on options) and exit with the appropriate exit status. ### BUG FIXES: - - A crash bug was fixed when a daemon had its `path` set to `/`, did not have - chroot enabled, and used some anchored excludes in the rsyncd.conf file. +- A crash bug was fixed when a daemon had its `path` set to `/`, did not have + chroot enabled, and used some anchored excludes in the rsyncd.conf file. - - Fixed a bug in the transfer of a single file when `-H` is specified (rsync - would either infinite loop or perhaps crash). +- Fixed a bug in the transfer of a single file when `-H` is specified (rsync + would either infinite loop or perhaps crash). - - Fixed a case where the generator might try (and fail) to tweak the - write-permissions of a read-only directory in list-only mode (this only - caused an annoying warning message). +- Fixed a case where the generator might try (and fail) to tweak the + write-permissions of a read-only directory in list-only mode (this only + caused an annoying warning message). - - If `--compare-dest` or `--link-dest` uses a locally-copied file as the basis - for an updated version, log this better when `--verbose` or `-i` is in - effect. +- If `--compare-dest` or `--link-dest` uses a locally-copied file as the basis + for an updated version, log this better when `--verbose` or `-i` is in + effect. - - Fixed the accidental disabling of `--backup` during the `--delete-after` - processing. +- Fixed the accidental disabling of `--backup` during the `--delete-after` + processing. - - Restored the ability to use the `--address` option in client mode (in - addition to its use in daemon mode). +- Restored the ability to use the `--address` option in client mode (in + addition to its use in daemon mode). - - Make sure that some temporary progress information from the delete - processing does not get left on the screen when it is followed by a newline. +- Make sure that some temporary progress information from the delete + processing does not get left on the screen when it is followed by a newline. - - When `--existing` skips a directory with extra verbosity, refer to it as a - `directory`, not a `file`. +- When `--existing` skips a directory with extra verbosity, refer to it as a + `directory`, not a `file`. - - When transferring a single file to a different-named file, any generator - messages that are source-file related no longer refer to the file by the - destination filename. +- When transferring a single file to a different-named file, any generator + messages that are source-file related no longer refer to the file by the + destination filename. - - Fixed a bug where hard-linking a group of files might fail if the generator - hasn't created a needed destination directory yet. +- Fixed a bug where hard-linking a group of files might fail if the generator + hasn't created a needed destination directory yet. - - Fixed a bug where a hard-linked group of files that is newly-linked to a - file in a `--link-dest` dir doesn't link the files from the rest of the - cluster. +- Fixed a bug where a hard-linked group of files that is newly-linked to a + file in a `--link-dest` dir doesn't link the files from the rest of the + cluster. - - When deleting files with the `--one-file-system` (`-x`) option set, rsync no - longer tries to remove files from inside a mount-point on the receiving - side. Also, we don't complain about being unable to remove the mount-point - dir. +- When deleting files with the `--one-file-system` (`-x`) option set, rsync no + longer tries to remove files from inside a mount-point on the receiving + side. Also, we don't complain about being unable to remove the mount-point + dir. - - Fixed a compatibility problem when using `--cvs-ignore` (`-C`) and sending - files to an older rsync without using `--delete`. +- Fixed a compatibility problem when using `--cvs-ignore` (`-C`) and sending + files to an older rsync without using `--delete`. - - Make sure that a `- !` or `+ !` include/exclude pattern does not trigger the - list-clearing action that is reserved for `!`. +- Make sure that a `- !` or `+ !` include/exclude pattern does not trigger the + list-clearing action that is reserved for `!`. - - Avoid a timeout in the generator when the sender/receiver aren't handling - the generator's checksum output quickly enough. +- Avoid a timeout in the generator when the sender/receiver aren't handling + the generator's checksum output quickly enough. - - Fixed the omission of some directories in the delete processing when - `--relative` (`-R`) was combined with a source path that had a trailing - slash. +- Fixed the omission of some directories in the delete processing when + `--relative` (`-R`) was combined with a source path that had a trailing + slash. - - Fixed a case where rsync would erroneously delete some files and then - re-transfer them when the options `--relative` (`-R`) and `--recursive` - (`-r`) were both enabled (along with `--delete`) and a source path had a - trailing slash. +- Fixed a case where rsync would erroneously delete some files and then + re-transfer them when the options `--relative` (`-R`) and `--recursive` + (`-r`) were both enabled (along with `--delete`) and a source path had a + trailing slash. - - Make sure that `--max-size` doesn't affect a device or a symlink. +- Make sure that `--max-size` doesn't affect a device or a symlink. - - Make sure that a system with a really small MAXPATHLEN does not cause the - buffers in `readfd_unbuffered()` to be too small to receive normal messages. - (This mainly affected Cygwin.) +- Make sure that a system with a really small MAXPATHLEN does not cause the + buffers in `readfd_unbuffered()` to be too small to receive normal messages. + (This mainly affected Cygwin.) - - If a source pathname ends with a filename of `..`, treat it as if `../` had - been specified (so that we don't copy files to the parent dir of the - destination). +- If a source pathname ends with a filename of `..`, treat it as if `../` had + been specified (so that we don't copy files to the parent dir of the + destination). - - If `--delete` is combined with a file-listing rsync command (i.e. no - transfer is happening), avoid outputting a warning that we couldn't delete - anything. +- If `--delete` is combined with a file-listing rsync command (i.e. no + transfer is happening), avoid outputting a warning that we couldn't delete + anything. - - If `--stats` is specified with `--delete-after`, ensure that all the - `deleting` messages are output before the statistics. +- If `--stats` is specified with `--delete-after`, ensure that all the + `deleting` messages are output before the statistics. - - Improved one `if` in the deletion code that was only checking errno for - ENOTEMPTY when it should have also been checking for EEXIST (for - compatibility with OS variations). +- Improved one `if` in the deletion code that was only checking errno for + ENOTEMPTY when it should have also been checking for EEXIST (for + compatibility with OS variations). ### ENHANCEMENTS: - - Added the `--only-write-batch=FILE` option that may be used (instead of - `--write-batch=FILE`) to create a batch file without doing any actual - updating of the destination. This allows you to divert all the file-updating - data away from a slow data link (as long as you are pushing the data to the - remote server when creating the batch). +- Added the `--only-write-batch=FILE` option that may be used (instead of + `--write-batch=FILE`) to create a batch file without doing any actual + updating of the destination. This allows you to divert all the file-updating + data away from a slow data link (as long as you are pushing the data to the + remote server when creating the batch). - - When the generator is taking a long time to fill up its output buffer (e.g. - if the transferred files are few, small, or missing), it now periodically - flushes the output buffer so that the sender/receiver can get started on the - files sooner rather than later. +- When the generator is taking a long time to fill up its output buffer (e.g. + if the transferred files are few, small, or missing), it now periodically + flushes the output buffer so that the sender/receiver can get started on the + files sooner rather than later. - - Improved the keep-alive code to handle a long silence between the sender and - the receiver that can occur when the sender is receiving the checksum data - for a large file. +- Improved the keep-alive code to handle a long silence between the sender and + the receiver that can occur when the sender is receiving the checksum data + for a large file. - - Improved the auth-errors that are logged by the daemon to include some - information on why the authorization failed: wrong user, password mismatch, - etc. (The client-visible message is unchanged!) +- Improved the auth-errors that are logged by the daemon to include some + information on why the authorization failed: wrong user, password mismatch, + etc. (The client-visible message is unchanged!) - - Improved the client's handling of an `@ERROR` from a daemon so that it does - not complain about an unexpectedly closed socket (since we really did expect - the socket to close). +- Improved the client's handling of an `@ERROR` from a daemon so that it does + not complain about an unexpectedly closed socket (since we really did expect + the socket to close). - - If the daemon can't open the log-file specified in rsyncd.conf, fall back to - using syslog and log an appropriate warning. This is better than what was - typically a totally silent (and fatal) failure (since a daemon is not - usually run with the `--no-detach` option that was necessary to see the - error on stderr). +- If the daemon can't open the log-file specified in rsyncd.conf, fall back to + using syslog and log an appropriate warning. This is better than what was + typically a totally silent (and fatal) failure (since a daemon is not + usually run with the `--no-detach` option that was necessary to see the + error on stderr). - - The manpages now consistently refer to an rsync daemon as a `daemon` - instead of a `server` (to distinguish it from the server process in a - non-daemon transfer). +- The manpages now consistently refer to an rsync daemon as a `daemon` + instead of a `server` (to distinguish it from the server process in a + non-daemon transfer). - - Made a small change to the rrsync script (restricted rsync -- in the support - dir) to make a read-only server reject all `--remove-*` options when sending - files (to future-proof it against the possibility of other similar options - being added at some point). +- Made a small change to the rrsync script (restricted rsync -- in the support + dir) to make a read-only server reject all `--remove-*` options when sending + files (to future-proof it against the possibility of other similar options + being added at some point). ### INTERNAL: - - Rsync now calls `setlocale(LC_CTYPE, "")`. This enables isprint() to better - discern which filename characters need to be escaped in messages (which - should result in fewer escaped characters in some locales). +- Rsync now calls `setlocale(LC_CTYPE, "")`. This enables isprint() to better + discern which filename characters need to be escaped in messages (which + should result in fewer escaped characters in some locales). - - Improved the naming of the log-file open/reopen/close functions. +- Improved the naming of the log-file open/reopen/close functions. - - Removed some protocol-compatibility code that was only needed to help - someone running a pre-release of 2.6.4. +- Removed some protocol-compatibility code that was only needed to help + someone running a pre-release of 2.6.4. ### BUILD CHANGES: - - Added configure option `--disable-locale` to disable any use of setlocale() - in the binary. +- Added configure option `--disable-locale` to disable any use of setlocale() + in the binary. - - Fixed a bug in the `SUPPORT{,_HARD}_LINKS` #defines which prevented rsync - from being built without symlink or hard-link support. +- Fixed a bug in the `SUPPORT{,_HARD}_LINKS` #defines which prevented rsync + from being built without symlink or hard-link support. - - Only #define `HAVE_REMSH` if it is going to be set to 1. +- Only #define `HAVE_REMSH` if it is going to be set to 1. - - Configure now disables the use of mkstemp() under HP-UX (since they refuse - to fix its broken handling of large files). +- Configure now disables the use of mkstemp() under HP-UX (since they refuse + to fix its broken handling of large files). - - Configure now explicitly checks for the lseek64() function so that the code - can use `HAVE_LSEEK64` instead of inferring lseek64()'s presence based on - the presence of the `off64_t` type. +- Configure now explicitly checks for the lseek64() function so that the code + can use `HAVE_LSEEK64` instead of inferring lseek64()'s presence based on + the presence of the `off64_t` type. - - Configure no longer mentions the change in the default remote-shell (from - rsh to ssh) that occurred for the 2.6.0 release. +- Configure no longer mentions the change in the default remote-shell (from + rsh to ssh) that occurred for the 2.6.0 release. - - Some minor enhancements to the test scripts. +- Some minor enhancements to the test scripts. - - Added a few new `*.diff` files to the patches dir, including a patch that - enables the optional copying of extended attributes. +- Added a few new `*.diff` files to the patches dir, including a patch that + enables the optional copying of extended attributes. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.4 (30 March 2005) @@ -4481,380 +4481,380 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 29. +- The protocol number was changed to 29. ### OUTPUT CHANGES: - - When rsync deletes a directory and outputs a verbose message about it, it - now appends a trailing slash to the name instead of (only sometimes) - outputting a preceding "directory " string. +- When rsync deletes a directory and outputs a verbose message about it, it + now appends a trailing slash to the name instead of (only sometimes) + outputting a preceding "directory " string. - - The `--stats` output will contain file-list time-statistics if both sides - are 2.6.4, or if the local side is 2.6.4 and the files are being pushed - (since the stats come from the sending side). (Requires protocol 29 for a - pull.) +- The `--stats` output will contain file-list time-statistics if both sides + are 2.6.4, or if the local side is 2.6.4 and the files are being pushed + (since the stats come from the sending side). (Requires protocol 29 for a + pull.) - - The `%o` (operation) log-format escape now has a third value (besides `send` - and `recv`): `del.` (with trailing dot to make it 4 chars). This changes - the way deletions are logged in the daemon's log file. +- The `%o` (operation) log-format escape now has a third value (besides `send` + and `recv`): `del.` (with trailing dot to make it 4 chars). This changes + the way deletions are logged in the daemon's log file. - - When the `--log-format` option is combined with `--verbose`, rsync now - avoids outputting the name of the file twice in most circumstances. As long - as the `--log-format` item does not refer to any post-transfer items (such - as %b or %c), the `--log-format` message is output prior to the transfer, so - `--verbose` is now the equivalent of a `--log-format` of '%n%L' (which - outputs the name and any link info). If the log output must occur after the - transfer to be complete, the only time the name is also output prior to the - transfer is when `--progress` was specified (so that the name will precede - the progress stats, and the full `--log-format` output will come after). +- When the `--log-format` option is combined with `--verbose`, rsync now + avoids outputting the name of the file twice in most circumstances. As long + as the `--log-format` item does not refer to any post-transfer items (such + as %b or %c), the `--log-format` message is output prior to the transfer, so + `--verbose` is now the equivalent of a `--log-format` of '%n%L' (which + outputs the name and any link info). If the log output must occur after the + transfer to be complete, the only time the name is also output prior to the + transfer is when `--progress` was specified (so that the name will precede + the progress stats, and the full `--log-format` output will come after). - - Non-printable characters in filenames are replaced with a '?' to avoid - corrupting the screen or generating empty lines in the output. +- Non-printable characters in filenames are replaced with a '?' to avoid + corrupting the screen or generating empty lines in the output. ### BUG FIXES: - - Restore the list-clearing behavior of `!` in a .cvsignore file (2.6.3 was - only treating it as a special token in an rsync include/exclude file). +- Restore the list-clearing behavior of `!` in a .cvsignore file (2.6.3 was + only treating it as a special token in an rsync include/exclude file). - - The combination of `--verbose` and `--dry-run` now mentions the full list of - changes that would be output without `--dry-run`. +- The combination of `--verbose` and `--dry-run` now mentions the full list of + changes that would be output without `--dry-run`. - - Avoid a mkdir warning when removing a directory in the destination that - already exists in the `--backup-dir`. +- Avoid a mkdir warning when removing a directory in the destination that + already exists in the `--backup-dir`. - - An OS that has a binary mode for its files (such as Cygwin) needed - `setmode(fd, O_BINARY)` called on the temp-file we opened with mkstemp(). - (Fix derived from Cygwin's 2.6.3 rsync package.) +- An OS that has a binary mode for its files (such as Cygwin) needed + `setmode(fd, O_BINARY)` called on the temp-file we opened with mkstemp(). + (Fix derived from Cygwin's 2.6.3 rsync package.) - - Fixed a potential hang when verbosity is high, the client side is the - sender, and the file-list is large. +- Fixed a potential hang when verbosity is high, the client side is the + sender, and the file-list is large. - - Fixed a potential protocol-corrupting bug where the generator could merge a - message from the receiver into the middle of a multiplexed packet of data if - only part of that data had been written out to the socket when the message - from the generator arrived. +- Fixed a potential protocol-corrupting bug where the generator could merge a + message from the receiver into the middle of a multiplexed packet of data if + only part of that data had been written out to the socket when the message + from the generator arrived. - - We now check if the OS doesn't support using mknod() for creating FIFOs and - sockets, and compile-in some compatibility code using mkfifo() and socket() - when necessary. +- We now check if the OS doesn't support using mknod() for creating FIFOs and + sockets, and compile-in some compatibility code using mkfifo() and socket() + when necessary. - - Fixed an off-by-one error in the handling of `--max-delete=N`. Also, if the - `--max-delete` limit is exceeded during a run, we now output a warning about - this at the end of the run and exit with a new error code (25). +- Fixed an off-by-one error in the handling of `--max-delete=N`. Also, if the + `--max-delete` limit is exceeded during a run, we now output a warning about + this at the end of the run and exit with a new error code (25). - - One place in the code wasn't checking if fork() failed. +- One place in the code wasn't checking if fork() failed. - - The `ignore nonreadable` daemon parameter used to erroneously affect - readable symlinks that pointed to a non-existent file. +- The `ignore nonreadable` daemon parameter used to erroneously affect + readable symlinks that pointed to a non-existent file. - - If the OS does not have lchown() and a chown() of a symlink will affect the - referent of a symlink (as it should), we no longer try to set the user and - group of a symlink. +- If the OS does not have lchown() and a chown() of a symlink will affect the + referent of a symlink (as it should), we no longer try to set the user and + group of a symlink. - - The generator now properly runs the hard-link loop and the dir-time - rewriting loop after we're sure that the redo phase is complete. +- The generator now properly runs the hard-link loop and the dir-time + rewriting loop after we're sure that the redo phase is complete. - - When `--backup` was specified with `--partial-dir=DIR`, where DIR is a - relative path, the backup code was erroneously trying to backup a file that - was put into the partial-dir. +- When `--backup` was specified with `--partial-dir=DIR`, where DIR is a + relative path, the backup code was erroneously trying to backup a file that + was put into the partial-dir. - - If a file gets resent in a single transfer and the `--backup` option is - enabled along with `--inplace`, rsync no longer performs a duplicate backup - (it used to overwrite the first backup with the failed file). +- If a file gets resent in a single transfer and the `--backup` option is + enabled along with `--inplace`, rsync no longer performs a duplicate backup + (it used to overwrite the first backup with the failed file). - - One call to `flush_write_file()` was not being checked for an error. +- One call to `flush_write_file()` was not being checked for an error. - - The `--no-relative` option was not being sent from the client to a server - sender. +- The `--no-relative` option was not being sent from the client to a server + sender. - - If an rsync daemon specified `dont compress = ...` for a file and the client - tried to specify `--compress`, the libz code was not handling a compression - level of 0 properly. This could cause a transfer failure if the block-size - for a file was large enough (e.g. rsync might have exited with an error for - large files). +- If an rsync daemon specified `dont compress = ...` for a file and the client + tried to specify `--compress`, the libz code was not handling a compression + level of 0 properly. This could cause a transfer failure if the block-size + for a file was large enough (e.g. rsync might have exited with an error for + large files). - - Fixed a bug that would sometimes surface when using `--compress` and sending - a file with a block-size larger than 64K (either manually specified, or - computed due to the file being really large). Prior versions of rsync would - sometimes fail to decompress the data properly, and thus the transferred - file would fail its verification. +- Fixed a bug that would sometimes surface when using `--compress` and sending + a file with a block-size larger than 64K (either manually specified, or + computed due to the file being really large). Prior versions of rsync would + sometimes fail to decompress the data properly, and thus the transferred + file would fail its verification. - - If a daemon can't open the specified log file (i.e. syslog is not being - used), die without crashing. We also output an error about the failure on - stderr (which will only be seen if `--no-detach` was specified) and exit - with a new error code (6). +- If a daemon can't open the specified log file (i.e. syslog is not being + used), die without crashing. We also output an error about the failure on + stderr (which will only be seen if `--no-detach` was specified) and exit + with a new error code (6). - - A local transfer no longer duplicates all its include/exclude options (since - the forked process already has a copy of the exclude list, there's no need - to send them a set of duplicates). +- A local transfer no longer duplicates all its include/exclude options (since + the forked process already has a copy of the exclude list, there's no need + to send them a set of duplicates). - - The output of the items that are being updated by the generator (dirs, - symlinks, devices) is now intermingled in the proper order with the output - from the items that the receiver is updating (regular files) when pulling. - This misordering was particularly bad when `--progress` was specified. - (Requires protocol 29.) +- The output of the items that are being updated by the generator (dirs, + symlinks, devices) is now intermingled in the proper order with the output + from the items that the receiver is updating (regular files) when pulling. + This misordering was particularly bad when `--progress` was specified. + (Requires protocol 29.) - - When `--timeout` is specified, lulls that occur in the transfer while the - generator is doing work that does not generate socket traffic (looking for - changed files, deleting files, doing directory-time touch-ups, etc.) will - cause a new keep-alive packet to be sent that should keep the transfer going - as long as the generator continues to make progress. (Requires protocol 29.) +- When `--timeout` is specified, lulls that occur in the transfer while the + generator is doing work that does not generate socket traffic (looking for + changed files, deleting files, doing directory-time touch-ups, etc.) will + cause a new keep-alive packet to be sent that should keep the transfer going + as long as the generator continues to make progress. (Requires protocol 29.) - - The stat size of a device is not added to the total file size of the items - in the transfer (the size might be undefined on some OSes). +- The stat size of a device is not added to the total file size of the items + in the transfer (the size might be undefined on some OSes). - - Fixed a problem with refused-option messages sometimes not making it back to - the client side when a remote `--files-from` was in effect and the daemon - was the receiver. +- Fixed a problem with refused-option messages sometimes not making it back to + the client side when a remote `--files-from` was in effect and the daemon + was the receiver. - - The `--compare-dest` option was not updating a file that differed in (the - preserved) attributes from the version in the compare-dest DIR. +- The `--compare-dest` option was not updating a file that differed in (the + preserved) attributes from the version in the compare-dest DIR. - - When rsync is copying files into a write-protected directory, fixed the - change-report output for the directory so that we don't report an identical - directory as changed. +- When rsync is copying files into a write-protected directory, fixed the + change-report output for the directory so that we don't report an identical + directory as changed. ### ENHANCEMENTS: - - Rsync now supports popt's option aliases, which means that you can use - /etc/popt and/or ~/.popt to create your own option aliases. - - - Added the `--delete-during` (`--del`) option which will delete files from - the receiving side incrementally as each directory in the transfer is being - processed. This makes it more efficient than the default, - before-the-transfer behavior, which is now also available as - `--delete-before` (and is still the default `--delete-WHEN` option that will - be chosen if `--delete` or `--delete-excluded` is specified without a - `--delete-WHEN` choice). All the `--del*` options infer `--delete`, so an - rsync daemon that refuses `delete` will still refuse to allow any - file-deleting options (including the new `--remove-sent-files` option). - - - All the `--delete-WHEN` options are now more memory efficient: Previously an - duplicate set of file-list objects was created on the receiving side for the - entire destination hierarchy. The new algorithm only creates one directory - of objects at a time (for files inside the transfer). - - - Added the `--copy-dest` option, which works like `--link-dest` except that - it locally copies identical files instead of hard-linking them. - - - Added support for specifying multiple `--compare-dest`, `--copy-dest`, or - `--link-dest` options, but only of a single type. (Promoted from the patches - dir and enhanced.) (Requires protocol 29.) - - - Added the `--max-size` option. (Promoted from the patches dir.) - - - The daemon-mode options are now separated from the normal rsync options so - that they can't be mixed together. This makes it impossible to start a - daemon that has improper default option values (which could cause problems - when a client connects, such as hanging or crashing). - - - The `--bwlimit` option may now be used in combination with `--daemon` to - specify both a default value for the daemon side and a value that cannot be - exceeded by a user-specified `--bwlimit` option. - - - Added the `port` parameter to the rsyncd.conf file. (Promoted from the - patches dir.) Also added `address`. The command-line options take precedence - over a config-file option, as expected. - - - In `_exit_cleanup()`: when we are exiting with a partially-received file, we - now flush any data in the write-cache before closing the partial file. - - - The `--inplace` support was enhanced to work with `--compare-dest`, - `--link-dest`, and (the new) `--copy-dest` options. (Requires protocol 29.) - - - Added the `--dirs` (`-d`) option for an easier way to copy directories - without recursion. Any directories that are encountered are created on the - destination. Specifying a directory with a trailing slash copies its - immediate contents to the destination. - - - The `--files-from` option now implies `--dirs` (`-d`). - - - Added the `--list-only` option, which is mainly a way for the client to put - the server into listing mode without needing to resort to any internal - option kluges (e.g. the age-old use of `-r --exclude='/*/*'` for a - non-recursive listing). This option is used automatically (behind the - scenes) when a modern rsync speaks to a modern daemon, but may also be - specified manually if you want to force the use of the `--list-only` option - over a remote-shell connection. - - - Added the `--omit-dir-times` (`-O`) option, which will avoid updating the - modified time for directories when `--times` was specified. This option will - avoid an extra pass through the file-list at the end of the transfer (to - tweak all the directory times), which may provide an appreciable speedup for - a really large transfer. (Promoted from the patches dir.) - - - Added the `--filter` (`-f`) option and its helper option, `-F`. Filter rules - are an extension to the existing include/exclude handling that also supports - nested filter files as well as per-directory filter files (like .cvsignore, - but with full filter-rule parsing). This new option was chosen in order to - ensure that all existing include/exclude processing remained 100% compatible - with older versions. Protocol 29 is needed for full filter-rule support, but - backward-compatible rules work with earlier protocol versions. (Promoted - from the patches dir and enhanced.) - - - Added the `--delay-updates` option that puts all updated files into a - temporary directory (by default `.~tmp~`, but settable via the - `--partial-dir=DIR` option) until the end of the transfer. This makes the - updates a little more atomic for a large transfer. - - - If rsync is put into the background, any output from `--progress` is - reduced. - - - Documented the `max verbosity` setting for rsyncd.conf. (This setting was - added a couple releases ago, but left undocumented.) - - - The sender and the generator now double-check the file-list index they are - given, and refuse to try to do a file transfer on a non-file index (since - that would indicate that something had gone very wrong). - - - Added the `--itemize-changes` (`-i`) option, which is a way to output a more - detailed list of what files changed and in what way. The effect is the same - as specifying a `--log-format` of `%i %n%L` (see both the rsync and - rsyncd.conf manpages). Works with `--dry-run` too. - - - Added the `--fuzzy` (`-y`) option, which attempts to find a basis file for a - file that is being created from scratch. The current algorithm only looks in - the destination directory for the created file, but it does attempt to find - a match based on size/mod-time (in case the file was renamed with no other - changes) as well as based on a fuzzy name-matching algorithm. This option - requires protocol 29 because it needs the new file-sorting order. (Promoted - from patches dir and enhanced.) (Requires protocol 29.) - - - Added the `--remove-sent-files` option, which lets you move files between - systems. - - - The hostname in HOST:PATH or HOST::PATH may now be an IPv6 literal enclosed - in '[' and ']' (e.g. `[::1]`). (We already allowed IPv6 literals in the - rsync://HOST:PORT/PATH format.) - - - When rsync recurses to build the file list, it no longer keeps open one or - more directory handles from the dir's parent dirs. - - - When building under windows, the default for `--daemon` is now to avoid - detaching, requiring the new `--detach` option to force rsync to detach. +- Rsync now supports popt's option aliases, which means that you can use + /etc/popt and/or ~/.popt to create your own option aliases. + +- Added the `--delete-during` (`--del`) option which will delete files from + the receiving side incrementally as each directory in the transfer is being + processed. This makes it more efficient than the default, + before-the-transfer behavior, which is now also available as + `--delete-before` (and is still the default `--delete-WHEN` option that will + be chosen if `--delete` or `--delete-excluded` is specified without a + `--delete-WHEN` choice). All the `--del*` options infer `--delete`, so an + rsync daemon that refuses `delete` will still refuse to allow any + file-deleting options (including the new `--remove-sent-files` option). + +- All the `--delete-WHEN` options are now more memory efficient: Previously an + duplicate set of file-list objects was created on the receiving side for the + entire destination hierarchy. The new algorithm only creates one directory + of objects at a time (for files inside the transfer). + +- Added the `--copy-dest` option, which works like `--link-dest` except that + it locally copies identical files instead of hard-linking them. + +- Added support for specifying multiple `--compare-dest`, `--copy-dest`, or + `--link-dest` options, but only of a single type. (Promoted from the patches + dir and enhanced.) (Requires protocol 29.) + +- Added the `--max-size` option. (Promoted from the patches dir.) + +- The daemon-mode options are now separated from the normal rsync options so + that they can't be mixed together. This makes it impossible to start a + daemon that has improper default option values (which could cause problems + when a client connects, such as hanging or crashing). + +- The `--bwlimit` option may now be used in combination with `--daemon` to + specify both a default value for the daemon side and a value that cannot be + exceeded by a user-specified `--bwlimit` option. + +- Added the `port` parameter to the rsyncd.conf file. (Promoted from the + patches dir.) Also added `address`. The command-line options take precedence + over a config-file option, as expected. + +- In `_exit_cleanup()`: when we are exiting with a partially-received file, we + now flush any data in the write-cache before closing the partial file. + +- The `--inplace` support was enhanced to work with `--compare-dest`, + `--link-dest`, and (the new) `--copy-dest` options. (Requires protocol 29.) + +- Added the `--dirs` (`-d`) option for an easier way to copy directories + without recursion. Any directories that are encountered are created on the + destination. Specifying a directory with a trailing slash copies its + immediate contents to the destination. + +- The `--files-from` option now implies `--dirs` (`-d`). + +- Added the `--list-only` option, which is mainly a way for the client to put + the server into listing mode without needing to resort to any internal + option kluges (e.g. the age-old use of `-r --exclude='/*/*'` for a + non-recursive listing). This option is used automatically (behind the + scenes) when a modern rsync speaks to a modern daemon, but may also be + specified manually if you want to force the use of the `--list-only` option + over a remote-shell connection. + +- Added the `--omit-dir-times` (`-O`) option, which will avoid updating the + modified time for directories when `--times` was specified. This option will + avoid an extra pass through the file-list at the end of the transfer (to + tweak all the directory times), which may provide an appreciable speedup for + a really large transfer. (Promoted from the patches dir.) + +- Added the `--filter` (`-f`) option and its helper option, `-F`. Filter rules + are an extension to the existing include/exclude handling that also supports + nested filter files as well as per-directory filter files (like .cvsignore, + but with full filter-rule parsing). This new option was chosen in order to + ensure that all existing include/exclude processing remained 100% compatible + with older versions. Protocol 29 is needed for full filter-rule support, but + backward-compatible rules work with earlier protocol versions. (Promoted + from the patches dir and enhanced.) + +- Added the `--delay-updates` option that puts all updated files into a + temporary directory (by default `.~tmp~`, but settable via the + `--partial-dir=DIR` option) until the end of the transfer. This makes the + updates a little more atomic for a large transfer. + +- If rsync is put into the background, any output from `--progress` is + reduced. + +- Documented the `max verbosity` setting for rsyncd.conf. (This setting was + added a couple releases ago, but left undocumented.) + +- The sender and the generator now double-check the file-list index they are + given, and refuse to try to do a file transfer on a non-file index (since + that would indicate that something had gone very wrong). + +- Added the `--itemize-changes` (`-i`) option, which is a way to output a more + detailed list of what files changed and in what way. The effect is the same + as specifying a `--log-format` of `%i %n%L` (see both the rsync and + rsyncd.conf manpages). Works with `--dry-run` too. + +- Added the `--fuzzy` (`-y`) option, which attempts to find a basis file for a + file that is being created from scratch. The current algorithm only looks in + the destination directory for the created file, but it does attempt to find + a match based on size/mod-time (in case the file was renamed with no other + changes) as well as based on a fuzzy name-matching algorithm. This option + requires protocol 29 because it needs the new file-sorting order. (Promoted + from patches dir and enhanced.) (Requires protocol 29.) + +- Added the `--remove-sent-files` option, which lets you move files between + systems. + +- The hostname in HOST:PATH or HOST::PATH may now be an IPv6 literal enclosed + in '[' and ']' (e.g. `[::1]`). (We already allowed IPv6 literals in the + rsync://HOST:PORT/PATH format.) + +- When rsync recurses to build the file list, it no longer keeps open one or + more directory handles from the dir's parent dirs. + +- When building under windows, the default for `--daemon` is now to avoid + detaching, requiring the new `--detach` option to force rsync to detach. - - The `--dry-run` option can now be combined with either `--write-batch` or - `--read-batch`, allowing you to run a do-nothing test command to see what - would happen without `--dry-run`. +- The `--dry-run` option can now be combined with either `--write-batch` or + `--read-batch`, allowing you to run a do-nothing test command to see what + would happen without `--dry-run`. - - The daemon's `read only` config item now sets an internal `read_only` - variable that makes extra sure that no write/delete calls on the read-only - side can succeed. +- The daemon's `read only` config item now sets an internal `read_only` + variable that makes extra sure that no write/delete calls on the read-only + side can succeed. - - The log-format % escapes can now have a numeric field width in between the % - and the escape letter (e.g. `%-40n %08p`). - - - Improved the option descriptions in the `--help` text. +- The log-format % escapes can now have a numeric field width in between the % + and the escape letter (e.g. `%-40n %08p`). + +- Improved the option descriptions in the `--help` text. ### SUPPORT FILES: - - Added atomic-rsync to the support dir: a perl script that will transfer some - files using rsync, and then move the updated files into place all at once at - the end of the transfer. Only works when pulling, and uses `--link-dest` and - a parallel hierarchy of files to effect its update. +- Added atomic-rsync to the support dir: a perl script that will transfer some + files using rsync, and then move the updated files into place all at once at + the end of the transfer. Only works when pulling, and uses `--link-dest` and + a parallel hierarchy of files to effect its update. - - Added mnt-excl to the support dir: a perl script that takes the /proc/mounts - file and translates it into a set of excludes that will exclude all mount - points (even mapped mounts to the same disk). The excludes are made relative - to the specified source dir and properly anchored. +- Added mnt-excl to the support dir: a perl script that takes the /proc/mounts + file and translates it into a set of excludes that will exclude all mount + points (even mapped mounts to the same disk). The excludes are made relative + to the specified source dir and properly anchored. - - Added savetransfer.c to the support dir: a C program that can make a copy of - all the data that flows over the wire. This lets you test for data - corruption (by saving the data on both the sending side and the receiving - side) and provides one way to debug a protocol error. +- Added savetransfer.c to the support dir: a C program that can make a copy of + all the data that flows over the wire. This lets you test for data + corruption (by saving the data on both the sending side and the receiving + side) and provides one way to debug a protocol error. - - Added rrsync to the support dir: this is an updated version of Joe Smith's - restricted rsync perl script. This helps to ensure that only certain rsync - commands can be run by an ssh invocation. +- Added rrsync to the support dir: this is an updated version of Joe Smith's + restricted rsync perl script. This helps to ensure that only certain rsync + commands can be run by an ssh invocation. ### INTERNAL: - - Added better checking of the checksum-header values that come over the - socket. +- Added better checking of the checksum-header values that come over the + socket. - - Merged a variety of file-deleting functions into a single function so that - it is easier to maintain. +- Merged a variety of file-deleting functions into a single function so that + it is easier to maintain. - - Improved the type of some variables (particularly blocksize vars) for - consistency and proper size. +- Improved the type of some variables (particularly blocksize vars) for + consistency and proper size. - - Got rid of the uint64 type (which we didn't need). +- Got rid of the uint64 type (which we didn't need). - - Use a slightly more compatible set of core #include directives. +- Use a slightly more compatible set of core #include directives. - - Defined int32 in a way that ensures that the build dies if we can't find a - variable with at least 32 bits. +- Defined int32 in a way that ensures that the build dies if we can't find a + variable with at least 32 bits. ### PROTOCOL DIFFERENCES FOR VERSION 29: - - A 16-bit flag-word is transmitted after every file-list index. This - indicates what is changing between the sender and the receiver. The - generator now transmits an index and a flag-word to indicate when dirs and - symlinks have changed (instead of producing a message), which makes the - outputting of the information more consistent and less prone to screen - corruption (because the local receiver/sender is now outputting all the - file-change info messages). - - - If a file is being hard-linked, the `ITEM_XNAME_FOLLOWS` bit is enabled in - the flag-word and the name of the file that was linked immediately follows - in vstring format (see below). - - - If a file is being transferred with an alternate-basis file, the - `ITEM_BASIS_TYPE_FOLLOWS` bit is enabled in the flag-word and a single byte - follows, indicating what type of basis file was chosen. If that indicates - that a fuzzy-match was selected, the `ITEM_XNAME_FOLLOWS` bit is set in the - flag-word and the name of the match in vstring format follows the basis - byte. A vstring is a variable length string that has its size written prior - to the string, and no terminating null. If the string is from 1-127 bytes, - the length is a single byte. If it is from 128-32767 bytes, the length is - written as ((len >> 8) | 0x80) followed by (len % 0x100). - - - The sending of exclude names is done using filter-rule syntax. This means - that all names have a prefixed rule indicator, even excludes (which used to - be sent as a bare pattern, when possible). The `-C` option will include the - per-dir .cvsignore merge file in the list of filter rules so it is - positioned correctly (unlike in some older transfer scenarios). - - - Rsync sorts the filename list in a different way: it sorts the subdir names - after the non-subdir names for each dir's contents, and it always puts a - dir's contents immediately after the dir's name in the list. (Previously an - item named `foo.txt` would sort in between directory `foo/` and `foo/bar`.) - - - When talking to a protocol 29 rsync daemon, a list-only request is able to - note this before the options are sent over the wire and the new - `--list-only` option is included in the options. - - - When the `--stats` bytes are sent over the wire (or stored in a batch), they - now include two elapsed-time values: one for how long it took to build the - file-list, and one for how long it took to send it over the wire (each - expressed in thousandths of a second). - - - When `--delete-excluded` is specified with some filter rules (AKA excludes), - a client sender will now initiate a send of the rules to the receiver (older - protocols used to omit the sending of excludes in this situation since there - were no receiver-specific rules that survived `--delete-excluded` back - then). Note that, as with all the filter-list sending, only items that are - significant to the other side will actually be sent over the wire, so the - filter-rule list that is sent in this scenario is often empty. - - - An index equal to the file-list count is sent as a keep-alive packet from - the generator to the sender, which then forwards it on to the receiver. This - normally invalid index is only a valid keep-alive packet if the 16-bit - flag-word that follows it contains a single bit (`ITEM_IS_NEW`, which is - normally an illegal flag to appear alone). - - - A protocol-29 batch file includes a bit for the setting of the `--dirs` - option and for the setting of the `--compress` option. Also, the shell - script created by `--write-batch` will use the `--filter` option instead of - `--exclude-from` to capture any filter rules. +- A 16-bit flag-word is transmitted after every file-list index. This + indicates what is changing between the sender and the receiver. The + generator now transmits an index and a flag-word to indicate when dirs and + symlinks have changed (instead of producing a message), which makes the + outputting of the information more consistent and less prone to screen + corruption (because the local receiver/sender is now outputting all the + file-change info messages). + +- If a file is being hard-linked, the `ITEM_XNAME_FOLLOWS` bit is enabled in + the flag-word and the name of the file that was linked immediately follows + in vstring format (see below). + +- If a file is being transferred with an alternate-basis file, the + `ITEM_BASIS_TYPE_FOLLOWS` bit is enabled in the flag-word and a single byte + follows, indicating what type of basis file was chosen. If that indicates + that a fuzzy-match was selected, the `ITEM_XNAME_FOLLOWS` bit is set in the + flag-word and the name of the match in vstring format follows the basis + byte. A vstring is a variable length string that has its size written prior + to the string, and no terminating null. If the string is from 1-127 bytes, + the length is a single byte. If it is from 128-32767 bytes, the length is + written as ((len >> 8) | 0x80) followed by (len % 0x100). + +- The sending of exclude names is done using filter-rule syntax. This means + that all names have a prefixed rule indicator, even excludes (which used to + be sent as a bare pattern, when possible). The `-C` option will include the + per-dir .cvsignore merge file in the list of filter rules so it is + positioned correctly (unlike in some older transfer scenarios). + +- Rsync sorts the filename list in a different way: it sorts the subdir names + after the non-subdir names for each dir's contents, and it always puts a + dir's contents immediately after the dir's name in the list. (Previously an + item named `foo.txt` would sort in between directory `foo/` and `foo/bar`.) + +- When talking to a protocol 29 rsync daemon, a list-only request is able to + note this before the options are sent over the wire and the new + `--list-only` option is included in the options. + +- When the `--stats` bytes are sent over the wire (or stored in a batch), they + now include two elapsed-time values: one for how long it took to build the + file-list, and one for how long it took to send it over the wire (each + expressed in thousandths of a second). + +- When `--delete-excluded` is specified with some filter rules (AKA excludes), + a client sender will now initiate a send of the rules to the receiver (older + protocols used to omit the sending of excludes in this situation since there + were no receiver-specific rules that survived `--delete-excluded` back + then). Note that, as with all the filter-list sending, only items that are + significant to the other side will actually be sent over the wire, so the + filter-rule list that is sent in this scenario is often empty. + +- An index equal to the file-list count is sent as a keep-alive packet from + the generator to the sender, which then forwards it on to the receiver. This + normally invalid index is only a valid keep-alive packet if the 16-bit + flag-word that follows it contains a single bit (`ITEM_IS_NEW`, which is + normally an illegal flag to appear alone). + +- A protocol-29 batch file includes a bit for the setting of the `--dirs` + option and for the setting of the `--compress` option. Also, the shell + script created by `--write-batch` will use the `--filter` option instead of + `--exclude-from` to capture any filter rules. ### BUILD CHANGES: - - Handle an operating system that use mkdev() in place of makedev(). +- Handle an operating system that use mkdev() in place of makedev(). - - Improved configure to better handle cross-compiling. +- Improved configure to better handle cross-compiling. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.3 (30 Sep 2004) @@ -4862,242 +4862,242 @@ to develop and test fixes. ### SECURITY FIXES: - - A bug in the `sanitize_path` routine (which affects a non-chrooted rsync - daemon) could allow a user to craft a pathname that would get transformed - into an absolute path for certain options (but not for file-transfer names). - If you're running an rsync daemon with chroot disabled, **please upgrade**, - ESPECIALLY if the user privs you run rsync under is anything above `nobody`. +- A bug in the `sanitize_path` routine (which affects a non-chrooted rsync + daemon) could allow a user to craft a pathname that would get transformed + into an absolute path for certain options (but not for file-transfer names). + If you're running an rsync daemon with chroot disabled, **please upgrade**, + ESPECIALLY if the user privs you run rsync under is anything above `nobody`. - OUTPUT CHANGES (ATTN: those using a script to parse the verbose output): + OUTPUT CHANGES (ATTN: those using a script to parse the verbose output): - - Please note that the 2-line footer (output when verbose) now uses the term - `sent` instead of `wrote` and `received` instead of `read`. If you are not - parsing the numeric values out of this footer, a script would be better off - using the empty line prior to the footer as the indicator that the verbose - output is over. +- Please note that the 2-line footer (output when verbose) now uses the term + `sent` instead of `wrote` and `received` instead of `read`. If you are not + parsing the numeric values out of this footer, a script would be better off + using the empty line prior to the footer as the indicator that the verbose + output is over. - - The output from the `--stats` option was similarly affected to change - `written` to `sent` and `read` to `received`. +- The output from the `--stats` option was similarly affected to change + `written` to `sent` and `read` to `received`. - - Rsync ensures that a filename that contains a newline gets mentioned with - each newline transformed into a question mark (which prevents a filename - from causing an empty line to be output). +- Rsync ensures that a filename that contains a newline gets mentioned with + each newline transformed into a question mark (which prevents a filename + from causing an empty line to be output). - - The `backed up ...` message that is output when at least 2 `--verbose` - options are specified is now the same both with and without the - `--backup-dir` option. +- The `backed up ...` message that is output when at least 2 `--verbose` + options are specified is now the same both with and without the + `--backup-dir` option. ### BUG FIXES: - - Fixed a crash bug that might appear when `--delete` was used and multiple - source directories were specified. +- Fixed a crash bug that might appear when `--delete` was used and multiple + source directories were specified. - - Fixed a 32-bit truncation of the file length when generating the checksums. +- Fixed a 32-bit truncation of the file length when generating the checksums. - - The `--backup` code no longer attempts to create some directories over and - over again (generating warnings along the way). +- The `--backup` code no longer attempts to create some directories over and + over again (generating warnings along the way). - - Fixed a bug in the reading of the secrets file (by the daemon) and the - password file (by the client): the files no longer need to be terminated by - a newline for their content to be read in. +- Fixed a bug in the reading of the secrets file (by the daemon) and the + password file (by the client): the files no longer need to be terminated by + a newline for their content to be read in. - - If a file has a read error on the sending side or the reconstructed data - doesn't match the expected checksum (perhaps due to the basis file changing - during the transfer), the receiver will no longer retain the resulting file - unless the `--partial` option was specified. (Note: for the read-error - detection to work, neither side can be older than 2.6.3 -- older receivers - will always retain the file, and older senders don't tell the receiver that - the file had a read error.) +- If a file has a read error on the sending side or the reconstructed data + doesn't match the expected checksum (perhaps due to the basis file changing + during the transfer), the receiver will no longer retain the resulting file + unless the `--partial` option was specified. (Note: for the read-error + detection to work, neither side can be older than 2.6.3 -- older receivers + will always retain the file, and older senders don't tell the receiver that + the file had a read error.) - - If a file gets resent in a single transfer and the `--backup` option is - enabled, rsync no longer performs a duplicate backup (it used to overwrite - the original file in the backup area). +- If a file gets resent in a single transfer and the `--backup` option is + enabled, rsync no longer performs a duplicate backup (it used to overwrite + the original file in the backup area). - - Files specified in the daemon's `exclude` or `exclude from` config items are - now excluded from being uploaded (assuming that the module allows uploading - at all) in addition to the old download exclusion. +- Files specified in the daemon's `exclude` or `exclude from` config items are + now excluded from being uploaded (assuming that the module allows uploading + at all) in addition to the old download exclusion. - - Got rid of a potential hang in the receiver when near the end of a phase. +- Got rid of a potential hang in the receiver when near the end of a phase. - - When using `--backup` without a `--backup-dir`, rsync no longer preserves - the modify time on directories. This avoids confusing NFS. +- When using `--backup` without a `--backup-dir`, rsync no longer preserves + the modify time on directories. This avoids confusing NFS. - - When `--copy-links` (`-L`) is specified, we now output a separate error for - a symlink that has no referent instead of claiming that a file `vanished`. +- When `--copy-links` (`-L`) is specified, we now output a separate error for + a symlink that has no referent instead of claiming that a file `vanished`. - - The `--copy-links` (`-L`) option no longer has the side-effect of telling - the receiving side to follow symlinks. See the `--keep-dirlinks` option - (mentioned below) for a way to specify that behavior. +- The `--copy-links` (`-L`) option no longer has the side-effect of telling + the receiving side to follow symlinks. See the `--keep-dirlinks` option + (mentioned below) for a way to specify that behavior. - - Error messages from the daemon server's option-parsing (such as refused - options) are now successfully transferred back to the client (the server - used to fail to send the message because the socket wasn't in the right - state for the message to get through). +- Error messages from the daemon server's option-parsing (such as refused + options) are now successfully transferred back to the client (the server + used to fail to send the message because the socket wasn't in the right + state for the message to get through). - - Most transfer errors that occur during a daemon transfer are now returned to - the user in addition to being logged (some messages are intended to be - daemon-only and are not affected by this). +- Most transfer errors that occur during a daemon transfer are now returned to + the user in addition to being logged (some messages are intended to be + daemon-only and are not affected by this). - - Fixed a bug in the daemon authentication code when using one of the - batch-processing options. +- Fixed a bug in the daemon authentication code when using one of the + batch-processing options. - - We try to work around some buggy IPv6 implementations that fail to implement - `IPV6_V6ONLY`. This should fix the `address in use` error that some daemons - get when running on an OS with a buggy IPv6 implementation. Also, if the new - code gets this error, we might suggest that the user specify `--ipv4` or - `--ipv6` (if we think it will help). +- We try to work around some buggy IPv6 implementations that fail to implement + `IPV6_V6ONLY`. This should fix the `address in use` error that some daemons + get when running on an OS with a buggy IPv6 implementation. Also, if the new + code gets this error, we might suggest that the user specify `--ipv4` or + `--ipv6` (if we think it will help). - - When the remote rsync dies, make a better effort to recover any error - messages it may have sent before dying (the local rsync used to just die - with a socket-write error). +- When the remote rsync dies, make a better effort to recover any error + messages it may have sent before dying (the local rsync used to just die + with a socket-write error). - - When using `--delete` and a `--backup-dir` that contains files that are - hard-linked to their destination equivalents, rsync now makes sure that - removed files really get removed (avoids a really weird rename() behavior). +- When using `--delete` and a `--backup-dir` that contains files that are + hard-linked to their destination equivalents, rsync now makes sure that + removed files really get removed (avoids a really weird rename() behavior). - - Avoid a bogus run-time complaint about a lack of 64-bit integers when the - int64 type is defined as an `off_t` and it actually has 64-bits. +- Avoid a bogus run-time complaint about a lack of 64-bit integers when the + int64 type is defined as an `off_t` and it actually has 64-bits. - - Added a configure check for open64() without mkstemp64() so that we can - avoid using mkstemp() when such a combination is encountered. This bypasses - a problem writing out large temp files on OSes such as AIX and HP-UX. +- Added a configure check for open64() without mkstemp64() so that we can + avoid using mkstemp() when such a combination is encountered. This bypasses + a problem writing out large temp files on OSes such as AIX and HP-UX. - - Fixed an age-old crash problem with `--read-batch` on a local copy (rsync - was improperly assuming `--whole-file` for the local copy). +- Fixed an age-old crash problem with `--read-batch` on a local copy (rsync + was improperly assuming `--whole-file` for the local copy). - - When `--dry-run` (`-n`) is used and the destination directory does not - exist, rsync now produces a correct report of files that would be sent - instead of dying with a chdir() error. +- When `--dry-run` (`-n`) is used and the destination directory does not + exist, rsync now produces a correct report of files that would be sent + instead of dying with a chdir() error. - - Fixed a bug that could cause a slow-to-connect rsync daemon to die with an - error instead of waiting for the connection to finish. +- Fixed a bug that could cause a slow-to-connect rsync daemon to die with an + error instead of waiting for the connection to finish. - - Fixed an ssh interaction that could cause output to be lost when the user - chose to combine the output of rsync's stdout and stderr (e.g. using the - `2>&1`). +- Fixed an ssh interaction that could cause output to be lost when the user + chose to combine the output of rsync's stdout and stderr (e.g. using the + `2>&1`). - - Fixed an option-parsing bug when `--files-from` got passed to a daemon. +- Fixed an option-parsing bug when `--files-from` got passed to a daemon. ### ENHANCEMENTS: - - Added the `--partial-dir=DIR` option that lets you specify where to - (temporarily) put a partially transferred file (instead of overwriting the - destination file). E.g. `--partial-dir=.rsync-partial` Also added support - for the `RSYNC_PARTIAL_DIR` environment variable that, when found, - transforms a regular `--partial` option (such as the convenient `-P` option) - into one that also specifies a directory. +- Added the `--partial-dir=DIR` option that lets you specify where to + (temporarily) put a partially transferred file (instead of overwriting the + destination file). E.g. `--partial-dir=.rsync-partial` Also added support + for the `RSYNC_PARTIAL_DIR` environment variable that, when found, + transforms a regular `--partial` option (such as the convenient `-P` option) + into one that also specifies a directory. - - Added `--keep-dirlinks` (`-K`), which allows you to symlink a directory onto - another partition on the receiving side and have rsync treat it as matching - a normal directory from the sender. +- Added `--keep-dirlinks` (`-K`), which allows you to symlink a directory onto + another partition on the receiving side and have rsync treat it as matching + a normal directory from the sender. - - Added the `--inplace` option that tells rsync to write each destination file - without using a temporary file. The matching of existing data in the - destination file can be severely limited by this, but there are also cases - where this is more efficient (such as appending data). Use only when needed - (see the manpage for more details). +- Added the `--inplace` option that tells rsync to write each destination file + without using a temporary file. The matching of existing data in the + destination file can be severely limited by this, but there are also cases + where this is more efficient (such as appending data). Use only when needed + (see the manpage for more details). - - Added the `write only` option for the daemon's config file. +- Added the `write only` option for the daemon's config file. - - Added long-option names for `-4` and `-6` (namely `--ipv4` and `--ipv6`) and - documented all these options in the manpage. +- Added long-option names for `-4` and `-6` (namely `--ipv4` and `--ipv6`) and + documented all these options in the manpage. - - Improved the handling of the `--bwlimit` option so that it's less bursty, - more accurate, and works properly over a larger range of values. +- Improved the handling of the `--bwlimit` option so that it's less bursty, + more accurate, and works properly over a larger range of values. - - The rsync daemon-over-ssh code now looks for `SSH_CONNECTION` and - `SSH2_CLIENT` in addition to `SSH_CLIENT` to figure out the IP address. +- The rsync daemon-over-ssh code now looks for `SSH_CONNECTION` and + `SSH2_CLIENT` in addition to `SSH_CLIENT` to figure out the IP address. - - Added the `--checksum-seed=N` option for advanced users. +- Added the `--checksum-seed=N` option for advanced users. - - Batch writing/reading has a brand-new implementation that is simpler, fixes - a few weird problems with the old code (such as no longer sprinkling the - batch files into different dirs or even onto different systems), and is much - less intrusive into the code (making it easier to maintain for the future). - The new code generates just one data file instead of three, which makes it - possible to read the batch on stdin via a remote shell. Also, the old - requirement of forcing the same fixed checksum-seed for all batch processing - has been removed. +- Batch writing/reading has a brand-new implementation that is simpler, fixes + a few weird problems with the old code (such as no longer sprinkling the + batch files into different dirs or even onto different systems), and is much + less intrusive into the code (making it easier to maintain for the future). + The new code generates just one data file instead of three, which makes it + possible to read the batch on stdin via a remote shell. Also, the old + requirement of forcing the same fixed checksum-seed for all batch processing + has been removed. - - If an rsync daemon has a module set with `list = no` (which hides its - presence in the list of available modules), a user that fails to - authenticate gets the same `unknown module` error that they would get if the - module were actually unknown (while still logging the real error to the - daemon's log file). This prevents fishing for module names. +- If an rsync daemon has a module set with `list = no` (which hides its + presence in the list of available modules), a user that fails to + authenticate gets the same `unknown module` error that they would get if the + module were actually unknown (while still logging the real error to the + daemon's log file). This prevents fishing for module names. - - The daemon's `refuse options` config item now allows you to match option - names using wildcards and/or the single-letter option names. +- The daemon's `refuse options` config item now allows you to match option + names using wildcards and/or the single-letter option names. - - Each transferred file now gets its permissions and modified-time updated - before the temp-file gets moved into place. Previously, the finished file - would have a very brief window where its permissions disallowed all group - and world access. +- Each transferred file now gets its permissions and modified-time updated + before the temp-file gets moved into place. Previously, the finished file + would have a very brief window where its permissions disallowed all group + and world access. - - Added the ability to parse a literal IPv6 address in an `rsync:` URL (e.g. - rsync://[2001:638:500:101::21]:873/module/dir). +- Added the ability to parse a literal IPv6 address in an `rsync:` URL (e.g. + rsync://\[2001:638:500:101::21\]:873/module/dir). - - The daemon's wildcard expanding code can now handle more than 1000 filenames - (it's now limited by memory instead of having a hard-wired limit). +- The daemon's wildcard expanding code can now handle more than 1000 filenames + (it's now limited by memory instead of having a hard-wired limit). ### INTERNAL: - - Some cleanup in the exclude code has saved some per-exclude memory and made - the code easier to maintain. +- Some cleanup in the exclude code has saved some per-exclude memory and made + the code easier to maintain. - - Improved the argv-overflow checking for a remote command that has a lot of - args. +- Improved the argv-overflow checking for a remote command that has a lot of + args. - - Use rsyserr() in the various places that were still calling rprintf() with - strerror() as an arg. +- Use rsyserr() in the various places that were still calling rprintf() with + strerror() as an arg. - - If an rsync daemon is listening on multiple sockets (to handle both IPv4 and - IPv6 to a single port), we now close all the unneeded file handles after we - accept a connection (we used to close just one of them). +- If an rsync daemon is listening on multiple sockets (to handle both IPv4 and + IPv6 to a single port), we now close all the unneeded file handles after we + accept a connection (we used to close just one of them). - - Optimized the handling of larger block sizes (rsync used to slow to a crawl - if the block size got too large). +- Optimized the handling of larger block sizes (rsync used to slow to a crawl + if the block size got too large). - - Optimized away a loop in `hash_search()`. +- Optimized away a loop in `hash_search()`. - - Some improvements to the `sanitize_path()` and `clean_fname()` functions - makes them more efficient and produce better results (while still being - compatible with the file-name cleaning that gets done on both sides when - sending the file-list). +- Some improvements to the `sanitize_path()` and `clean_fname()` functions + makes them more efficient and produce better results (while still being + compatible with the file-name cleaning that gets done on both sides when + sending the file-list). - - Got rid of `alloc_sanitize_path()` after adding a destination-buffer arg to - `sanitize_path()` made it possible to put all the former's functionality - into the latter. +- Got rid of `alloc_sanitize_path()` after adding a destination-buffer arg to + `sanitize_path()` made it possible to put all the former's functionality + into the latter. - - The file-list that is output when at least 4 verbose options are specified - reports the uid value on the sender even when rsync is not running as root - (since we might be sending to a root receiver). +- The file-list that is output when at least 4 verbose options are specified + reports the uid value on the sender even when rsync is not running as root + (since we might be sending to a root receiver). ### BUILD CHANGES: - - Added a `gen` target to rebuild most of the generated files, including - configure, config.h.in, the manpages, and proto.h. +- Added a `gen` target to rebuild most of the generated files, including + configure, config.h.in, the manpages, and proto.h. - - If `make proto` doesn't find some changes in the prototypes, the proto.h - file is left untouched (its time-stamp used to always be updated). +- If `make proto` doesn't find some changes in the prototypes, the proto.h + file is left untouched (its time-stamp used to always be updated). - - The variable `$STRIP` (that is optionally set by the install-strip target's - rule) was changed to `$INSTALL_STRIP` because some systems have `$STRIP` - already set in the environment. +- The variable `$STRIP` (that is optionally set by the install-strip target's + rule) was changed to `$INSTALL_STRIP` because some systems have `$STRIP` + already set in the environment. - - Fixed a build problem when `SUPPORT_HARD_LINKS` isn't defined. +- Fixed a build problem when `SUPPORT_HARD_LINKS` isn't defined. - - When cross-compiling, the gettimeofday() function is now assumed to be a - modern version that takes two-args (since we can't test it). +- When cross-compiling, the gettimeofday() function is now assumed to be a + modern version that takes two-args (since we can't test it). ### DEVELOPER RELATED: - - The scripts in the testsuite dir were cleaned up a bit and a few new tests - added. +- The scripts in the testsuite dir were cleaned up a bit and a few new tests + added. - - Some new diffs were added to the patches dir, and some accepted ones were - removed. +- Some new diffs were added to the patches dir, and some accepted ones were + removed. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.2 (30 Apr 2004) @@ -5105,40 +5105,40 @@ to develop and test fixes. ### BUG FIXES: - - Fixed a major bug in the sorting of the filenames when `--relative` is used - for some sources (just sources such as `/` and `/*` were affected). This fix - ensures that we ask for the right file-list item when requesting changes - from the sender. +- Fixed a major bug in the sorting of the filenames when `--relative` is used + for some sources (just sources such as `/` and `/*` were affected). This fix + ensures that we ask for the right file-list item when requesting changes + from the sender. - - Rsync now checks the return value of the close() function to better report - disk-full problems on an NFS file system. +- Rsync now checks the return value of the close() function to better report + disk-full problems on an NFS file system. - - Restored the old daemon-server behavior of logging error messages rather - than returning them to the user. (A better long-term fix will be sought in - the future.) +- Restored the old daemon-server behavior of logging error messages rather + than returning them to the user. (A better long-term fix will be sought in + the future.) - - An obscure uninitialized-variable bug was fixed in the uid/gid code. (This - bug probably had no ill effects.) +- An obscure uninitialized-variable bug was fixed in the uid/gid code. (This + bug probably had no ill effects.) ### BUILD CHANGES: - - Got rid of the configure check for sys/sysctl.h (it wasn't used and was - causing a problem on some systems). Also improved the - broken-largefile-locking test to try to avoid failure due to an NFS - build-dir. +- Got rid of the configure check for sys/sysctl.h (it wasn't used and was + causing a problem on some systems). Also improved the + broken-largefile-locking test to try to avoid failure due to an NFS + build-dir. - - Fixed a compile problem on systems that don't define `AI_NUMERICHOST`. +- Fixed a compile problem on systems that don't define `AI_NUMERICHOST`. - - Fixed a compile problem in the popt source for compilers that don't support - `__attribute__`. +- Fixed a compile problem in the popt source for compilers that don't support + `__attribute__`. ### DEVELOPER RELATED: - - Improved the testsuite's `merge` test to work on OSF1. +- Improved the testsuite's `merge` test to work on OSF1. - - Two new diffs were added to the patches dir. +- Two new diffs were added to the patches dir. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.1 (26 Apr 2004) @@ -5146,190 +5146,190 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 28. +- The protocol number was changed to 28. ### SECURITY FIXES: - - Paths sent to an rsync daemon are more thoroughly sanitized when chroot is - not used. If you're running a non-read-only rsync daemon with chroot - disabled, **please upgrade**, ESPECIALLY if the user privs you run rsync - under is anything above `nobody`. +- Paths sent to an rsync daemon are more thoroughly sanitized when chroot is + not used. If you're running a non-read-only rsync daemon with chroot + disabled, **please upgrade**, ESPECIALLY if the user privs you run rsync + under is anything above `nobody`. ### ENHANCEMENTS: - - Lower memory use, more optimal transfer of data over the socket, and lower - CPU usage (see the INTERNAL section for details). +- Lower memory use, more optimal transfer of data over the socket, and lower + CPU usage (see the INTERNAL section for details). - - The `RSYNC_PROXY` environment variable can now contain a `USER:PASS@` prefix - before the `HOST:PORT` information. (Bardur Arantsson) +- The `RSYNC_PROXY` environment variable can now contain a `USER:PASS@` prefix + before the `HOST:PORT` information. (Bardur Arantsson) - - The `--progress` output now mentions how far along in the transfer we are, - including both a count of files transferred and a percentage of the total - file-count that we've processed. It also shows better - current-rate-of-transfer and remaining-transfer-time values. +- The `--progress` output now mentions how far along in the transfer we are, + including both a count of files transferred and a percentage of the total + file-count that we've processed. It also shows better + current-rate-of-transfer and remaining-transfer-time values. - - Documentation changes now attempt to describe some often misunderstood - features more clearly. +- Documentation changes now attempt to describe some often misunderstood + features more clearly. ### BUG FIXES: - - When `-x` (`--one-file-system`) is combined with `-L` (`--copy-links`) or - `--copy-unsafe-links,` no symlinked files are skipped, even if the referent - file is on a different filesystem. +- When `-x` (`--one-file-system`) is combined with `-L` (`--copy-links`) or + `--copy-unsafe-links,` no symlinked files are skipped, even if the referent + file is on a different filesystem. - - The `--link-dest` code now works properly for a non-root user when (1) the - UIDs of the source and destination differ and `-o` was specified, or (2) - when the group of the source can't be used on the destination and `-g` was - specified. +- The `--link-dest` code now works properly for a non-root user when (1) the + UIDs of the source and destination differ and `-o` was specified, or (2) + when the group of the source can't be used on the destination and `-g` was + specified. - - Fixed a bug in the handling of `-H` (hard-links) that might cause the - expanded PATH/NAME value of the current item to get overwritten (due to an - expanded-name caching bug). +- Fixed a bug in the handling of `-H` (hard-links) that might cause the + expanded PATH/NAME value of the current item to get overwritten (due to an + expanded-name caching bug). - - We now reset the `new data has been sent` flag at the start of each file we - send. This makes sure that an interrupted transfer with the `--partial` - option set doesn't keep a shorter temp file than the current basis file when - no new data has been transferred over the wire for that file. +- We now reset the `new data has been sent` flag at the start of each file we + send. This makes sure that an interrupted transfer with the `--partial` + option set doesn't keep a shorter temp file than the current basis file when + no new data has been transferred over the wire for that file. - - Fixed a byte-order problem in `--batch-mode` on big-endian machines. (Jay - Fenlason) +- Fixed a byte-order problem in `--batch-mode` on big-endian machines. (Jay + Fenlason) - - When using `--cvs-exclude`, the exclude items we get from a per-directory's - .cvsignore file once again only affect that one directory (not all following - directories too). The items are also now properly word-split and parsed - without any +/- prefix parsing. +- When using `--cvs-exclude`, the exclude items we get from a per-directory's + .cvsignore file once again only affect that one directory (not all following + directories too). The items are also now properly word-split and parsed + without any +/- prefix parsing. - - When specifying the USER@HOST: prefix for a file, the USER part can now - contain an '@', if needed (i.e. the last '@' is used to find the HOST, not - the first). +- When specifying the USER@HOST: prefix for a file, the USER part can now + contain an '@', if needed (i.e. the last '@' is used to find the HOST, not + the first). - - Fixed some bugs in the handling of group IDs for non-root users: (1) It - properly handles a group that the sender didn't have a name for (it would - previously skip changing the group on any files in that group). (2) If - `--numeric-ids` is used, rsync no longer attempts to set groups that the - user doesn't have the permission to set. +- Fixed some bugs in the handling of group IDs for non-root users: (1) It + properly handles a group that the sender didn't have a name for (it would + previously skip changing the group on any files in that group). (2) If + `--numeric-ids` is used, rsync no longer attempts to set groups that the + user doesn't have the permission to set. - - Fixed the `refuse options` setting in the rsyncd.conf file. +- Fixed the `refuse options` setting in the rsyncd.conf file. - - Improved the `-x` (`--one-file-system`) flag's handling of any mount-point - directories we encounter. It is both more optimal (in that it no longer does - a useless scan of the contents of the mount-point dirs) and also fixes a - bug where a remapped mount of the original filesystem could get discovered - in a subdir we should be ignoring. +- Improved the `-x` (`--one-file-system`) flag's handling of any mount-point + directories we encounter. It is both more optimal (in that it no longer does + a useless scan of the contents of the mount-point dirs) and also fixes a + bug where a remapped mount of the original filesystem could get discovered + in a subdir we should be ignoring. - - Rsync no longer discards a double-slash at the start of a filename when - trying to open the file. It also no longer constructs names that start with - a double slash (unless the user supplied them). +- Rsync no longer discards a double-slash at the start of a filename when + trying to open the file. It also no longer constructs names that start with + a double slash (unless the user supplied them). - - Path-specifying options to a daemon should now work the same with or without - chroot turned on. Previously, such a option (such as `--link-dest`) would - get its absolute path munged into a relative one if chroot was not on, - making that setting fairly useless. Rsync now transforms the path into one - that is based on the module's base dir when chroot is not enabled. +- Path-specifying options to a daemon should now work the same with or without + chroot turned on. Previously, such a option (such as `--link-dest`) would + get its absolute path munged into a relative one if chroot was not on, + making that setting fairly useless. Rsync now transforms the path into one + that is based on the module's base dir when chroot is not enabled. - - Fixed a compatibility problem interacting with older rsync versions that - might send us an empty `--suffix` value without telling us that - `--backup-dir` was specified. +- Fixed a compatibility problem interacting with older rsync versions that + might send us an empty `--suffix` value without telling us that + `--backup-dir` was specified. - - The `hosts allow` option for a daemon-over-remote-shell process now has - improved support for IPv6 addresses and a fix for systems that have a length - field in their socket structs. +- The `hosts allow` option for a daemon-over-remote-shell process now has + improved support for IPv6 addresses and a fix for systems that have a length + field in their socket structs. - - Fixed the ability to request an empty backup `--suffix` when sending files - to an rsync daemon. +- Fixed the ability to request an empty backup `--suffix` when sending files + to an rsync daemon. - - Fixed an option-parsing bug when `--files-from` was sent to a server sender. +- Fixed an option-parsing bug when `--files-from` was sent to a server sender. ### INTERNAL: - - Most of the I/O is now buffered, which results in a pretty large speedup - when running under MS Windows. (Craig Barratt) +- Most of the I/O is now buffered, which results in a pretty large speedup + when running under MS Windows. (Craig Barratt) - - Optimizations to the name-handling/comparing code have made some significant - reductions in user-CPU time for large file sets. +- Optimizations to the name-handling/comparing code have made some significant + reductions in user-CPU time for large file sets. - - Some cleanup of the variable types make the code more consistent. +- Some cleanup of the variable types make the code more consistent. - - Reduced memory requirements of hard link preservation. (J.W. Schultz) +- Reduced memory requirements of hard link preservation. (J.W. Schultz) - - Implemented a new algorithm for hard-link handling that speeds up the code - significantly. (J.W. Schultz and Wayne Davison) +- Implemented a new algorithm for hard-link handling that speeds up the code + significantly. (J.W. Schultz and Wayne Davison) - - The `--hard-link` option now uses the first existing file in the group of - linked files as the basis for the transfer. This prevents the sub-optimal - transfer of a file's data when a new hardlink is added on the sending side - and it sorts alphabetically earlier in the list than the files that are - already present on the receiving side. +- The `--hard-link` option now uses the first existing file in the group of + linked files as the basis for the transfer. This prevents the sub-optimal + transfer of a file's data when a new hardlink is added on the sending side + and it sorts alphabetically earlier in the list than the files that are + already present on the receiving side. - - Dropped support for protocol versions less than 20 (2.3.0 released 15 Mar - 1999) and activated warnings for protocols less than 25 (2.5.0 released 23 - Aug 2001). (Wayne Davison and J.W. Schultz, severally) +- Dropped support for protocol versions less than 20 (2.3.0 released 15 Mar + 1999\) and activated warnings for protocols less than 25 (2.5.0 released 23 + Aug 2001). (Wayne Davison and J.W. Schultz, severally) - - More optimal data transmission for `--hard-links` (protocol 28). +- More optimal data transmission for `--hard-links` (protocol 28). - - More optimal data transmission for `--checksum` (protocol 28). +- More optimal data transmission for `--checksum` (protocol 28). - - Less memory is used when `--checksum` is specified. +- Less memory is used when `--checksum` is specified. - - Less memory is used in the file list (a per-file savings). +- Less memory is used in the file list (a per-file savings). - - The generator is now better about not modifying the file list during the - transfer in order to avoid a copy-on-write memory bifurcation (on systems - where fork() uses shared memory). Previously, rsync's shared memory would - slowly become unshared, resulting in real memory usage nearly doubling on - the receiving side by the end of the transfer. Now, as long as permissions - are being preserved, the shared memory should remain that way for the entire - transfer. +- The generator is now better about not modifying the file list during the + transfer in order to avoid a copy-on-write memory bifurcation (on systems + where fork() uses shared memory). Previously, rsync's shared memory would + slowly become unshared, resulting in real memory usage nearly doubling on + the receiving side by the end of the transfer. Now, as long as permissions + are being preserved, the shared memory should remain that way for the entire + transfer. - - Changed hardlink info and `file_struct` + strings to use allocation pools. - This reduces memory use for large file-sets and permits freeing memory to - the OS. (J.W. Schultz) +- Changed hardlink info and `file_struct` + strings to use allocation pools. + This reduces memory use for large file-sets and permits freeing memory to + the OS. (J.W. Schultz) - - The 2 pipes used between the receiver and generator processes (which are - forked on the same machine) were reduced to 1 pipe and the protocol improved - so that (1) it is now impossible to have the `redo` pipe fill up and hang - rsync, and (2) trailing messages from the receiver don't get lost on their - way through the generator over to the sender (which mainly affected - hard-link messages and verbose `--stats` output). +- The 2 pipes used between the receiver and generator processes (which are + forked on the same machine) were reduced to 1 pipe and the protocol improved + so that (1) it is now impossible to have the `redo` pipe fill up and hang + rsync, and (2) trailing messages from the receiver don't get lost on their + way through the generator over to the sender (which mainly affected + hard-link messages and verbose `--stats` output). - - Improved the internal uid/gid code to be more portable and a little more - optimized. +- Improved the internal uid/gid code to be more portable and a little more + optimized. - - The device numbers sent when using `--devices` are now sent as separate - major/minor values with 32-bit accuracy (protocol 28). Previously, the - copied devices were sent as a single 32-bit number. This will make - inter-operation of 64-bit binaries more compatible with their 32-bit - brethren (with both ends of the connection are using protocol 28). Note that - optimizations in the binary protocol for sending the device numbers often - results in fewer bytes being used than before, even though more precision is - now available. +- The device numbers sent when using `--devices` are now sent as separate + major/minor values with 32-bit accuracy (protocol 28). Previously, the + copied devices were sent as a single 32-bit number. This will make + inter-operation of 64-bit binaries more compatible with their 32-bit + brethren (with both ends of the connection are using protocol 28). Note that + optimizations in the binary protocol for sending the device numbers often + results in fewer bytes being used than before, even though more precision is + now available. - - Some cleanup of the exclude/include structures and its code made things - clearer (internally), simpler, and more efficient. +- Some cleanup of the exclude/include structures and its code made things + clearer (internally), simpler, and more efficient. - - The reading & writing of the file-list in batch-mode is now handled by the - same code that sends & receives the list over the wire. This makes it much - easier to maintain. (Note that the batch code is still considered to be - experimental.) +- The reading & writing of the file-list in batch-mode is now handled by the + same code that sends & receives the list over the wire. This makes it much + easier to maintain. (Note that the batch code is still considered to be + experimental.) ### BUILD CHANGES: - - The configure script now accepts `--with-rsyncd-conf=PATH` to override the - default value of the /etc/rsyncd.conf file. +- The configure script now accepts `--with-rsyncd-conf=PATH` to override the + default value of the /etc/rsyncd.conf file. - - Fixed configure bug when running `./configure --disable-ipv6`. +- Fixed configure bug when running `./configure --disable-ipv6`. - - Fixed compilation problem on Tru64 Unix (having to do with `sockaddr.sa_len` - and `sockaddr.sin_len`). +- Fixed compilation problem on Tru64 Unix (having to do with `sockaddr.sa_len` + and `sockaddr.sin_len`). ### DEVELOPER RELATED: - - Fixed `make test` bug when build dir is not the source dir. +- Fixed `make test` bug when build dir is not the source dir. - - Added a couple extra diffs in the `patches` dir, removed the ones that got - applied, and rebuilt the rest. +- Added a couple extra diffs in the `patches` dir, removed the ones that got + applied, and rebuilt the rest. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.6.0 (1 Jan 2004) @@ -5337,138 +5337,138 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 27. The maximum accepted protocol number - was increased from 30 to 40. +- The protocol number was changed to 27. The maximum accepted protocol number + was increased from 30 to 40. ### ENHANCEMENTS: - - `ssh` is now the default remote shell for rsync. If you want to change this, - configure like this: `./configure --with-rsh=rsh`. +- `ssh` is now the default remote shell for rsync. If you want to change this, + configure like this: `./configure --with-rsh=rsh`. - - Added `--files-from`, `--no-relative`, `--no-implied-dirs`, and `--from0`. - Note that `--from0` affects the line-ending character for all the files read - by the `--*-from` options. (Wayne Davison) +- Added `--files-from`, `--no-relative`, `--no-implied-dirs`, and `--from0`. + Note that `--from0` affects the line-ending character for all the files read + by the `--*-from` options. (Wayne Davison) - - Length of csum2 is now per-file starting with protocol version - 27. (J.W. Schultz) +- Length of csum2 is now per-file starting with protocol version + 27\. (J.W. Schultz) - - Per-file dynamic block size is now sqrt(file length). The per-file checksum - size is determined according to an algorithm provided by Donovan Baarda - which reduces the probability of rsync algorithm corrupting data and falling - back using the whole md4 checksums. (J.W. Schultz, Donovan Baarda) +- Per-file dynamic block size is now sqrt(file length). The per-file checksum + size is determined according to an algorithm provided by Donovan Baarda + which reduces the probability of rsync algorithm corrupting data and falling + back using the whole md4 checksums. (J.W. Schultz, Donovan Baarda) - - The `--stats` option no longer includes the (debug) malloc summary unless - the verbose option was specified at least twice. +- The `--stats` option no longer includes the (debug) malloc summary unless + the verbose option was specified at least twice. - - Added a new error/warning code for when files vanish from the sending side. - Made vanished source files not interfere with the file-deletion pass when - `--delete-after` was specified. +- Added a new error/warning code for when files vanish from the sending side. + Made vanished source files not interfere with the file-deletion pass when + `--delete-after` was specified. - - Various trailing-info sections are now preceded by a newline. +- Various trailing-info sections are now preceded by a newline. ### BUG FIXES: - - Fixed several exclude/include matching bugs when using wild-cards. This has - a several user-visible effects, all of which make the matching more - consistent and intuitive. This should hopefully not cause anyone problems - since it makes the matching work more like what people are expecting. (Wayne - Davison) +- Fixed several exclude/include matching bugs when using wild-cards. This has + a several user-visible effects, all of which make the matching more + consistent and intuitive. This should hopefully not cause anyone problems + since it makes the matching work more like what people are expecting. (Wayne + Davison) - - A pattern with a `**` no longer causes a `*` to match slashes. For example, - with `/*/foo/**`, `foo` must be 2 levels deep. [If your string has BOTH `*` - and `**` wildcards, changing the `*` wildcards to `**` will provide the old - behavior in all versions.] +- A pattern with a `**` no longer causes a `*` to match slashes. For example, + with `/*/foo/**`, `foo` must be 2 levels deep. \[If your string has BOTH `*` + and `**` wildcards, changing the `*` wildcards to `**` will provide the old + behavior in all versions.\] - - `**/foo` now matches at the base of the transfer (like /foo does). [Use - `/**/foo` to get the old behavior in all versions.] +- `**/foo` now matches at the base of the transfer (like /foo does). \[Use + `/**/foo` to get the old behavior in all versions.\] - - A non-anchored wildcard term floats to match beyond the base of the - transfer. E.g. `CVS/R*` matches at the end of the path, just like the - non-wildcard term `CVS/Root` does. [Use `/CVS/R*` to get the old behavior in - all versions.] +- A non-anchored wildcard term floats to match beyond the base of the + transfer. E.g. `CVS/R*` matches at the end of the path, just like the + non-wildcard term `CVS/Root` does. \[Use `/CVS/R*` to get the old behavior in + all versions.\] - - Including a `**` in the match term causes it to be matched against the - entire path, not just the name portion, even if there aren't any interior - slashes in the term. E.g. `foo**bar` would exclude `/path/foo-bar` (just - like before) as well as `/foo-path/baz-bar` (unlike before). [Use `foo*bar` - to get the old behavior in all versions.] +- Including a `**` in the match term causes it to be matched against the + entire path, not just the name portion, even if there aren't any interior + slashes in the term. E.g. `foo**bar` would exclude `/path/foo-bar` (just + like before) as well as `/foo-path/baz-bar` (unlike before). \[Use `foo*bar` + to get the old behavior in all versions.\] - - The exclude list specified in the daemon's config file is now properly - applied to the pulled items no matter how deep the user's file-args are in - the source tree. (Wayne Davison) +- The exclude list specified in the daemon's config file is now properly + applied to the pulled items no matter how deep the user's file-args are in + the source tree. (Wayne Davison) - - For protocol version >= 27, `mdfour_tail()` is called when the block size - (including `checksum_seed`) is a multiple of 64. Previously it was not - called, giving the wrong MD4 checksum. (Craig Barratt) +- For protocol version >= 27, `mdfour_tail()` is called when the block size + (including `checksum_seed`) is a multiple of 64. Previously it was not + called, giving the wrong MD4 checksum. (Craig Barratt) - - For protocol version >= 27, a 64 bit bit counter is used in mdfour.c as - required by the RFC. Previously only a 32 bit bit counter was used, causing - incorrect MD4 file checksums for file sizes >= 512MB - 4. (Craig Barratt) +- For protocol version >= 27, a 64 bit bit counter is used in mdfour.c as + required by the RFC. Previously only a 32 bit bit counter was used, causing + incorrect MD4 file checksums for file sizes >= 512MB - 4. (Craig Barratt) - - Fixed a crash bug when interacting with older rsync versions and multiple - files of the same name are destined for the same dir. (Wayne Davison) +- Fixed a crash bug when interacting with older rsync versions and multiple + files of the same name are destined for the same dir. (Wayne Davison) - - Keep tmp names from overflowing MAXPATHLEN. +- Keep tmp names from overflowing MAXPATHLEN. - - Make `--link-dest` honor the absence of `-p`, `-o`, and `-g`. +- Make `--link-dest` honor the absence of `-p`, `-o`, and `-g`. - - Made rsync treat a trailing slash in the destination in a more consistent - manner. +- Made rsync treat a trailing slash in the destination in a more consistent + manner. - - Fixed file I/O error detection. (John Van Essen) +- Fixed file I/O error detection. (John Van Essen) - - Fixed bogus `malformed address {hostname}` message in rsyncd log when - checking IP address against hostnames from `hosts allow` and `hosts deny` - parameters in config file. +- Fixed bogus `malformed address {hostname}` message in rsyncd log when + checking IP address against hostnames from `hosts allow` and `hosts deny` + parameters in config file. - - Print heap statistics when verbose >= 2 instead of when >= 1. +- Print heap statistics when verbose >= 2 instead of when >= 1. - - Fixed a compression (`-z`) bug when syncing a mostly-matching file that - contains already-compressed data. (Yasuoka Masahiko and Wayne Davison) +- Fixed a compression (`-z`) bug when syncing a mostly-matching file that + contains already-compressed data. (Yasuoka Masahiko and Wayne Davison) - - Fixed a bug in the `--backup` code that could cause deleted files to not get - backed up. +- Fixed a bug in the `--backup` code that could cause deleted files to not get + backed up. - - When the backup code makes new directories, create them with mode 0700 - instead of 0755 (since the directory permissions in the backup tree are not - yet copied from the main tree). +- When the backup code makes new directories, create them with mode 0700 + instead of 0755 (since the directory permissions in the backup tree are not + yet copied from the main tree). - - Call setgroups() in a more portable manner. +- Call setgroups() in a more portable manner. - - Improved file-related error messages to better indicate exactly what - pathname failed. (Wayne Davison) +- Improved file-related error messages to better indicate exactly what + pathname failed. (Wayne Davison) - - Fixed some bugs in the handling of `--delete` and `--exclude` when using the - `--relative` (`-R`) option. (Wayne Davison) +- Fixed some bugs in the handling of `--delete` and `--exclude` when using the + `--relative` (`-R`) option. (Wayne Davison) - - Fixed bug that prevented regular files from replacing special files and - caused a directory in `--link-dest` or `--compare-dest` to block the - creation of a file with the same path. A directory still cannot be replaced - by a regular file unless `--delete` specified. (J.W. Schultz) +- Fixed bug that prevented regular files from replacing special files and + caused a directory in `--link-dest` or `--compare-dest` to block the + creation of a file with the same path. A directory still cannot be replaced + by a regular file unless `--delete` specified. (J.W. Schultz) - - Detect and report when open or opendir succeed but read and readdir fail - caused by network filesystem issues and truncated files. (David Norwood, - Michael Brown, J.W. Schultz) +- Detect and report when open or opendir succeed but read and readdir fail + caused by network filesystem issues and truncated files. (David Norwood, + Michael Brown, J.W. Schultz) - - Added a fix that should give ssh time to restore the tty settings if the - user presses Ctrl-C at an ssh password prompt. +- Added a fix that should give ssh time to restore the tty settings if the + user presses Ctrl-C at an ssh password prompt. ### INTERNAL: - - Eliminated vestigial support for old versions that we stopped supporting. - (J.W. Schultz) +- Eliminated vestigial support for old versions that we stopped supporting. + (J.W. Schultz) - - Simplified some of the option-parsing code. (Wayne Davison) +- Simplified some of the option-parsing code. (Wayne Davison) - - Some cleanup made to the exclude code, as well as some new defines added to - enhance readability. (Wayne Davison) +- Some cleanup made to the exclude code, as well as some new defines added to + enhance readability. (Wayne Davison) - - Changed the protocol-version code so that it can interact at a lower - protocol level than the maximum supported by both sides. Added an - undocumented option, `--protocol=N`, to force the value we advertise to the - other side (primarily for testing purposes). (Wayne Davison) +- Changed the protocol-version code so that it can interact at a lower + protocol level than the maximum supported by both sides. Added an + undocumented option, `--protocol=N`, to force the value we advertise to the + other side (primarily for testing purposes). (Wayne Davison) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.7 (4 Dec 2003) @@ -5476,10 +5476,10 @@ to develop and test fixes. ### SECURITY FIXES: - - Fix buffer handling bugs. (Andrew Tridgell, Martin Pool, Paul Russell, - Andrea Barisani) +- Fix buffer handling bugs. (Andrew Tridgell, Martin Pool, Paul Russell, + Andrea Barisani) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.6, aka "the dwd-between-jobs release" (26 Jan 2003) @@ -5487,93 +5487,92 @@ to develop and test fixes. ### ENHANCEMENTS: - - The `--delete-after` option now implies `--delete`. (Wayne Davison) +- The `--delete-after` option now implies `--delete`. (Wayne Davison) - - The `--suffix` option can now be used with `--backup-dir`. (Michael - Zimmerman) +- The `--suffix` option can now be used with `--backup-dir`. (Michael + Zimmerman) - - Combining `::` syntax with the `--rsh`/`-e` option now uses the specified - remote-shell as a transport to talk to a (newly-spawned) server-daemon. This - allows someone to use daemon features, such as modules, over a secure - protocol, such as ssh. (JD Paul) +- Combining `::` syntax with the `--rsh`/`-e` option now uses the specified + remote-shell as a transport to talk to a (newly-spawned) server-daemon. This + allows someone to use daemon features, such as modules, over a secure + protocol, such as ssh. (JD Paul) - - The rsync:// syntax for daemon connections is now accepted in the - destination field. +- The rsync:// syntax for daemon connections is now accepted in the + destination field. - - If the file name given to `--include-from` or `--exclude-from` is `-`, rsync - will read from standard input. (J.W. Schultz) +- If the file name given to `--include-from` or `--exclude-from` is `-`, rsync + will read from standard input. (J.W. Schultz) - - New option `--link-dest` which is like `--compare-dest` except that - unchanged files are hard-linked in to the destination directory. (J.W. - Schultz) +- New option `--link-dest` which is like `--compare-dest` except that + unchanged files are hard-linked in to the destination directory. (J.W. + Schultz) - - Don't report an error if an excluded file disappears during an rsync run. - (Eugene Chupriyanov and Bo Kersey) +- Don't report an error if an excluded file disappears during an rsync run. + (Eugene Chupriyanov and Bo Kersey) - - Added .svn to `--cvs-exclude` list to support subversion. (Jon Middleton) +- Added .svn to `--cvs-exclude` list to support subversion. (Jon Middleton) - - Properly support IPv6 addresses in the rsyncd.conf `hosts allow` and `hosts - deny` fields. (Hideaki Yoshifuji) +- Properly support IPv6 addresses in the rsyncd.conf `hosts allow` and `hosts deny` fields. (Hideaki Yoshifuji) - - Changed exclude file handling to permit DOS or MAC style line terminations. - (J.W. Schultz) +- Changed exclude file handling to permit DOS or MAC style line terminations. + (J.W. Schultz) - - Ignore errors from chmod when `-p`/`-a`/`--preserve-perms` is not set. - (Dave Dykstra) +- Ignore errors from chmod when `-p`/`-a`/`--preserve-perms` is not set. + (Dave Dykstra) ### BUG FIXES: - - Fix `forward name lookup failed` errors on AIX 4.3.3. (John L. Allen, Martin - Pool) +- Fix `forward name lookup failed` errors on AIX 4.3.3. (John L. Allen, Martin + Pool) - - Generate each file's rolling-checksum data as we send it, not in a separate - (memory-eating) pass before hand. This prevents timeout errors on really - large files. (Stefan Nehlsen) +- Generate each file's rolling-checksum data as we send it, not in a separate + (memory-eating) pass before hand. This prevents timeout errors on really + large files. (Stefan Nehlsen) - - Fix compilation on Tru64. (Albert Chin, Zoong Pham) +- Fix compilation on Tru64. (Albert Chin, Zoong Pham) - - Better handling of some client-server errors. (Martin Pool) +- Better handling of some client-server errors. (Martin Pool) - - Fixed a crash that would occur when sending a list of files that contains a - duplicate name (if it sorts to the end of the file list) and using - `--delete`. (Wayne Davison) +- Fixed a crash that would occur when sending a list of files that contains a + duplicate name (if it sorts to the end of the file list) and using + `--delete`. (Wayne Davison) - - Fixed the file-name duplicate-removal code when dealing with multiple dups - in a row. (Wayne Davison) +- Fixed the file-name duplicate-removal code when dealing with multiple dups + in a row. (Wayne Davison) - - Fixed a bug that caused rsync to lose the exit status of its child processes - and sometimes return an exit code of 0 instead of showing an error. (David - R. Staples, Dave Dykstra) +- Fixed a bug that caused rsync to lose the exit status of its child processes + and sometimes return an exit code of 0 instead of showing an error. (David + R. Staples, Dave Dykstra) - - Fixed bug in `--copy-unsafe-links` that caused it to be completely broken. - (Dave Dykstra) +- Fixed bug in `--copy-unsafe-links` that caused it to be completely broken. + (Dave Dykstra) - - Prevent infinite recursion in cleanup code under certain circumstances. - (Sviatoslav Sviridov and Marc Espie) +- Prevent infinite recursion in cleanup code under certain circumstances. + (Sviatoslav Sviridov and Marc Espie) - - Fixed a bug that prevented rsync from creating intervening directories when - `--relative-paths`/`-R` is set. (Craig Barratt) +- Fixed a bug that prevented rsync from creating intervening directories when + `--relative-paths`/`-R` is set. (Craig Barratt) - - Prevent `Connection reset by peer` messages from Cygwin. (Randy O'Meara) +- Prevent `Connection reset by peer` messages from Cygwin. (Randy O'Meara) ### INTERNAL: - - Many code cleanups and improved internal documentation. (Martin Pool, Nelson - Beebe) +- Many code cleanups and improved internal documentation. (Martin Pool, Nelson + Beebe) - - Portability fixes. (Dave Dykstra and Wayne Davison) +- Portability fixes. (Dave Dykstra and Wayne Davison) - - More test cases. (Martin Pool) +- More test cases. (Martin Pool) - - Some test-case fixes. (Brian Poole, Wayne Davison) +- Some test-case fixes. (Brian Poole, Wayne Davison) - - Updated included popt to the latest vendor drop, version 1.6.4. (Jos - Backus) +- Updated included popt to the latest vendor drop, version 1.6.4. (Jos + Backus) - - Updated config.guess and config.sub to latest versions; this means rsync - should build on more platforms. (Paul Green) +- Updated config.guess and config.sub to latest versions; this means rsync + should build on more platforms. (Paul Green) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.5, aka Snowy River (2 Apr 2002) @@ -5581,37 +5580,37 @@ to develop and test fixes. ### ENHANCEMENTS: - - With `--progress`, when a transfer is complete show the time taken; - otherwise show expected time to complete. (Cameron Simpson) +- With `--progress`, when a transfer is complete show the time taken; + otherwise show expected time to complete. (Cameron Simpson) - - Make `make install-strip` works properly, and `make install` accepts a - DESTDIR variable for help in building binary packages. (Peter - Breitenlohner, Greg Louis) +- Make `make install-strip` works properly, and `make install` accepts a + DESTDIR variable for help in building binary packages. (Peter + Breitenlohner, Greg Louis) - - If configured with `--enable-maintainer-mode`, then on receipt of a fatal - signal rsync will try to open an xterm running gdb, similarly to Samba's - `panic action` or GNOME's bug-buddy. (Martin Pool) +- If configured with `--enable-maintainer-mode`, then on receipt of a fatal + signal rsync will try to open an xterm running gdb, similarly to Samba's + `panic action` or GNOME's bug-buddy. (Martin Pool) ### BUG FIXES: - - Fix situation where failure to fork (e.g. because out of process slots) - would cause rsync to kill all processes owned by the current user. Yes, - really! (Paul Haas, Martin Pool) +- Fix situation where failure to fork (e.g. because out of process slots) + would cause rsync to kill all processes owned by the current user. Yes, + really! (Paul Haas, Martin Pool) - - Fix test suite on Solaris. (Jos Backus, Martin Pool) +- Fix test suite on Solaris. (Jos Backus, Martin Pool) - - Fix minor memory leak in socket code. (Dave Dykstra, Martin Pool.) +- Fix minor memory leak in socket code. (Dave Dykstra, Martin Pool.) - - Fix `--whole-file` problem that caused it to be the default even for remote - connections. (Martin Pool, Frank Schulz) +- Fix `--whole-file` problem that caused it to be the default even for remote + connections. (Martin Pool, Frank Schulz) - - Work around bug in Mac OS X mkdir(2), which cannot handle trailing slashes. - (Martin - Pool) +- Work around bug in Mac OS X mkdir(2), which cannot handle trailing slashes. + (Martin + Pool) - - Improved network error handling. (Greg A. Woods) +- Improved network error handling. (Greg A. Woods) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.4, aka "Imitation lizard skin" (13 Mar 2002) @@ -5619,18 +5618,18 @@ to develop and test fixes. ### BUG FIXES: - - Additional fix for zlib double-free bug. (Martin Pool, Andrew Tridgell) (CVE - CAN-2002-0059) +- Additional fix for zlib double-free bug. (Martin Pool, Andrew Tridgell) (CVE + CAN-2002-0059) ### ENHANCEMENTS: - - Merge in changes from zlib 1.1.3 to zlib 1.1.4. (Jos Backus) (Note that - rsync still uses a custom version of zlib; you can not just link against a - system library. See zlib/README.rsync) +- Merge in changes from zlib 1.1.3 to zlib 1.1.4. (Jos Backus) (Note that + rsync still uses a custom version of zlib; you can not just link against a + system library. See zlib/README.rsync) - - Additional test cases for `--compress`. (Martin Pool) +- Additional test cases for `--compress`. (Martin Pool) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.3, aka "Happy 26" (11 Mar 2002) @@ -5638,47 +5637,46 @@ to develop and test fixes. ### SECURITY FIXES: - - Make sure that supplementary groups are removed from a server - process after changing uid and gid. (Ethan Benson) (Debian bug - #132272, CVE CAN-2002-0080) +- Make sure that supplementary groups are removed from a server + process after changing uid and gid. (Ethan Benson) (Debian bug + #132272, CVE CAN-2002-0080) ### BUG FIXES: - - Fix zlib double-free bug. (Owen Taylor, Mark J Cox) (CVE CAN-2002-0059) +- Fix zlib double-free bug. (Owen Taylor, Mark J Cox) (CVE CAN-2002-0059) - - Fixed problem that in many cases caused the error message unexpected read - size of 0 in `map_ptr` and resulted in the wrong data being copied. +- Fixed problem that in many cases caused the error message unexpected read + size of 0 in `map_ptr` and resulted in the wrong data being copied. - - Fixed compilation errors on some systems caused by the use of `unsigned - int64` in rsync.h. +- Fixed compilation errors on some systems caused by the use of `unsigned int64` in rsync.h. - - Fixed problem on systems such as Sunos4 that do not support realloc on a - NULL pointer; error was 'out of memory in "flist_expand"'. +- Fixed problem on systems such as Sunos4 that do not support realloc on a + NULL pointer; error was 'out of memory in "flist_expand"'. - - Fix for rsync server processes hanging around after the client unexpectedly - disconnects. (Colin Walters) (Debian bug #128632) +- Fix for rsync server processes hanging around after the client unexpectedly + disconnects. (Colin Walters) (Debian bug #128632) - - Cope with BSD systems on which mkdir() will not accept a trailing slash. +- Cope with BSD systems on which mkdir() will not accept a trailing slash. ### ENHANCEMENTS: - - Merge in changes from zlib 1.1.2 to zlib 1.1.3. (Note that rsync still uses - a custom version of zlib; you can not just link against a system library. - See zlib/README.rsync) +- Merge in changes from zlib 1.1.2 to zlib 1.1.3. (Note that rsync still uses + a custom version of zlib; you can not just link against a system library. + See zlib/README.rsync) - - Command to initiate connections is only shown with `-vv`, rather than `-v` - as in 2.5.2. Output from plain `-v` is more similar to what was historically - used so as not to break scripts that try to parse the output. +- Command to initiate connections is only shown with `-vv`, rather than `-v` + as in 2.5.2. Output from plain `-v` is more similar to what was historically + used so as not to break scripts that try to parse the output. - - Added `--no-whole-file` and `--no-blocking-io` options (Dave Dykstra) +- Added `--no-whole-file` and `--no-blocking-io` options (Dave Dykstra) - - Made the `--write-batch` and `--read-batch` options actually work and added - documentation in the manpage (Jos Backus) +- Made the `--write-batch` and `--read-batch` options actually work and added + documentation in the manpage (Jos Backus) - - If the daemon is unable to fork a child to accept a connection, print an - error message. (Colin Walters) +- If the daemon is unable to fork a child to accept a connection, print an + error message. (Colin Walters) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.2 (26 Jan 2002) @@ -5686,47 +5684,47 @@ to develop and test fixes. ### SECURITY FIXES: - - Signedness security patch from Sebastian Krahmer -- in - some cases we were not sufficiently careful about reading integers from the - network. +- Signedness security patch from Sebastian Krahmer -- in + some cases we were not sufficiently careful about reading integers from the + network. ### PROTOCOL NUMBER: - - The protocol number was changed to 26. +- The protocol number was changed to 26. ### BUG FIXES: - - Fix possible string mangling in log files. +- Fix possible string mangling in log files. - - Fix for setting local address of outgoing sockets. +- Fix for setting local address of outgoing sockets. - - Better handling of hardlinks and devices on platforms with 64-bit `dev_t` or - `ino_t`. +- Better handling of hardlinks and devices on platforms with 64-bit `dev_t` or + `ino_t`. - - Name resolution on machines supporting IPv6 is improved. +- Name resolution on machines supporting IPv6 is improved. - - Fix for device nodes. (dann frazier) (Debian #129135) +- Fix for device nodes. (dann frazier) (Debian #129135) ### ENHANCEMENTS: - - With `-v`, rsync now shows the command used to initiate an ssh/rsh - connection. +- With `-v`, rsync now shows the command used to initiate an ssh/rsh + connection. - - `--statistics` now shows memory heap usage on platforms that support - mallinfo(). +- `--statistics` now shows memory heap usage on platforms that support + mallinfo(). - - "The Ted T'so school of program optimization": make progress visible and - people will think it's faster. (With `--progress`, rsync will show you how - many files it has seen as it builds the `file_list`, giving some indication - that it has not hung.) +- "The Ted T'so school of program optimization": make progress visible and + people will think it's faster. (With `--progress`, rsync will show you how + many files it has seen as it builds the `file_list`, giving some indication + that it has not hung.) - - Improvements to batch mode support. This is still experimental but testing - would be welcome. (Jos Backus) +- Improvements to batch mode support. This is still experimental but testing + would be welcome. (Jos Backus) - - New `--ignore-existing` option, patch previously distributed with Vipul's - Razor. (Debian #124286) +- New `--ignore-existing` option, patch previously distributed with Vipul's + Razor. (Debian #124286) ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.1 (3 Jan 2002) @@ -5734,33 +5732,33 @@ to develop and test fixes. ### BUG FIXES: - - Fix for segfault in `--daemon` mode configuration parser. (Paul Mackerras) +- Fix for segfault in `--daemon` mode configuration parser. (Paul Mackerras) - - Correct `string<->address` parsing for both IPv4 and 6. (YOSHIFUJI Hideaki, - SUMIKAWA Munechika and Jun-ichiro `itojun` Hagino) +- Correct `string<->address` parsing for both IPv4 and 6. (YOSHIFUJI Hideaki, + SUMIKAWA Munechika and Jun-ichiro `itojun` Hagino) - - Various fixes for IPv6 support. (Dave Dykstra) +- Various fixes for IPv6 support. (Dave Dykstra) - - rsync.1 typo fix. (Matt Kraai) +- rsync.1 typo fix. (Matt Kraai) - - Test suite typo fixes. (Tom Schmidt) +- Test suite typo fixes. (Tom Schmidt) - - rsync.1 grammar and clarity improvements. (Edward Welbourne) +- rsync.1 grammar and clarity improvements. (Edward Welbourne) - - Correction to ./configure tests for `inet_ntop`. (Jeff Garzik) +- Correction to ./configure tests for `inet_ntop`. (Jeff Garzik) ### ENHANCEMENTS: - - `--progress` and `-P` now show estimated data transfer rate (in a multiple - of bytes/s) and estimated time to completion. (Rik Faith) +- `--progress` and `-P` now show estimated data transfer rate (in a multiple + of bytes/s) and estimated time to completion. (Rik Faith) - - `--no-detach` option, required to run as a W32 service and also useful when - running on Unix under daemontools, AIX's SRC, or a debugger. (Max Bowsher, - Jos Backus) +- `--no-detach` option, required to run as a W32 service and also useful when + running on Unix under daemontools, AIX's SRC, or a debugger. (Max Bowsher, + Jos Backus) - - Clearer error messages for some conditions. +- Clearer error messages for some conditions. ------------------------------------------------------------------------------- +______________________________________________________________________ # NEWS for rsync 2.5.0 (30 Nov 2001) @@ -5768,124 +5766,124 @@ to develop and test fixes. ### PROTOCOL NUMBER: - - The protocol number was changed to 25. +- The protocol number was changed to 25. ### ANNOUNCEMENTS: - - Martin Pool is now a co-maintainer. +- Martin Pool is now a co-maintainer. ### NEW FEATURES: - - Support for LSB-compliant packaging +- Support for LSB-compliant packaging - - Shell wildcards are allowed in `auth users` lines. +- Shell wildcards are allowed in `auth users` lines. - - Merged UNC rsync+ patch to support creation of standalone patch sets. By - Bert J. Dempsey and Debra Weiss, updated by Jos Backus. - +- Merged UNC rsync+ patch to support creation of standalone patch sets. By + Bert J. Dempsey and Debra Weiss, updated by Jos Backus. + - - IPv6 support based on a patch from KAME.net, on systems including modern - versions of Linux, Solaris, and HP-UX. Also includes IPv6 compatibility - functions for old OSs by the Internet Software Consortium, Paul Vixie, the - OpenSSH portability project, and OpenBSD. +- IPv6 support based on a patch from KAME.net, on systems including modern + versions of Linux, Solaris, and HP-UX. Also includes IPv6 compatibility + functions for old OSs by the Internet Software Consortium, Paul Vixie, the + OpenSSH portability project, and OpenBSD. ### ENHANCEMENTS: - - Include/exclude cluestick: with `-vv`, print out whether files are included - or excluded and why. +- Include/exclude cluestick: with `-vv`, print out whether files are included + or excluded and why. - - Many error messages have more friendly explanations and more details. +- Many error messages have more friendly explanations and more details. - - Manual page improvements plus scanty protocol documentation. +- Manual page improvements plus scanty protocol documentation. - - When running as `--daemon` in the background and using a `log file` - rsyncd.conf directive, close the log file every time it is open when going - to sleep on the socket. This allows the log file to get cleaned out by - another process. +- When running as `--daemon` in the background and using a `log file` + rsyncd.conf directive, close the log file every time it is open when going + to sleep on the socket. This allows the log file to get cleaned out by + another process. - - Change to using libpopt rather than getopt for processing options. This - makes the code cleaner and the behaviour more consistent across platforms. - popt is included and built if not installed on the platform. +- Change to using libpopt rather than getopt for processing options. This + makes the code cleaner and the behaviour more consistent across platforms. + popt is included and built if not installed on the platform. - - More details in `--version`, including note about whether 64-bit files, - symlinks and hardlinks are supported. +- More details in `--version`, including note about whether 64-bit files, + symlinks and hardlinks are supported. - - MD4 code may use less CPU cycles. +- MD4 code may use less CPU cycles. - - Use mkstemp on systems where it is secure. If we use mktemp, explain that we - do it in a secure way. +- Use mkstemp on systems where it is secure. If we use mktemp, explain that we + do it in a secure way. - - `--whole-file` is the default when source and target are on the local - machine. +- `--whole-file` is the default when source and target are on the local + machine. ### BUG FIXES: - - Fix for various bugs causing rsync to hang. +- Fix for various bugs causing rsync to hang. - - Attempt to fix Large File Summit support on AIX. +- Attempt to fix Large File Summit support on AIX. - - Attempt to fix error handling lockup bug. +- Attempt to fix error handling lockup bug. - - Give a non-0 exit code if **any** of the files we have been asked to - transfer fail to transfer. +- Give a non-0 exit code if **any** of the files we have been asked to + transfer fail to transfer. - - For log messages containing ridiculously long strings that might overflow a - buffer rsync no longer aborts, but rather prints an ellipsis at the end of - the string. (Patch from Ed Santiago.) +- For log messages containing ridiculously long strings that might overflow a + buffer rsync no longer aborts, but rather prints an ellipsis at the end of + the string. (Patch from Ed Santiago.) ### PLATFORMS: - - Improved support for UNICOS (tested on Cray T3E and Cray SV1) - - - autoconf2.52 (or later) is now required to rebuild the autoconf scripts. It - is not required to simply build rsync. - - - Platforms thought to work in this release: - - - Cray SV1 UNICOS 10.0.0.8 cc - - Debian Linux 2.2 UltraSparc gcc - - Debian Linux testing/unstable ARM gcc - - FreeBSD 3.3-RELEASE i386 cc - - FreeBSD 4.1.1-RELEASE i386 cc - - FreeBSD 4.3-STABLE i386 cc - - HP PA-RISC HP-UX 10.20 gcc - - HP PA-RISC HP-UX 11.11 cc - - IRIX 6.5 MIPS cc - - IRIX 6.5 MIPS gcc - - Mac OS X PPC (`--disable-ipv6`) cc - - NetBSD 1.5 i386 gcc - - NetBSD Current i386 cc - - OpenBSD 2.5 Sparc gcc - - OpenBSD 2.9 i386 cc - - OpenBSD Current i386 cc - - RedHat 6.2 i386 gcc - - RedHat 6.2 i386 insure++ - - RedHat 7.0 i386 gcc - - RedHat 7.1 i386 (Kernel 2.4.10) gcc - - Slackware 8.0 i686 (Kernel 2.4.10) - - Solaris 8 UltraSparc cc - - Solaris 8 UltraSparc gcc - - Solaris 8 i386 gcc - - SuSE 7.1 i386 gcc2.95.2 - - SuSE 7.1 ppc gcc2.95.2 - - i386-pc-sco3.2v5.0.5 cc - - i386-pc-sco3.2v5.0.5 gcc - - powerpc-ibm-aix4.3.3.0 cc - - i686-unknown-sysv5UnixWare7.1.0 gcc - - i686-unknown-sysv5UnixWare7.1.0 cc +- Improved support for UNICOS (tested on Cray T3E and Cray SV1) + +- autoconf2.52 (or later) is now required to rebuild the autoconf scripts. It + is not required to simply build rsync. + +- Platforms thought to work in this release: + + - Cray SV1 UNICOS 10.0.0.8 cc + - Debian Linux 2.2 UltraSparc gcc + - Debian Linux testing/unstable ARM gcc + - FreeBSD 3.3-RELEASE i386 cc + - FreeBSD 4.1.1-RELEASE i386 cc + - FreeBSD 4.3-STABLE i386 cc + - HP PA-RISC HP-UX 10.20 gcc + - HP PA-RISC HP-UX 11.11 cc + - IRIX 6.5 MIPS cc + - IRIX 6.5 MIPS gcc + - Mac OS X PPC (`--disable-ipv6`) cc + - NetBSD 1.5 i386 gcc + - NetBSD Current i386 cc + - OpenBSD 2.5 Sparc gcc + - OpenBSD 2.9 i386 cc + - OpenBSD Current i386 cc + - RedHat 6.2 i386 gcc + - RedHat 6.2 i386 insure++ + - RedHat 7.0 i386 gcc + - RedHat 7.1 i386 (Kernel 2.4.10) gcc + - Slackware 8.0 i686 (Kernel 2.4.10) + - Solaris 8 UltraSparc cc + - Solaris 8 UltraSparc gcc + - Solaris 8 i386 gcc + - SuSE 7.1 i386 gcc2.95.2 + - SuSE 7.1 ppc gcc2.95.2 + - i386-pc-sco3.2v5.0.5 cc + - i386-pc-sco3.2v5.0.5 gcc + - powerpc-ibm-aix4.3.3.0 cc + - i686-unknown-sysv5UnixWare7.1.0 gcc + - i686-unknown-sysv5UnixWare7.1.0 cc ### TESTING: - - The existing test.sh script by Phil Hands has been merged into a - test framework that works from both `make check` and the Samba - build farm. +- The existing test.sh script by Phil Hands has been merged into a + test framework that works from both `make check` and the Samba + build farm. ------------------------------------------------------------------------------- +______________________________________________________________________ ## Partial Protocol History | RELEASE DATE | VER. | DATE OF COMMIT\* | PROTOCOL | -|--------------|--------|------------------|-------------| +| ------------ | ------ | ---------------- | ----------- | | 04 Nov 2026 | 3.5.2 | | 33 | | 21 Sep 2026 | 3.5.1 | 21 Sep 2026 | 33 | | 13 Aug 2026 | 3.5.0 | | 32 | diff --git a/README.md b/README.md index eb8020b04..e1133ac38 100644 --- a/README.md +++ b/README.md @@ -1,114 +1,90 @@ -WHAT IS RSYNC? --------------- +## WHAT IS RSYNC? Rsync is a fast and extraordinarily versatile file copying tool for both remote and local files. Rsync uses a delta-transfer algorithm which provides a very fast method -for bringing remote files into sync. It does this by sending just the +for bringing remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both -sets of files are present at one of the ends of the link beforehand. At +sets of files are present at one of the ends of the link beforehand. At first glance this may seem impossible because the calculation of diffs between two files normally requires local access to both files. A technical report describing the rsync algorithm is included with this package. - -USAGE ------ +## USAGE Basically you use rsync just like scp, but rsync has many additional -options. To get a complete list of supported options type: +options. To get a complete list of supported options type: - rsync --help +``` +rsync --help +``` See the [manpage][0] for more detailed information. -[0]: https://download.samba.org/pub/rsync/rsync.1 - -BUILDING AND INSTALLING ------------------------ +## BUILDING AND INSTALLING If you need to build rsync yourself, check out the [INSTALL][1] page for information on what libraries and packages you can use to get the maximum features in your build. -[1]: https://github.com/RsyncProject/rsync/blob/master/INSTALL.md - -TESTING -------- +## TESTING Run `make check` from a configured build directory. See the [testsuite README](testsuite/README.md) for test selection, profiles and CI. -SETUP ------ +## SETUP Rsync normally uses ssh or rsh for communication with remote systems. It does not need to be setuid and requires no special privileges for -installation. You must, however, have a working ssh or rsh system. +installation. You must, however, have a working ssh or rsh system. Using ssh is recommended for its security features. -Alternatively, rsync can run in `daemon' mode, listening on a socket. +Alternatively, rsync can run in \`daemon' mode, listening on a socket. This is generally used for public file distribution, although authentication and access control are available. -To install rsync, first run the "configure" script. This will create a -Makefile and config.h appropriate for your system. Then type "make". +To install rsync, first run the "configure" script. This will create a +Makefile and config.h appropriate for your system. Then type "make". Note that on some systems you will have to force configure not to use gcc because gcc may not support some features (such as 64 bit file -offsets) that your system may support. Set the environment variable CC +offsets) that your system may support. Set the environment variable CC to the name of your native compiler before running configure in this case. Once built put a copy of rsync in your search path on the local and -remote systems (or use "make install"). That's it! +remote systems (or use "make install"). That's it! - -RSYNC DAEMONS -------------- +## RSYNC DAEMONS Rsync can also talk to "rsync daemons" which can provide anonymous or -authenticated rsync. See the rsyncd.conf(5) manpage for details on how -to setup an rsync daemon. See the rsync(1) manpage for info on how to +authenticated rsync. See the rsyncd.conf(5) manpage for details on how +to setup an rsync daemon. See the rsync(1) manpage for info on how to connect to an rsync daemon. - -WEB SITE --------- +## WEB SITE For more information, visit the [main rsync web site][2]. -[2]: https://rsync.samba.org/ - You'll find a FAQ list, downloads, resources, HTML versions of the manpages, etc. - -MAILING LISTS -------------- +## MAILING LISTS There is a mailing list for the discussion of rsync and its applications -that is open to anyone to join. New releases are announced on this +that is open to anyone to join. New releases are announced on this list, and there is also an announcement-only mailing list for those that -want official announcements. See the [mailing-list page][3] for full +want official announcements. See the [mailing-list page][3] for full details. -[3]: https://rsync.samba.org/lists.html - - -DISCORD -------- +## DISCORD There is also an rsync [Discord server][d] for real-time chat about rsync and its development. -[d]: https://discord.gg/Avfvy9zhdp - - -BUG REPORTS ------------ +## BUG REPORTS Report suspected security vulnerabilities through [GitHub's private reporting form](https://github.com/RsyncProject/rsync/security/advisories/new). @@ -116,40 +92,28 @@ See the [security policy](SECURITY.md) for details and an email contact. The [bug-tracking web page][4] has full details on bug reporting. -[4]: https://rsync.samba.org/bug-tracking.html - That page contains links to the current bug list, and information on how to -do a good job when reporting a bug. You might also like to try searching +do a good job when reporting a bug. You might also like to try searching the Internet for the error message you've received, or looking in the [mailing list archives][5]. -[5]: https://mail-archive.com/rsync@lists.samba.org/ - To send a bug report, follow the instructions on the bug-tracking page of the web site. Alternately, email your bug report to . -GIT REPOSITORY --------------- +## GIT REPOSITORY If you want to get the very latest version of rsync direct from the -source code repository, then you will need to use git. The git repo +source code repository, then you will need to use git. The git repo is hosted [on GitHub][6] and [on Samba's site][7]. -[6]: https://github.com/RsyncProject/rsync -[7]: https://git.samba.org/?p=rsync.git;a=summary - See [the download page][8] for full details on all the ways to grab the source. -[8]: https://rsync.samba.org/download.html - +## COPYRIGHT -COPYRIGHT ---------- - -Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many +Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many people from around the world have helped to maintain and improve it. Special thanks go to Wayne Davison, who maintained rsync from 2004 to 2024. @@ -158,5 +122,15 @@ Rsync may be used, modified and redistributed only under the terms of the GNU General Public License, found in the file [COPYING][9] in this distribution, or at [the Free Software Foundation][10]. +[0]: https://download.samba.org/pub/rsync/rsync.1 +[1]: https://github.com/RsyncProject/rsync/blob/master/INSTALL.md +[2]: https://rsync.samba.org/ +[3]: https://rsync.samba.org/lists.html +[4]: https://rsync.samba.org/bug-tracking.html +[5]: https://mail-archive.com/rsync@lists.samba.org/ +[6]: https://github.com/RsyncProject/rsync +[7]: https://git.samba.org/?p=rsync.git;a=summary +[8]: https://rsync.samba.org/download.html [9]: https://github.com/RsyncProject/rsync/blob/master/COPYING [10]: https://www.fsf.org/licenses/gpl.html +[d]: https://discord.gg/Avfvy9zhdp diff --git a/SECURITY.md b/SECURITY.md index f8dbbb7f6..349c6631b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,10 +1,10 @@ ## Supported releases -Line | Status | Upstream support | End condition ---- | --- | --- | --- -3.5 | Current stable | Security fixes, bug fixes and compatible incremental improvements | 12 months after the first stable 4.x release -3.2 | LTS | Security fixes only | 31 May 2029 -All other lines | Unsupported | None | Support has ended +| Line | Status | Upstream support | End condition | +| --------------- | -------------- | ----------------------------------------------------------------- | -------------------------------------------- | +| 3.5 | Current stable | Security fixes, bug fixes and compatible incremental improvements | 12 months after the first stable 4.x release | +| 3.2 | LTS | Security fixes only | 31 May 2029 | +| All other lines | Unsupported | None | Support has ended | Only the latest patch release in each supported line receives upstream support. The 3.2 LTS line receives confirmed security fixes plus changes required to apply or verify them. It does not receive new features, general bug fixes, performance work, modernisation or optimisation. Its current release is [3.2.8](https://github.com/RsyncProject/rsync/releases/tag/v3.2.8). An extension beyond 31 May 2029 requires an explicit policy update. @@ -14,10 +14,10 @@ This policy covers upstream rsync releases. Operating-system distributions may m ## Responsibilities -Responsibility | Owner ---- | --- -Security coordination, disclosure and releases | Zen Dodd ([@steadytao](https://github.com/steadytao)) -Triage and review | RsyncProject maintainers +| Responsibility | Owner | +| ---------------------------------------------- | ----------------------------------------------------- | +| Security coordination, disclosure and releases | Zen Dodd ([@steadytao](https://github.com/steadytao)) | +| Triage and review | RsyncProject maintainers | The current stable line is maintained on [stable/3.5](https://github.com/RsyncProject/rsync/tree/stable/3.5). The 3.2 LTS line is maintained on [lts/3.2](https://github.com/RsyncProject/rsync/tree/lts/3.2). @@ -26,6 +26,7 @@ The current stable line is maintained on [stable/3.5](https://github.com/RsyncPr Report suspected vulnerabilities through [GitHub private vulnerability reporting](https://github.com/RsyncProject/rsync/security/advisories/new). If GitHub cannot be used, email [rsync.project@gmail.com](mailto:rsync.project@gmail.com). Include: + - the affected version and platform; - the relevant command, daemon configuration or restricted-shell policy; - a minimal reproducer; @@ -48,6 +49,7 @@ GitHub advisories are the public record for vulnerabilities handled by the proje Peer-supplied file lists, checksums, arguments, filters, messages and metadata are untrusted. A security boundary exists whenever rsync has more filesystem or process authority than the peer or another user who can change a path it resolves. This applies to local transfers, remote-shell transfers, daemon modules and restricted `rrsync` commands. Where the operating system supports them, rsync uses held directory descriptors and `*at()` operations to confine security-sensitive path resolution. The remaining platform limits are: + - a platform without a usable search-only directory descriptor fails closed when safe parent traversal is unavailable; - nested socket creation fails closed without a confined primitive, while some special-file creation retains a path-based fallback on systems without the required `*at()` operation; - ACL, xattr and creation-time operations may retain a path-based metadata fallback where the platform has no fd-relative equivalent; diff --git a/rsync-ssl.1.md b/rsync-ssl.1.md index 0c46b7ada..b3235e68a 100644 --- a/rsync-ssl.1.md +++ b/rsync-ssl.1.md @@ -17,9 +17,9 @@ The rsync-ssl script helps you to run an rsync copy to/from an rsync daemon that requires ssl connections. The script requires that you specify an rsync-daemon arg in the style of either -`hostname::` (with 2 colons) or `rsync://hostname/`. The default port used for +`hostname::` (with 2 colons) or `rsync://hostname/`. The default port used for connecting is 874 (one higher than the normal 873) unless overridden in the -environment. You can specify an overriding port via `--port` or by including +environment. You can specify an overriding port via `--port` or by including it in the normal spot in the URL format, though both of those require your rsync version to be at least 3.2.0. @@ -30,7 +30,7 @@ that particular program to open an ssl connection instead of trying to find an openssl, socat or stunnel executable via a simple heuristic (assuming that the `RSYNC_SSL_TYPE` environment variable is not set as well -- see below). This option must specify one of `openssl`, `socat` or `stunnel`. The equal sign is -required for this particular option. The wrapper's option scan stops at a +required for this particular option. The wrapper's option scan stops at a `--` argument: the `--` and everything after it are passed through to rsync unchanged, so a `--type=...` token after a `--` is not consumed by the wrapper. @@ -42,87 +42,97 @@ All the other options are passed through to the rsync command, so consult the The ssl helper scripts are affected by the following environment variables: -0. `RSYNC_SSL_TYPE` +00. `RSYNC_SSL_TYPE` Specifies the program type that should be used to open the ssl connection. It must be one of `openssl`, `socat` or `stunnel`. The `--type=SSL_TYPE` option overrides this, when specified. -0. `RSYNC_SSL_PORT` +01. `RSYNC_SSL_PORT` If specified, the value is the port number that is used as the default when - the user does not specify a port in their rsync command. When not - specified, the default port number is 874. (Note that older rsync versions + the user does not specify a port in their rsync command. When not + specified, the default port number is 874. (Note that older rsync versions (prior to 3.2.0) did not communicate an overriding port number value to the helper script.) -0. `RSYNC_SSL_CERT` +02. `RSYNC_SSL_CERT` If specified, the value is a filename that contains a certificate to use for the connection. -0. `RSYNC_SSL_KEY` +03. `RSYNC_SSL_KEY` If specified, the value is a filename that contains a key for the provided certificate to use for the connection. -0. `RSYNC_SSL_CA_CERT` +04. `RSYNC_SSL_CA_CERT` If specified, the value is a filename that contains a certificate authority - certificate that is used to validate the connection. When set, the server + certificate that is used to validate the connection. When set, the server certificate is verified against this CA **and** its name is checked against the host you are connecting to (the chain and the identity), for all of the openssl, gnutls, socat and stunnel backends. Set it to an empty string to disable certificate validation entirely (an encrypt-only connection). -0. `RSYNC_SSL_ALLOW_INSECURE_STUNNEL` +05. `RSYNC_SSL_ALLOW_INSECURE_STUNNEL` Set to `1` to allow the stunnel backend to run without a CA certificate (and - thus with no server-certificate validation at all). Without this, stunnel + thus with no server-certificate validation at all). Without this, stunnel mode refuses to start unless `RSYNC_SSL_CA_CERT` is set, since an unvalidated TLS connection can be silently man-in-the-middled. -0. `RSYNC_SSL_SKIP_HOSTNAME_CHECK` +06. `RSYNC_SSL_SKIP_HOSTNAME_CHECK` Set to `1` to verify the certificate **chain** but skip the **hostname** - (identity) check, for the openssl and stunnel backends. Use this only when + (identity) check, for the openssl and stunnel backends. Use this only when the server certificate legitimately cannot match the host you connect to -- for example when the server's internal-CA certificate carries a different name. The CA chain is still checked. This is narrower than disabling validation with an empty `RSYNC_SSL_CA_CERT`. -0. `RSYNC_SSL_OPENSSL` +07. `RSYNC_SSL_OPENSSL` Specifies the openssl executable to run when the connection type is set to - openssl. If unspecified, the $PATH is searched for "openssl". + openssl. If unspecified, the $PATH is searched for "openssl". -0. `RSYNC_SSL_GNUTLS` +08. `RSYNC_SSL_GNUTLS` Specifies the gnutls-cli executable to run when the connection type is set - to gnutls. If unspecified, the $PATH is searched for "gnutls-cli". + to gnutls. If unspecified, the $PATH is searched for "gnutls-cli". -0. `RSYNC_SSL_SOCAT` +09. `RSYNC_SSL_SOCAT` Specifies the socat executable to run when the connection type is set to - socat. If unspecified, the $PATH is searched for "socat". + socat. If unspecified, the $PATH is searched for "socat". -0. `RSYNC_SSL_STUNNEL` +10. `RSYNC_SSL_STUNNEL` Specifies the stunnel executable to run when the connection type is set to - stunnel. If unspecified, the $PATH is searched first for "stunnel4" and + stunnel. If unspecified, the $PATH is searched first for "stunnel4" and then for "stunnel". ## EXAMPLES -> rsync-ssl -aiv example.com::mod/ dest +> ``` +> rsync-ssl -aiv example.com::mod/ dest +> ``` -> rsync-ssl --type=openssl -aiv example.com::mod/ dest +> ``` +> rsync-ssl --type=openssl -aiv example.com::mod/ dest +> ``` -> rsync-ssl --type=socat -aiv example.com::mod/ dest +> ``` +> rsync-ssl --type=socat -aiv example.com::mod/ dest +> ``` -> rsync-ssl -aiv --port 9874 example.com::mod/ dest +> ``` +> rsync-ssl -aiv --port 9874 example.com::mod/ dest +> ``` -> rsync-ssl -aiv rsync://example.com:9874/mod/ dest +> ``` +> rsync-ssl -aiv rsync://example.com:9874/mod/ dest +> ``` ## THE SERVER SIDE @@ -135,12 +145,12 @@ rsyncd.conf](rsyncd.conf.5#SSL_TLS_Daemon_Setup). ## CAVEATS -The stunnel backend requires stunnel 4 or newer. It also requires +The stunnel backend requires stunnel 4 or newer. It also requires `RSYNC_SSL_CA_CERT` unless `RSYNC_SSL_ALLOW_INSECURE_STUNNEL=1` explicitly opts out of server-certificate validation. The `openssl` type uses `openssl s_client`, which is retained for -compatibility. If your OpenSSL version's `s_client` has trouble handling +compatibility. If your OpenSSL version's `s_client` has trouble handling rsync traffic, try `--type=socat` or `--type=stunnel`. For verified OpenSSL connections, an IP literal must match an IP subject @@ -149,7 +159,7 @@ scope for the connection but only the address is checked against the certificate IP connections do not request DNS-based server name indication (SNI). This script also supports a `--type=gnutls` option, but at the time of this -release the gnutls-cli command was dropping output, making it unusable. If +release the gnutls-cli command was dropping output, making it unusable. If that bug has been fixed in your version, feel free to put gnutls into an exported RSYNC_SSL_TYPE environment variable to make its use the default. @@ -163,10 +173,10 @@ This manpage is current for version @VERSION@ of rsync. ## CREDITS -Rsync is distributed under the GNU General Public License. See the file +Rsync is distributed under the GNU General Public License. See the file [COPYING](COPYING) for details. -A web site is available at . The site includes an +A web site is available at . The site includes an FAQ-O-Matic which may cover questions unanswered by this manual page. ## AUTHOR diff --git a/rsync.1.md b/rsync.1.md index cd323d3f1..0edf2ac01 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -31,19 +31,19 @@ is available at . ## DESCRIPTION -Rsync is a fast and extraordinarily versatile file copying tool. It can copy +Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over a remote shell, or to/from a remote rsync -daemon. It offers a large number of options that control every aspect of its +daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be -copied. It is famous for its delta-transfer algorithm, which reduces the +copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between -the source files and the existing files in the destination. Rsync is widely +the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use. Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified -time. Any changes in the other preserved attributes (as requested by options) +time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file's data does not need to be updated. @@ -60,16 +60,16 @@ Some of the additional features of rsync are: ## GENERAL Rsync copies files either to or from a remote host, or locally on the current -host. It does not support copying files between two different remote hosts. +host. It does not support copying files between two different remote hosts. There are two different ways for rsync to contact a remote system: using a remote-shell program as the transport (such as ssh or rsh), or by contacting an -rsync daemon directly via TCP. The remote-shell transport is used whenever the +rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host -specification. In this case, the local rsync process uses the remote -shell program to start an rsync process on the remote system. The two +specification. In this case, the local rsync process uses the remote +shell program to start an rsync process on the remote system. The two rsync processes then communicate via the remote shell program to -accomplish the desired transfers. In this case, the files that are +accomplish the desired transfers. In this case, the files that are accessible on the remote system are those accessible to the user ID under which the remote shell starts the remote rsync process. @@ -90,9 +90,9 @@ If neither the source or destination path specify a remote host, the copy occurs locally (see also the [`--list-only`](#opt) option). Rsync refers to the local side as the client and the remote side as -the server. The server is not to be confused with an rsync daemon. +the server. The server is not to be confused with an rsync daemon. A daemon is always a server, but a server can be either a daemon or a -remote-shell spawned process. If the transfer is local, then the +remote-shell spawned process. If the transfer is local, then the rsync subprocess which receives the contents of the files being transferred is the server. @@ -106,7 +106,7 @@ see the file README.md for installation instructions. Once installed, you can use rsync to any machine that you can access via a remote shell, or that has an rsync daemon available. For remote transfers, rsync normally uses ssh for its -communications. Alternatively, +communications. Alternatively, you can specify any remote shell you like, either by using the [`-e`](#opt) command line option, or by setting the [`RSYNC_RSH`](#) environment variable. @@ -115,58 +115,70 @@ Note that rsync must be installed on both the source and destination machines. ## USAGE You use rsync in a similar way to other file-copying commands such -as cp and rcp. You must specify a source and a +as cp and rcp. You must specify a source and a destination, one of which may be remote. Perhaps the best way to explain the syntax is with some examples: -> rsync -t *.c foo:src/ +> ``` +> rsync -t *.c foo:src/ +> ``` This would transfer all files matching the pattern `*.c` from the current -directory to the directory src on the machine foo. If any of the files already +directory to the directory src on the machine foo. If any of the files already exist on the remote system then the rsync remote-update protocol is used to -update the file by sending only the differences in the data. Note that the +update the file by sending only the differences in the data. Note that the expansion of wildcards on the command-line (`*.c`) into a list of files is handled by the shell before it runs rsync and not by rsync itself (as for other Posix-style programs). -> rsync -avz foo:src/bar /data/tmp +> ``` +> rsync -avz foo:src/bar /data/tmp +> ``` This would recursively transfer all files from the directory src/bar on the -machine foo into the /data/tmp/bar directory on the local machine. The files +machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in archive mode, which ensures that symbolic links, devices, attributes, permissions, ownerships, etc. are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer. -> rsync -avz foo:src/bar/ /data/tmp +> ``` +> rsync -avz foo:src/bar/ /data/tmp +> ``` A trailing slash on the source changes this behavior to avoid creating an -additional directory level at the destination. You can think of a trailing / +additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the containing directory on the -destination. In other words, each of the following commands copies the files +destination. In other words, each of the following commands copies the files in the same way, including their setting of the attributes of /dest/foo: -> rsync -av /src/foo /dest -> rsync -av /src/foo/ /dest/foo +> ``` +> rsync -av /src/foo /dest +> rsync -av /src/foo/ /dest/foo +> ``` Note also that host and module references don't require a trailing slash to -copy the contents of the default directory. For example, both of these copy +copy the contents of the default directory. For example, both of these copy the remote directory's contents into "/dest": -> rsync -av host: /dest -> rsync -av host::module /dest +> ``` +> rsync -av host: /dest +> rsync -av host::module /dest +> ``` You can also use rsync in local-only mode, where both the source and -destination don't have a ':' in the name. In this case it behaves like an +destination don't have a ':' in the name. In this case it behaves like an improved copy command. Finally, you can list all the (listable) modules available from a particular rsync daemon by leaving off the module name: -> rsync somehost.mydomain.com:: +> ``` +> rsync somehost.mydomain.com:: +> ``` ## COPYING TO A DIFFERENT NAME @@ -174,10 +186,12 @@ When you want to copy a directory to a different name, use a trailing slash on the source directory to put the contents of the directory into any destination directory you like: -> rsync -ai foo/ bar/ +> ``` +> rsync -ai foo/ bar/ +> ``` Rsync also has the ability to copy a single file to a -destination file with a different name. The rules for this are: +destination file with a different name. The rules for this are: - The transfer list must consist of a single item (either a file or an empty directory) @@ -186,14 +200,16 @@ destination file with a different name. The rules for this are: Under those circumstances, rsync will use the specified destination path as the filename of the destination (rather than constructing a -filename using the last element of the source path). It is best +filename using the last element of the source path). It is best to use this idiom only when copying a file, and to use the above trailing-slash idiom when copying a directory. The following example copies the `foo.c` file as `bar.c` in the `save` directory (assuming that `bar.c` isn't a directory): -> rsync -ai src/foo.c save/bar.c +> ``` +> rsync -ai src/foo.c save/bar.c +> ``` The single-item copy rule can give unexpected results if a wildcard pattern for the source yields a single item, and the destination, @@ -203,12 +219,16 @@ For example, if `src/*.c` matches one file and `save/dir` doesn't exist, this will perhaps confusingly name the destination file `save/dir`: -> rsync -ai src/*.c save/dir +> ``` +> rsync -ai src/*.c save/dir +> ``` To prevent such an accident, either make sure the destination directory exists or specify the destination path with a trailing slash: -> rsync -ai src/*.c save/dir/ +> ``` +> rsync -ai src/*.c save/dir/ +> ``` ## SORTED TRANSFER ORDER @@ -220,7 +240,7 @@ specified on the command-line. If you need a particular file to be transferred prior to another, the only way to be guaranteed of that is to separate the files into -different rsync calls. If it is sufficient for the destination files to +different rsync calls. If it is sufficient for the destination files to appear at almost the same time, consider using [`--delay-updates`](#opt), which doesn't affect the sorted transfer order, but does make the final file-updating phase happen much more rapidly. @@ -228,7 +248,7 @@ does make the final file-updating phase happen much more rapidly. ## SECURITY Rsync is frequently run across a network and with elevated privileges, so it is -worth thinking about who you are trusting and with what. This section is a +worth thinking about who you are trusting and with what. This section is a practical guide for safe use; the project's `SECURITY.md` describes the full threat model and the per-platform residuals. @@ -242,7 +262,7 @@ across an untrusted network. Instead tunnel it over ssh (see [USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION](#)) or wrap it in TLS with [**rsync-ssl**(1)](rsync-ssl.1), setting `RSYNC_SSL_CA_CERT` so that the -server certificate's chain **and** hostname are verified. When you must supply a +server certificate's chain **and** hostname are verified. When you must supply a daemon password non-interactively, put it in a [`--password-file`](#opt) that is readable only by you (mode 600) rather than on the command line. @@ -254,20 +274,24 @@ rsync process to access files beyond the bounds of what was requested. Rsync ensures that the list of files being transferred stays within the requested tree, and will abort when a file list contains an absolute or relative path that tries to escape -the top of the transfer. It also verifies that no extra source arguments +the top of the transfer. It also verifies that no extra source arguments were added to the transfer and that the file list obeys the exclude rules that were sent to the sender. For those who want to be extra careful, it is safest to copy untrusted remote files into a dedicated -destination directory. For example, instead of copying into your home +destination directory. For example, instead of copying into your home directory: -> rsync -aiv host1:dir1 ~ +> ``` +> rsync -aiv host1:dir1 ~ +> ``` dedicate a "host1-files" directory to the remote content: -> rsync -aiv host1:dir1 ~/host1-files +> ``` +> rsync -aiv host1:dir1 ~/host1-files +> ``` See the [`--trust-sender`](#opt) option for additional details. @@ -314,11 +338,11 @@ separate restriction described under [`--confine-root`](#opt) and in Rsync auto-negotiates the strongest checksum that both ends support, so keeping both local and remote rsync versions reasonably current is usually all -that is needed. You can +that is needed. You can pin the choice with [`--checksum-choice`](#opt) (`--cc`, e.g. `--cc=sha1` or one of the xxHash variants) or constrain negotiation with the [`RSYNC_CHECKSUM_LIST`](#) environment variable; only very old peers fall back to -MD4/MD5. This pre-transfer "does this file need updating?" checksum is separate +MD4/MD5. This pre-transfer "does this file need updating?" checksum is separate from the whole-file checksum rsync normally computes to verify each transferred file afterward (verification is off when `--checksum-choice=none` is forced). @@ -327,7 +351,7 @@ file afterward (verification is off when `--checksum-choice=none` is forced). The client and server automatically negotiate the newest protocol they both support, so a current pair is already using the most recent version; [`--protocol`](#opt) only *forces an older* version for compatibility and should -not be used to downgrade a connection. Avoiding old protocols is therefore a +not be used to downgrade a connection. Avoiding old protocols is therefore a matter of running a current rsync on both ends (a protocol below 30 also forces the weak MD4 authentication digest on a daemon connection -- see the AUTHENTICATION STRENGTH section of [**rsyncd.conf**(5)](rsyncd.conf.5)). @@ -336,11 +360,13 @@ STRENGTH section of [**rsyncd.conf**(5)](rsyncd.conf.5)). The syntax for requesting multiple files from a remote host is done by specifying additional remote-host arguments in the same style as the first, or with -the hostname omitted. For instance, all these work: +the hostname omitted. For instance, all these work: -> rsync -aiv host:file1 :file2 host:file{3,4} /dest/ -> rsync -aiv host::modname/file{1,2} host::modname/extra /dest/ -> rsync -aiv host::modname/first ::extra-file{1,2} /dest/ +> ``` +> rsync -aiv host:file1 :file2 host:file{3,4} /dest/ +> rsync -aiv host::modname/file{1,2} host::modname/extra /dest/ +> rsync -aiv host::modname/first ::extra-file{1,2} /dest/ +> ``` Note that a daemon connection only supports accessing one module per copy command, so if the start of a follow-up path doesn't begin with the @@ -358,11 +384,13 @@ shell in such a way as to preserve the characters you give it. Thus, if you ask for a file with spaces in the name, that's what the remote rsync looks for: -> rsync -aiv host:'a simple file.pdf' /dest/ +> ``` +> rsync -aiv host:'a simple file.pdf' /dest/ +> ``` If you use scripts that have been written to manually apply extra quoting to the remote rsync arguments, or to rely on remote argument splitting, you can ask rsync -to let your script handle the extra escaping. This is done by either adding +to let your script handle the extra escaping. This is done by either adding the [`--old-args`](#opt) option to the rsync runs in the script (which requires a new rsync) or exporting [RSYNC_OLD_ARGS](#)=1 and [RSYNC_PROTECT_ARGS](#)=0 (which works with old or new rsync versions). @@ -371,11 +399,11 @@ a new rsync) or exporting [RSYNC_OLD_ARGS](#)=1 and [RSYNC_PROTECT_ARGS](#)=0 An rsync daemon provides a way to give access to one or more directory hierarchies on a system in a controlled way, without having to provide -shell access to the system. Each directory hierarchy is called a -"module". The names, directories, access permissions and so on for +shell access to the system. Each directory hierarchy is called a +"module". The names, directories, access permissions and so on for each module are defined by the rsync daemon configuration file, described in [**rsyncd.conf**(5)](rsyncd.conf.5). -Connections to an rsync daemon typically use TCP port 873. The +Connections to an rsync daemon typically use TCP port 873. The administrator of the system would normally arrange for the rsync daemon to be running; refer to the [STARTING AN RSYNC DAEMON TO ACCEPT CONNECTIONS](#) @@ -395,34 +423,36 @@ is similar to using it with a remote shell except that: - If you specify a remote source path but no destination, a listing of the matching files on the remote daemon is output. - To contact an rsync daemon directly, the [`--rsh`](#opt) (`-e`) - option must be omitted. If it is used, rsync will use the specified + option must be omitted. If it is used, rsync will use the specified remote shell program to start an rsync daemon on the remote system. See the [USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION](#) section for information on this mode of operation. An example that copies all the files in a remote module named "src": -> rsync -av host::src /dest +> ``` +> rsync -av host::src /dest +> ``` -Some modules on the remote daemon may require authentication. If so, you will -receive a password prompt when you connect. You can avoid the password prompt +Some modules on the remote daemon may require authentication. If so, you will +receive a password prompt when you connect. You can avoid the password prompt by setting the environment variable [`RSYNC_PASSWORD`](#) to the password you -want to use or using the [`--password-file`](#opt) option. This may be useful +want to use or using the [`--password-file`](#opt) option. This may be useful when scripting rsync. -WARNING: On some systems, environment variables are visible to all users. On +WARNING: On some systems, environment variables are visible to all users. On those systems using [`--password-file`](#opt) is recommended. If rsync was built with IDN support (look for "IDN" in `rsync --version`), the daemon host may contain non-ASCII characters: those labels are converted to -their IDNA A-label ("Punycode") form before the name is looked up. The name is +their IDNA A-label ("Punycode") form before the name is looked up. The name is read using your locale's character encoding, so be sure your locale is set -correctly. A name typed with combining characters is normalized on the way, so -it is looked up the same as its precomposed spelling. Only the non-ASCII +correctly. A name typed with combining characters is normalized on the way, so +it is looked up the same as its precomposed spelling. Only the non-ASCII labels change, so an address literal, a name you punycoded yourself, and a name that is not a valid IDN are all looked up just as you typed them. -This applies to the host of a daemon connection only. The host of a plain +This applies to the host of a daemon connection only. The host of a plain remote-shell transfer (the single-colon syntax) is passed to your remote-shell program unchanged, since that name may well be an ssh_config "Host" alias rather than a DNS name. @@ -430,17 +460,19 @@ rather than a DNS name. You may establish the connection via a web proxy by setting the environment variable [`RSYNC_PROXY`](#) to a hostname:port pair pointing to your web proxy. Note that your web proxy's configuration must support proxy connections to port -873. +873\. You may also establish a daemon connection using a program as a proxy by setting the environment variable [`RSYNC_CONNECT_PROG`](#) to the commands you -wish to run in place of making a direct socket connection. The string may +wish to run in place of making a direct socket connection. The string may contain the escape "%H" to represent the hostname specified in the rsync -command (so use "%%" if you need a single "%" in your string). For example: +command (so use "%%" if you need a single "%" in your string). For example: -> export RSYNC_CONNECT_PROG='ssh proxyhost nc %H 873' -> rsync -av targethost1::module/src/ /dest/ -> rsync -av rsync://targethost2/module/src/ /dest/ +> ``` +> export RSYNC_CONNECT_PROG='ssh proxyhost nc %H 873' +> rsync -av targethost1::module/src/ /dest/ +> rsync -av rsync://targethost2/module/src/ /dest/ +> ``` The command specified above uses ssh to run nc (netcat) on a proxyhost, which forwards all data to port 873 (the rsync daemon) on the targethost (%H). @@ -456,8 +488,8 @@ named modules) without actually allowing any new socket connections into a system, other than what is already required to allow remote-shell access. Rsync supports connecting to a host using a remote shell and then spawning a single-use "daemon" server that expects to read its config file in the home directory -of the remote user. This can be useful if you want to encrypt a daemon-style -transfer's data. However, since the daemon is started by the remote user, +of the remote user. This can be useful if you want to encrypt a daemon-style +transfer's data. However, since the daemon is started by the remote user, you may not be able to use features which require root privilege, such as chroot or setting the user ID used by the daemon. (For another way to encrypt a daemon transfer, consider using ssh @@ -470,14 +502,18 @@ with the only difference being that you must explicitly set the remote shell program on the command-line with the [`--rsh=COMMAND`](#opt) option. (Setting the RSYNC_RSH in the environment will not turn on this functionality.) For example: -> rsync -av --rsh=ssh host::module /dest +> ``` +> rsync -av --rsh=ssh host::module /dest +> ``` A "user@" prefix in front of the host serves two purposes at once in this mode: it is the rsync-user value (used to log in to a module that requires user-based authentication) and, by default, it is also passed to the remote shell as the -login user. So the simple form +login user. So the simple form -> rsync -av --rsh=ssh user@host::module /dest +> ``` +> rsync -av --rsh=ssh user@host::module /dest +> ``` runs `ssh -l user host` and offers "user" as the rsync-user to the module; the two are forced to be the same name. @@ -485,10 +521,12 @@ two are forced to be the same name. If you need the remote-shell (ssh) login to use a different name than the rsync-user, give an explicit '-l' option to ssh in the remote-shell command. When ssh is already told which user to log in as, rsync does not add its own -'-l', so the "user@" prefix is then used only as the rsync-user. For example, +'-l', so the "user@" prefix is then used only as the rsync-user. For example, using the short version of the [`--rsh`](#opt) option: -> rsync -av -e "ssh -l ssh-user" rsync-user@host::module /dest +> ``` +> rsync -av -e "ssh -l ssh-user" rsync-user@host::module /dest +> ``` Here "ssh-user" is used at the ssh level while "rsync-user" is used to log in to the "module". @@ -501,10 +539,10 @@ However, when accessing a daemon directly, it needs to be started beforehand. In order to connect to an rsync daemon, the remote system needs to have a daemon already running (or it needs to have configured something like inetd to -spawn an rsync daemon for incoming connections on a particular port). For full +spawn an rsync daemon for incoming connections on a particular port). For full information on how to start a daemon that will handling incoming socket connections, see the manpage for [**rsyncd.conf**(5)](rsyncd.conf.5), -the config file for the daemon. The manpage contains the full details for how to run +the config file for the daemon. The manpage contains the full details for how to run the daemon, including stand-alone and inetd configurations. If you're using one of the remote-shell transports for the transfer, there is @@ -517,20 +555,21 @@ Here are some examples of how rsync can be used. To backup a home directory, which consists of large MS Word files and mail folders, a per-user cron job can be used that runs this each day: -> rsync -aiz . bkhost:backup/joe/ +> ``` +> rsync -aiz . bkhost:backup/joe/ +> ``` To move some files from a remote host to the local host, you could run: -> rsync -aiv --remove-source-files rhost:/tmp/{file1,file2}.c ~/src/ +> ``` +> rsync -aiv --remove-source-files rhost:/tmp/{file1,file2}.c ~/src/ +> ``` ## OPTION SUMMARY -Here is a short summary of the options available in rsync. Each option also +Here is a short summary of the options available in rsync. Each option also has its own detailed description later in this manpage. -[comment]: # (help-rsync.h) -[comment]: # (Keep these short enough that they'll be under 80 chars when indented by 7 chars.) - ```plaintext --verbose, -v increase verbosity --info=FLAGS fine-grained informational verbosity @@ -696,8 +735,6 @@ has its own detailed description later in this manpage. Rsync can also be run as a daemon, in which case the following options are accepted: -[comment]: # (help-rsyncd.h) - ```plaintext --daemon run as an rsync daemon --address=ADDRESS bind to the specified address @@ -720,3564 +757,3640 @@ accepted: ## OPTIONS Rsync accepts both long (double-dash + word) and short (single-dash + letter) -options. The full list of the available options are described below. If an +options. The full list of the available options are described below. If an option can be specified in more than one way, the choices are comma-separated. Some options only have a long variant, not a short. If the option takes a parameter, the parameter is only listed after the long -variant, even though it must also be specified for the short. When specifying +variant, even though it must also be specified for the short. When specifying a parameter, you can either use the form `--option=param`, `--option param`, `-o=param`, `-o param`, or `-oparam` (the latter choices assume that your option has a short variant). The parameter may need to be quoted in some manner for it to survive the -shell's command-line parsing. Also keep in mind that a leading tilde (`~`) in +shell's command-line parsing. Also keep in mind that a leading tilde (`~`) in a pathname is substituted by your shell, so make sure that you separate the option name from the pathname using a space (rather than an equal sign) if you want the local shell to expand it. -[comment]: # (Some markup below uses a literal non-breakable space when a backtick string) -[comment]: # (needs to contain a space since markdown strips spaces from the start/end) - -[comment]: # (An OL starting at 0 is converted into a DL by the parser.) - -0. `--help` - - Print a short help page describing the options available in rsync and exit. - You can also use `-h` for `--help` when it is used without any other - options or arguments (since otherwise it means [`--human-readable`](#opt)). - -0. `--version`, `-V` - - Print the rsync version plus other info and exit. When repeated, the - information is output in a JSON format that is still fairly readable - (client side only). - - The output includes a list of compiled-in capabilities, a list of - optimizations, the default list of checksum algorithms, the default list of - compression algorithms, the default list of daemon auth digests, a link to - the rsync web site, and a few other items. - -0. `--verbose`, `-v` - - This option increases the amount of information you are given during the - transfer. By default, rsync works silently. A single `-v` will give you - information about what files are being transferred and a brief summary at - the end. Two `-v` options will give you information on what files are - being skipped and slightly more information at the end. More than two `-v` - options should only be used if you are debugging rsync. - - The end-of-run summary tells you the number of bytes sent to the remote - rsync (which is the receiving side on a local copy), the number of bytes - received from the remote host, and the average bytes per second of the - transferred data computed over the entire length of the rsync run. The - second line shows the total size (in bytes), which is the sum of all the - file sizes that rsync considered transferring. It also shows a "speedup" - value, which is a ratio of the total file size divided by the sum of the - sent and received bytes (which is really just a feel-good bigger-is-better - number). Note that these byte values can be made more (or less) - human-readable by using the [`--human-readable`](#opt) (or - `--no-human-readable`) options. - - The `-v` option is equivalent to the setting of groups - of [`--info`](#opt) and [`--debug`](#opt) options. You can choose to use - these newer options in addition to, or in place of using `--verbose`, as - any fine-grained settings override the implied settings of `-v`. Both - [`--info`](#opt) and [`--debug`](#opt) have help texts available that - tells you exactly what flags are set for each increase in verbosity - (use `--info=help` or `--debug=help` to see them). - - However, do keep in mind that a daemon's "`max verbosity`" setting will limit - how high the various individual flags can be set on the daemon - side. For instance, if the max is 2, then any info and/or debug flag that - is set to a higher value than what would be set by `-vv` will be downgraded - to the `-vv` level in the daemon's logging. - -0. `--info=FLAGS` - - This option lets you have fine-grained control over the information output - you want to see. An individual flag name may be followed by a level - number, with 0 meaning to silence that output, 1 being the default output - level, and higher numbers increasing the output of that flag (for those - that support higher levels). Use `--info=help` to see all the available - flag names, what they output, and what flag names are added for each - increase in the verbose level. Some examples: - - > rsync -a --info=progress2 src/ dest/ - > rsync -avv --info=stats2,misc1,flist0 src/ dest/ - - Note that `--info=name`'s output is affected by the [`--out-format`](#opt) - and [`--itemize-changes`](#opt) (`-i`) options. See those options for more - information on what is output and when. - - This option was added to 3.1.0 (released September 2013), - so an older rsync on the server side might - reject your attempts at fine-grained control. - See also the "`max verbosity`" caveat above when dealing with a daemon. - -0. `--debug=FLAGS` - - This option lets you have fine-grained control over the debug output you - want to see. An individual flag name may be followed by a level number, - with 0 meaning to silence that output, 1 being the default output level, - and higher numbers increasing the output of that flag (for those that - support higher levels). Use `--debug=help` to see all the available flag - names, what they output, and what flag names are added for each increase in - the verbose level. Some examples: - - > rsync -avvv --debug=none src/ dest/ - > rsync -avA --del --debug=del2,acl src/ dest/ - - Note that some debug messages will only be output when the [`--stderr=all`](#opt) - option is specified, especially those pertaining to I/O and buffer debugging. - - This option is not forwarded by the client to the server side, so that - you can specify different debug values for each side of the transfer. - This also allows you to specify debug options that are only - present in one of the rsync versions. If you want to duplicate the same - option on both sides, using brace expansion is an easy way to save you some - typing. This works in zsh and bash: - - > rsync -aiv {-M,}--debug=del2 src/ dest/ - -0. `--stderr=errors|all|client` - - This option controls which processes output to stderr, and whether - info messages are output to stderr rather than stdout. - The mode strings can be abbreviated down as far as a single letter. - The 3 possible choices are: - - - `errors` - (the default) causes all the rsync processes to send - errors directly to stderr, even if the process is on the remote side of - the transfer. Info messages are sent to the client side via the protocol - stream. If stderr is not available (i.e. when directly connecting with a - daemon via a socket) errors fall back to being sent via the protocol - stream. - - - `all` - causes all rsync messages (info and error) to be written - directly to stderr from all (possible) processes. This causes stderr to - become line-buffered (instead of unbuffered) and eliminates the ability to - divide up the info and error messages by file handle. For those doing - debugging or using several levels of verbosity, this option can help to - avoid clogging up the transfer stream (which should prevent any chance of - a deadlock bug hanging things up). It also allows [`--debug`](#opt) to - enable some extra I/O related messages. - - - `client` - causes all rsync messages to be sent to the client side - via the protocol stream. One client process outputs all messages, with - errors on stderr and info messages on stdout. This **was** the default - in older rsync versions, but can cause error delays when a lot of - transfer data is ahead of the messages. If you're pushing files to an - older rsync, you may want to use `--stderr=all` since that idiom has - been around for several releases. - - Rsync also accepts the old `--msgs2stderr` and `--no-msgs2stderr` - options, equivalent to the `all` and `client` settings, - respectively, and uses them when forwarding non-default settings - to the remote side, in case the remote rsync is an older version. - -0. `--quiet`, `-q` - - This option decreases the amount of information you are given during the - transfer, notably suppressing information messages from the remote server. - This option is useful when invoking rsync from cron. - -0. `--no-motd` - - This option affects the information that is output by the client at the - start of a daemon transfer. This suppresses the message-of-the-day (MOTD) - text, but it also affects the list of modules that the daemon sends in - response to the "rsync host::" request (due to a limitation in the rsync - protocol), so omit this option if you want to request the list of modules - from the daemon. - -0. `--ignore-times`, `-I` - - Normally rsync will skip any files that are already the same size and have - the same modification timestamp. This option turns off this "quick check" - behavior, causing all files to be updated. - - This option can be confusing compared to [`--ignore-existing`](#opt) and - [`--ignore-non-existing`](#opt) in that that they cause rsync to transfer - fewer files, while this option causes rsync to transfer more files. - -0. `--size-only` - - This modifies rsync's "quick check" algorithm for finding files that need - to be transferred, changing it from the default of transferring files with - either a changed size or a changed last-modified time to just looking for - files that have changed in size. This is useful when starting to use rsync - after using another mirroring system which may not preserve timestamps - exactly. - -0. `--time-only` - - For an existing regular destination file, compare only the modification - time when deciding whether to transfer its data. A matching time skips the - data even when the sizes differ. Files absent from the destination and - alternate `--link-dest`, `--copy-dest` or `--compare-dest` candidates are - not subject to this option; they keep their existing selection rules. This - can preserve a compressed local copy or a zero-byte marker that retains - the source's modification time. - - Use this only when source modification times reliably identify changes: - different content with the same time will be skipped. The option applies - to local transfers and pulls. Remote pushes are refused because the option - is not sent to the remote receiver. For an existing destination, combining - it with [`--size-only`](#opt) requires both size and time to match. - `--time-only` cannot be combined with [`--checksum`](#opt), - [`--ignore-times`](#opt), [`--hard-links`](#opt), - [`--append`](#opt) or [`--remove-source-files`](#opt). A hard-link group - could otherwise copy a skipped marker into a missing destination member. - -0. `--modify-window=NUM`, `-@` - - When comparing two timestamps, rsync treats the timestamps as being equal - if they differ by no more than the modify-window value. The default is 0, - which matches just integer seconds. If you specify a negative value (and - the receiver is at least version 3.1.3, released January 2018) - then nanoseconds will also be taken - into account. Specifying 1 is useful for copies to/from MS Windows FAT - filesystems, because FAT represents times with a 2-second resolution - (allowing times to differ from the original by up to 1 second). - - If you want all your transfers to default to comparing nanoseconds, you can - create a `~/.popt` file and put these lines in it: - - > rsync alias -a -a@-1 - > rsync alias -t -t@-1 - - With that as the default, you'd need to specify `--modify-window=0` (aka - `-@0`) to override it and ignore nanoseconds, e.g. if you're copying - between ext3 and ext4, or if the receiving rsync is older than 3.1.3. - -0. `--checksum`, `-c` - - This changes the way rsync checks if the files have been changed and are in - need of a transfer. Without this option, rsync uses a "quick check" that - (by default) checks if each file's size and time of last modification match - between the sender and receiver. This option changes this to compare a - checksum for each file that has a matching size. Generating the - checksums means that both sides will expend a lot of disk I/O reading all - the data in the files in the transfer, so this can slow things down - significantly (and this is prior to any reading that will be done to - transfer changed files) - - The sending side generates its checksums while it is doing the file-system - scan that builds the list of the available files. The receiver generates - its checksums when it is scanning for changed files, and will checksum any - 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. - - Note that rsync normally 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 - after-the-transfer verification has nothing to do with this option's - before-the-transfer "Does this file need to be updated?" check. - - The checksum used is auto-negotiated between the client and the server, but - can be overridden using either the [`--checksum-choice`](#opt) (`--cc`) - option or an environment variable that is discussed in that option's - section. - -0. `--archive`, `-a` - - This is equivalent to `-rlptgoD`. It is a quick way of saying you want - 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`). - - The only exception to the above equivalence is when [`--files-from`](#opt) - is specified, in which case [`-r`](#opt) is not implied. - -0. `--no-OPTION` - - You may turn off one or more implied options by prefixing the option name - with "no-". Not all positive options have a negated opposite, but a lot - do, including those that can be used to disable an implied option (e.g. - `--no-D`, `--no-perms`) or have different defaults in various circumstances - (e.g. [`--no-whole-file`](#opt), `--no-blocking-io`, `--no-dirs`). Every - valid negated option accepts both the short and the long option name after - the "no-" prefix (e.g. `--no-R` is the same as `--no-relative`). - - As an example, if you want to use [`--archive`](#opt) (`-a`) but don't want - [`--owner`](#opt) (`-o`), instead of converting `-a` into `-rlptgD`, you - can specify `-a --no-o` (aka `--archive --no-owner`). - - The order of the options is important: if you specify `--no-r -a`, the `-r` - option would end up being turned on, the opposite of `-a --no-r`. Note - also that the side-effects of the [`--files-from`](#opt) option are NOT - positional, as it affects the default state of several options and slightly - changes the meaning of [`-a`](#opt) (see the [`--files-from`](#opt) option - for more details). - -0. `--recursive`, `-r` - - This tells rsync to copy directories recursively. See also - [`--dirs`](#opt) (`-d`) for an option that allows the scanning of a single - directory. - - See the [`--inc-recursive`](#opt) option for a discussion of the - incremental recursion for creating the list of files to transfer. - -0. `--inc-recursive`, `--i-r` - - This option explicitly enables incremental recursion when scanning for - files, which is enabled by default when using the [`--recursive`](#opt) - option and both sides of the transfer are running rsync 3.0.0 - (released March 2008) or newer. - - Incremental recursion uses much less memory than non-incremental, while - also beginning the transfer more quickly (since it doesn't need to scan the - entire transfer hierarchy before it starts transferring files). If no - recursion is enabled in the source files, this option has no effect. - - Some options require rsync to know the full file list, so these options - disable the incremental recursion mode. These include: - - [`--delete-before`](#opt) (the old default of [`--delete`](#opt)) - - [`--delete-after`](#opt) - - [`--prune-empty-dirs`](#opt) - - [`--delay-updates`](#opt) - - [`--delay-symlinks`](#opt) - - In order to be compatible with incremental recursion, - [`--delete-during`](#opt) is the default delete mode for [`--delete`](#opt). - - One side-effect of incremental recursion is that any missing - sub-directories inside a recursively-scanned directory are (by default) - created prior to recursing into the sub-directories. This earlier creation point - (compared to a non-incremental recursion) allows rsync to then set the - modify time of the finished directory right away (without having to delay - that until a bunch of recursive copying has finished). However, these - early directories don't yet have their completed mode, mtime, or ownership - set -- they have more restrictive rights until the subdirectory's copying - actually begins. This early-creation idiom can be avoided by using the - [`--omit-dir-times`](#opt) option. - - Incremental recursion can be disabled using the - [`--no-inc-recursive`](#opt) (`--no-i-r`) option. - -0. `--no-inc-recursive`, `--no-i-r` - - Disables the incremental recursion algorithm of the - [`--recursive`](#opt) option. This makes rsync scan the full file list - before it begins to transfer files. See [`--inc-recursive`](#opt) for more - info. - -0. `--relative`, `-R` - - Use relative paths. This means that the full path names specified on the - command line are sent to the server rather than just the last parts of the - filenames. This is particularly useful when you want to send several - different directories at the same time. For example, this command: - - > rsync -av /foo/bar/baz.c remote:/tmp/ - - would create a file named baz.c in /tmp/ on the remote machine. If instead - you used - - > rsync -avR /foo/bar/baz.c remote:/tmp/ - - then a file named /tmp/foo/bar/baz.c would be created on the remote - machine, preserving its full path. These extra path elements are called - "implied directories" (i.e. the "foo" and the "foo/bar" directories in the - above example). - - Rsync always sends these implied directories as - real directories in the file list, even if a path element is really a - symlink on the sending side. This prevents some really unexpected behaviors - when copying the full path of a file that has a symlink - in its path. If you want to duplicate a server-side symlink, include both - the symlink via its path, and the referent directory via its real path. If - you're dealing with an older rsync on the sending side, you may need to use - the [`--no-implied-dirs`](#opt) option. - - It is also possible to limit the amount of path information that is sent as - implied directories for each path you specify. With a modern rsync on the - sending side (beginning with 2.6.7, released March 2006), - you can insert a dot and a slash into - the source path, like this: - - > rsync -avR /foo/./bar/baz.c remote:/tmp/ - - That would create /tmp/bar/baz.c on the receiving machine. (Note that the dot - must be followed by a slash, so "/foo/." would not be abbreviated.) For - older rsync versions, you would need to change directory to limit the source - path. For example, when pushing files: - - > (cd /foo; rsync -avR bar/baz.c remote:/tmp/) - - (Note that the parentheses put the two commands into a sub-shell, so that the - "cd" command doesn't remain in effect for future commands.) If you're - pulling files from an older rsync, use this idiom (but only for a - non-daemon transfer): - - > rsync -avR --rsync-path="cd /foo; rsync" \ - > remote:bar/baz.c /tmp/ - -0. `--no-implied-dirs` - - This option affects the default behavior of the [`--relative`](#opt) option. When - it is specified, the attributes of the implied directories from the source - names are not included in the transfer. This means that the corresponding - path elements on the destination system are left unchanged if they exist, - and any missing implied directories are created with default attributes. - This even allows these implied path elements to have big differences, such - as being a symlink to a directory on the receiving side. - - For instance, if a command-line argument or a files-from entry told rsync to - transfer the file "path/foo/file", the directories "path" and "path/foo" - are implied when [`--relative`](#opt) is used. If "path/foo" is a symlink to "bar" - on the destination system, the receiving rsync would ordinarily delete - "path/foo", recreate it as a directory, and receive the file into the new - directory. With `--no-implied-dirs`, the receiving rsync leaves the - existing "path/foo" symlink in place and follows it, so the file is written - through the symlink and ends up in "path/bar". Note the security - implication: a pre-existing in-tree symlink-to-directory on the receiving - side will redirect where the file is written, so only use - `--no-implied-dirs` when you trust the destination's existing path elements. - (A symlink whose target is absolute or escapes the destination tree is still - refused by the secure path resolver rather than followed.) Another way to - accomplish this link preservation is to use the [`--keep-dirlinks`](#opt) - option (which will also affect symlinks to directories in the rest of the - transfer). - - When pulling files from an rsync older than 3.0.0 (March 2008), - you may need to use this - option if the sending side has a symlink in the path you request and you - wish the implied directories to be transferred as normal directories. - -0. `--backup`, `-b` - - With this option, preexisting destination files are renamed as each file is - transferred or deleted (that is, each file to be deleted or overwritten - gets renamed instead). You can control where the backup file goes and - what (if any) suffix gets appended using the [`--backup-dir`](#opt) and - [`--suffix`](#opt) options. - - If you don't specify [`--backup-dir`](#opt): - - 1. the [`--omit-dir-times`](#opt) option will be forced on - 2. the use of [`--delete`](#opt) (without [`--delete-excluded`](#opt)), - causes rsync to add a "protect" [filter-rule](#FILTER_RULES) for the - backup suffix to the end of all your existing filters that looks like - this: `-f "P *~"`. This rule prevents previously backed-up files from - being deleted. - - Note that if you are supplying your own filter rules, you may need to - manually insert your own exclude/protect rule somewhere higher up in the - list so that it has a high 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-dir=DIR` - - This implies the [`--backup`](#opt) option, and tells rsync to store all - backups in the specified directory on the receiving side. This can be used - for incremental backups. You can additionally specify a backup suffix - using the [`--suffix`](#opt) option (otherwise the files backed up in the - specified directory will keep their original filenames). - - Note that if you specify a relative path, the backup directory will be - relative to the destination directory, so you probably want to specify - either an absolute path or a path that starts with "../". If an rsync - daemon is the receiver, the backup directory cannot go outside the module's - path hierarchy, so take extra care not to delete or copy into the - backup directory inadvertently. - -0. `--suffix=SUFFIX` - - This option allows you to override the default backup suffix used with the - [`--backup`](#opt) (`-b`) option. The default suffix is a `~` if no - [`--backup-dir`](#opt) was specified, otherwise it is an empty string. - -0. `--update`, `-u` - - This forces rsync to skip any files which exist on the destination and have - a modified time that is newer than the source file. (If an existing - destination file has a modification time equal to the source file's, it - will be updated if the sizes are different.) - - Note that this does not affect the copying of directories, symlinks, or other - special files. Also, a difference of object type between the sender and - receiver is always considered to be important enough for an update, no - matter what date is on the objects. For example, if the source has a - directory where the destination has a file, the transfer would occur - regardless of the timestamps. - - This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any - exclude side effects. - - A caution for those that choose to combine [`--inplace`](#opt) with - `--update`: an interrupted transfer will leave behind a partial file on the - receiving side that has a very recent modified time, so re-running the - transfer will probably **not** continue the interrupted file. As such, it - is usually best to avoid combining this with[ `--inplace`](#opt) unless you - have implemented manual steps to handle any interrupted in-progress files. - -0. `--inplace` - - This option changes how rsync transfers a file when its data needs to be - updated: instead of the default method of creating a new copy of the file - and moving it into place when it is complete, rsync instead writes the - updated data directly to the destination file. - - This has several effects: - - - Hard links are not broken. This means the new data will be visible - through other hard links to the destination file. Moreover, attempts to - copy differing source files onto a multiply-linked destination file will - result in a "tug of war" with the destination data changing back and - forth. - - In-use binaries cannot be updated (either the OS will prevent this from - happening, or binaries that attempt to swap-in their data will misbehave - or crash). - - The file's data will be in an inconsistent state during the transfer and - will be left that way if the transfer is interrupted or if an update - fails. - - A file that rsync cannot write to cannot be updated. While a super user - can update any file, a normal user needs to be granted write permission - for the open of the file for writing to be successful. - - The efficiency of rsync's delta-transfer algorithm may be reduced if some - data in the destination file is overwritten before it can be copied to a - position later in the file. This does not apply if you use [`--backup`](#opt), - since rsync is smart enough to use the backup file as the basis file for - the transfer. - - WARNING: you should not use this option to update files that are being - accessed by others, so be careful when choosing to use this for a copy. - - This option is useful for transferring large files with block-based changes - or appended data, and also on systems that are disk bound, not network - bound. It can also help keep a copy-on-write filesystem snapshot from - diverging the entire contents of a file that only has minor changes. - - The option implies [`--partial`](#opt) (since an interrupted transfer does - not delete the file), but conflicts with [`--partial-dir`](#opt) and - [`--delay-updates`](#opt). - -0. `--append` - - This special copy mode is only applicable to update files that are - known to be growing larger, that is, where any existing content on the receiving side - is also known to be the same as the content on the sender. The use of - `--append` **can be dangerous** if you aren't 100% sure that all the files - in the transfer are shared, growing files. You should thus use filter - rules to ensure that you weed out any files that do not fit this criteria. - - Rsync updates these growing file in-place without verifying any of the - existing content in the file (it only verifies the content that it is - appending). Rsync skips any files that exist on the receiving side that - are not shorter than the associated file on the sending side. - It also skips any files whose size on the - sending side gets shorter during the send negotiations (rsync warns about a - "diminished" file when this happens). - - This does not interfere with the updating of a file's non-content - attributes (e.g. permissions, ownership, etc.) when the file does not need - to be transferred, nor does it affect the updating of any directories or - non-regular files. - -0. `--append-verify` - - This special copy mode works like [`--append`](#opt) except that all the - data in the file is included in the checksum verification, making it less - efficient but also potentially safer. This option **can be dangerous** if - you aren't 100% sure that all the files in the transfer are shared, growing - files. See the [`--append`](#opt) option for more details. - - Note: prior to rsync 3.0.0 (March 2008), the [`--append`](#opt) option worked like - `--append-verify`, so if you are interacting with an older rsync (or the - transfer is using a protocol prior to 30), specifying either append option - will initiate an `--append-verify` transfer. - -0. `--dirs`, `-d` - - Tell the sending side to include any directories that are encountered. - Unlike [`--recursive`](#opt), a directory's contents are not copied unless - the directory name specified is "." or ends with a trailing slash (e.g. - ".", "dir/.", "dir/", etc.). Without this option or the - [`--recursive`](#opt) option, rsync will skip all directories it encounters - (and output a message to that effect for each one). If you specify both - `--dirs` and [`--recursive`](#opt), `--recursive` takes precedence. - - The `--dirs` option is implied by the [`--files-from`](#opt) option or the - [`--list-only`](#opt) option (including an implied [`--list-only`](#opt) - usage) if [`--recursive`](#opt) wasn't specified (so that directories are - seen in the listing). Specify `--no-dirs` (or `--no-d`) if you want to - turn this off. - - See also the backward-compatibility helper option [`--old-dirs`](#opt). - -0. `--old-dirs`, `--old-d` - - This backward-compatibility helper tells rsync to use a hack of - `-r --exclude='/*/*'` to get an older remote rsync to list a single directory - without recursing. - -0. `--mkpath` - - Create all missing path components of the destination path. - - By default, rsync will create only the final component of the destination path - if it does not exist. If any other component does not exist that is an - error, as this can help to catch mistakes in the destination path specification. - With this option, rsync creates all the missing destination-path - components, just as if `mkdir -p $DEST_PATH` had been run on the receiving - side. - - When specifying a destination path, including a trailing slash ensures that - the whole path is treated as directory names to be created, even when the - file list has a single item. See the [COPYING TO A DIFFERENT NAME](#) - section for full details on how rsync decides if a final destination-path - component should be created as a directory or not. - - If you would like the newly-created destination directories to match the directories on - the sending side, you should be using [`--relative`](#opt) (`-R`) instead - of `--mkpath`. For instance, the following two commands result in the same - destination tree, but only the second command ensures that the - "some/extra/path" components match the directories on the sending side: - - > rsync -ai --mkpath host:some/extra/path/*.c some/extra/path/ - > rsync -aiR host:some/extra/path/*.c ./ - -0. `--links`, `-l` - - Add symlinks to the transferred files instead of noisily ignoring them with - a "non-regular file" warning for each symlink encountered. You can - alternatively silence the warning by specifying [`--info=nonreg0`](#opt). - - The default handling of symlinks is to recreate each symlink's unchanged - value on the receiving side. - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--copy-links`, `-L` - - The sender transforms each symlink encountered in the transfer into the - referent item, following the symlink chain to the file or directory that it - references. If a symlink chain is broken, an error is output and the file - is dropped from the transfer. - - This option supersedes any other options that affect symlinks in the - transfer, since there are no symlinks left in the transfer. - - This option does not change the handling of existing symlinks on the - receiving side. - - See the [`--keep-dirlinks`](#opt) (`-K`) if you need a symlink to a - directory to be treated as a real directory on the receiving side. - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--copy-unsafe-links` - - This tells rsync to copy the referent of symbolic links that point outside - the copied tree. Absolute symlinks are also treated like ordinary files, - and so are any symlinks in the source path itself when [`--relative`](#opt) - is used. - - A symlink is judged unsafe by a lexical test on its value, without resolving - it on disk. An absolute or empty target is always unsafe. A relative - target is unsafe if its ".." components would climb above the top of the - transfer; a ".." that appears anywhere other than as a leading prefix (an - embedded or trailing "/..") is also treated as unsafe. The top is set by - how the source is specified: a trailing slash on the source (e.g. - "/src/subdir/" copied to "/dest/subdir") makes that directory itself the - top, so a symlink may not point above it; without the trailing slash (e.g. - "/src/subdir" copied to "/dest/") the source's parent ("/src") is the top, - so "subdir" is a name inside the transfer and a relative symlink may point - to any other name within it. - - Note that safe symlinks are only copied if [`--links`](#opt) was also - specified or implied. The `--copy-unsafe-links` option has no extra effect - when combined with [`--copy-links`](#opt). - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--safe-links` - - This tells the receiving rsync to ignore any symbolic links in the transfer - which point outside the copied tree. All absolute symlinks are also - ignored. - - This option applies only to symlink entries received in the file list. It - does not control symlink components in the destination or other protected - operator-supplied paths; those are handled by the default ownership check - described under [`--insecure-links`](#opt). - - Since this ignoring is happening on the receiving side, it will still be - effective even when the sending side has munged symlinks (when it is using - [`--munge-links`](#opt)). It also affects deletions, since the file being - present in the transfer prevents any matching file on the receiver from - being deleted when the symlink is deemed to be unsafe and is skipped. - - This option has no effect unless it is combined with [`--links`](#opt) (or - an option that implies [`--links`](#opt) such as [`--archive`](#opt)), - because without [`--links`](#opt) there will not be any symlinks in the - transfer. [`--archive`](#opt) does not itself enable `--safe-links`. - [`--copy-unsafe-links`](#opt) takes precedence over `--safe-links`. - - Using this option in conjunction with [`--relative`](#opt) may give - unexpected results. - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--insecure-links` - - Allow rsync to follow symlinks owned by other users in the destination and - auxiliary paths. By default each symlink followed in these paths must be - owned by root or by the effective user running that rsync process. The rule - applies to absolute and relative paths. - - The checked directories are the destination and those named by - `--backup-dir`, `--temp-dir` (`-T`), `--partial-dir`, `--link-dest`, - `--compare-dest` and `--copy-dest`. - - The check also covers files named by `--log-file`, `--password-file`, - `--files-from`, `--include-from`, `--exclude-from`, `--write-batch`, - `--read-batch` and merge files read by `--filter`. Files supplied locally - before the transfer can live outside the transfer tree. A list or merge file - selected by a daemon client must stay inside the module. Paths selected from a - `--files-from` list and merge files read during the transfer can also be - confined by [`--confine-root`](#opt). - - This option is not needed to preserve symlink entries with [`--links`](#opt) - or [`--archive`](#opt): those entries are recreated without following their - targets. Use `--insecure-links` only when every directory along the paths - rsync will follow is trusted. - - The option is **local only**: it is not sent to the remote side of the - transfer. A remote-shell peer that needs the opt-out must set it there using - [`--rsync-path`](#opt). A daemon refuses `--insecure-links` from a client. - Its administrator can enable `insecure links = yes` for a trusted module in - [**rsyncd.conf**(5)](rsyncd.conf.5); a client cannot enable it. - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--confine-root=DIR` - - In the default symlink mode this bounds paths used for backups, partial files, - alternate-destination lookups, merge files read during the transfer and - entries selected from a [`--files-from`](#opt) list. Such a path is refused - if it resolves outside DIR, even when its symlinks are owned by root or the - running user. Explicit source arguments still select their own transfer roots. - - Files opened locally before the transfer, such as log files, password files, - batch files and file lists, are checked for symlink ownership but may reside - outside DIR. A local `--files-from` list can therefore live outside DIR even - when the paths read from it are confined. - - DIR must be absolute. `--confine-root=/` adds no restriction. - - Restricted-shell wrappers such as `rrsync` use this option to constrain - paths received over the protocol. `rrsync` sets DIR to its restricted - directory unless that directory is `/`. - - A daemon ignores this option -- its module directory is already the - boundary, and the option arrives in a client-supplied argv, so honouring it - could only widen the module. - - [`--insecure-links`](#opt) is refused alongside it. That opt-out restores - the historical open, which skips the walk that enforces the root, so the two - together would silently mean no confinement at all. - - Like [`--drop-D`](#opt), it is not forwarded to the remote side: it is meant - to be applied to one end of a connection by itself. - -0. `--munge-links` - - This option affects just one side of the transfer and tells rsync to munge - symlink values when it is receiving files or unmunge symlink values when it - is sending files. - "Munging" changes the symlink target so that the symlink cannot be followed - successfully, but allows the original target of the symlink to be - recovered. "Unmunging" reverses this process so that the symlink points to - the original target. - - This option can be enabled on the server side without the client's - knowledge, such as in an rsync daemon's configuration file or by an option - given to the rrsync (restricted rsync) script. When specified on the - client side, specify the option normally if it is the client side that - has or needs the munged symlinks, or use `-M--munge-links` to give the option - to the server when it has or needs the munged symlinks. Note that on a local - transfer, the client is the sender, so specifying the option directly - unmunges symlinks while specifying it as a remote option munges symlinks. - - This option has no effect when sent to a daemon via [`--remote-option`](#opt) - because the daemon configures whether it wants munged symlinks via its - "`munge symlinks`" parameter. - - The symlink value is munged or unmunged once it is in the transfer, so any - option that transforms symlinks into non-symlinks occurs prior to the - munging/unmunging **except** for [`--safe-links`](#opt), which is a choice - that the receiver makes, so it bases its decision on the munged/unmunged - value. This does mean that if a receiver has munging enabled, using - [`--safe-links`](#opt) will cause all symlinks to be ignored (since munging - makes them all absolute). - - The method that rsync uses to munge a symlink is to prefix its - value with the string "/rsyncd-munged/". This prevents the link from - being used, provided that the /rsyncd-munged directory does not exist. - When this option is - enabled, rsync will refuse to run if that path is a directory or a symlink - to a directory (though it only checks at startup). See also the - "munge-symlinks" python script in the support directory of the source code - for a way to munge/unmunge one or more symlinks in-place. - -0. `--copy-dirlinks`, `-k` - - This option causes the sending side to treat a symlink to a directory as - though it were a real directory. This is useful if you don't want symlinks - to non-directories to be affected, as they would be using - [`--copy-links`](#opt). - - 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`](#opt) or [`--delete`](#opt) is in effect). - - See also [`--keep-dirlinks`](#opt) for an analogous option for the - receiving side. - - `--copy-dirlinks` applies to all symlinks to directories in the source. If - you want to follow only a few specified symlinks, a trick you can use is to - pass them as additional source arguments with a trailing slash, using - [`--relative`](#opt) to make the paths match up right. For example: - - > rsync -r --relative src/./ src/./follow-me/ dest/ - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--keep-dirlinks`, `-K` - - This option causes the receiving side to treat a symlink to a directory as - though it were a real directory, but only if it matches a real directory - from the sender. Without this option, the receiver's symlink would be - deleted and replaced with a real directory. - - For example, suppose you transfer a directory "foo" that contains a file - "file", but on the receiver, "foo" is a symlink to directory "bar". Without - `--keep-dirlinks`, the receiver deletes symlink "foo", recreates it as a - directory, and receives the file into the new directory. With - `--keep-dirlinks`, the receiver keeps the symlink and "file" ends up in - "bar". - - One note of caution: if you use `--keep-dirlinks`, you must either trust all the - symlinks in the copy, or enable the [`--munge-links`](#opt) option on the - receiving side! If it is possible for an untrusted user to create their - own symlink to any real directory, the user could then (on a subsequent - copy) replace the symlink with a real directory and affect the content of - whatever directory the symlink references. For backup copies, you are - better off using something like a bind mount instead of a symlink to modify - your receiving hierarchy. - - See also [`--copy-dirlinks`](#opt) for an analogous option for the sending - side. - - See the [SYMBOLIC LINKS](#) section for multi-option info. - -0. `--hard-links`, `-H` - - This tells rsync to look for hard-linked files in the source and link - together the corresponding files on the destination. Without this option, - hard-linked files in the source are treated as though they were separate - files. - - This option does NOT necessarily ensure that the pattern of hard links on - the destination exactly matches that on the source. Cases in which the - destination may end up with extra hard links include the following: - - - If the destination contains extraneous hard-links (more linking than what - is present in the source file list), the copying algorithm will not break - them explicitly. However, if one or more of the paths have content - differences, the normal file-update process will break those extra links - (unless you are using the [`--inplace`](#opt) option). - - If you specify a [`--link-dest`](#opt) directory that contains hard - links, the linking of the destination files against the - [`--link-dest`](#opt) files can cause some paths in the destination to - become linked together due to the [`--link-dest`](#opt) associations. - - Note that rsync can only detect hard links between files that are inside - the transfer set. If rsync updates a file that has extra hard-link - connections to files outside the transfer, that linkage will be broken. If - you are tempted to use the [`--inplace`](#opt) option to avoid this breakage, be - very careful that you know how your files are being updated so that you are - certain that no unintended changes happen due to lingering hard links (and - see the [`--inplace`](#opt) option for more caveats). - - If incremental recursion is active (see [`--inc-recursive`](#opt)), rsync - may transfer a missing hard-linked file before it finds that another link - for that contents exists elsewhere in the hierarchy. This does not affect - the accuracy of the transfer (i.e. which files are hard-linked together), - just its efficiency (i.e. copying the data for a new, early copy of a - hard-linked file that could have been found later in the transfer in - another member of the hard-linked set of files). One way to avoid this - inefficiency is to disable incremental recursion using the - [`--no-inc-recursive`](#opt) option. - -0. `--perms`, `-p` - - This option causes the receiving rsync to set the destination permissions - to be the same as the source permissions. (See also the [`--chmod`](#opt) - option for a way to modify what rsync considers to be the source - permissions.) - - When this option is _off_, permissions are set as follows: - - - Existing files (including updated files) retain their existing - permissions, though the [`--executability`](#opt) option might change - just the execute permission for the file. - - New files get their "normal" permission bits set to the source file's - permissions masked with the receiving directory's default permissions - (either the receiving process's umask, or the permissions specified via - the destination directory's default ACL), and their special permission - bits disabled except in the case where a new directory inherits a setgid - bit from its parent directory. - - Thus, when `--perms` and [`--executability`](#opt) are both disabled, rsync's - behavior is the same as that of other file-copy utilities, such as **cp**(1) - and **tar**(1). - - If a filesystem refuses to apply an inferred mode to an already-open - destination, rsync may leave that mode unchanged. Path lookup failures and - refusals to apply requested modes are still reported as errors. - - In summary: to give destination files (both old and new) the source - permissions, use `--perms`. To give new files the destination-default - permissions (while leaving existing files unchanged), make sure that the - `--perms` option is off and use [`--chmod=ugo=rwX`](#opt) (which ensures - that all non-masked bits get enabled). If you'd care to make this latter - behavior easier to type, you could define a popt alias for it, such as - putting this line in the file `~/.popt` (the following defines the `-Z` - option, and includes `--no-g` to use the default group of the destination - directory): - - > rsync alias -Z --no-p --no-g --chmod=ugo=rwX - - You could then use this new option in a command such as this one: - - > rsync -avZ src/ dest/ - - (Caveat: make sure that `-a` does not follow `-Z`, or it will re-enable the - two `--no-*` options mentioned above.) - - Note that if the remote rsync is older than 2.6.7 (March 2006) and it is - the receiver, the behavior when `--perms` is off may differ from that - described above. - -0. `--executability`, `-E` - - This option causes rsync to preserve the executability or - non-executability of regular files when [`--perms`](#opt) is not enabled. - A regular file is considered to be executable if at least one 'x' is turned - on in its permissions. When an existing destination file's executability - differs from that of the corresponding source file, rsync modifies the - destination file's permissions as follows: - - - To make a file non-executable, rsync turns off all its 'x' permissions. - - To make a file executable, rsync turns on each 'x' permission that has a - corresponding 'r' permission enabled. - - If [`--perms`](#opt) is enabled, this option is ignored. - -0. `--acls`, `-A` - - This option causes rsync to update the destination ACLs to be the same as - the source ACLs. The option also implies [`--perms`](#opt). - - The source and destination systems must have compatible ACL entries for - this option to work properly. See the [`--fake-super`](#opt) option for a - way to backup and restore ACLs that are not compatible. - -0. `--xattrs`, `-X` - - This option causes rsync to update the destination extended attributes to - be the same as the source ones. - - On NetBSD rsync refuses to grow an existing extended attribute because - growing a value on NetBSD FFS can damage other attributes on the same - file. This also applies to attributes used by [`--fake-super`](#opt). - - For systems that support extended-attribute namespaces, a copy being done - by a super-user copies all namespaces except system.\*. A normal user only - copies the user.\* namespace. To be able to backup and restore non-user - namespaces as a normal user, see the [`--fake-super`](#opt) option. - - The above name filtering can be overridden by using one or more filter - options with the **x** modifier. When you specify an xattr-affecting - filter rule, rsync requires that you do your own system/user filtering, as - well as any additional filtering for what xattr names are copied and what - names are allowed to be deleted. For example, to skip the system - namespace, you could specify: - - > --filter='-x system.*' - - To skip all namespaces except the user namespace, you could specify a - negated-user match: +000. `--help` + + Print a short help page describing the options available in rsync and exit. + You can also use `-h` for `--help` when it is used without any other + options or arguments (since otherwise it means [`--human-readable`](#opt)). + +001. `--version`, `-V` + + Print the rsync version plus other info and exit. When repeated, the + information is output in a JSON format that is still fairly readable + (client side only). + + The output includes a list of compiled-in capabilities, a list of + optimizations, the default list of checksum algorithms, the default list of + compression algorithms, the default list of daemon auth digests, a link to + the rsync web site, and a few other items. + +002. `--verbose`, `-v` + + This option increases the amount of information you are given during the + transfer. By default, rsync works silently. A single `-v` will give you + information about what files are being transferred and a brief summary at + the end. Two `-v` options will give you information on what files are + being skipped and slightly more information at the end. More than two `-v` + options should only be used if you are debugging rsync. + + The end-of-run summary tells you the number of bytes sent to the remote + rsync (which is the receiving side on a local copy), the number of bytes + received from the remote host, and the average bytes per second of the + transferred data computed over the entire length of the rsync run. The + second line shows the total size (in bytes), which is the sum of all the + file sizes that rsync considered transferring. It also shows a "speedup" + value, which is a ratio of the total file size divided by the sum of the + sent and received bytes (which is really just a feel-good bigger-is-better + number). Note that these byte values can be made more (or less) + human-readable by using the [`--human-readable`](#opt) (or + `--no-human-readable`) options. + + The `-v` option is equivalent to the setting of groups + of [`--info`](#opt) and [`--debug`](#opt) options. You can choose to use + these newer options in addition to, or in place of using `--verbose`, as + any fine-grained settings override the implied settings of `-v`. Both + [`--info`](#opt) and [`--debug`](#opt) have help texts available that + tells you exactly what flags are set for each increase in verbosity + (use `--info=help` or `--debug=help` to see them). + + However, do keep in mind that a daemon's "`max verbosity`" setting will limit + how high the various individual flags can be set on the daemon + side. For instance, if the max is 2, then any info and/or debug flag that + is set to a higher value than what would be set by `-vv` will be downgraded + to the `-vv` level in the daemon's logging. + +003. `--info=FLAGS` + + This option lets you have fine-grained control over the information output + you want to see. An individual flag name may be followed by a level + number, with 0 meaning to silence that output, 1 being the default output + level, and higher numbers increasing the output of that flag (for those + that support higher levels). Use `--info=help` to see all the available + flag names, what they output, and what flag names are added for each + increase in the verbose level. Some examples: + + > ``` + > rsync -a --info=progress2 src/ dest/ + > rsync -avv --info=stats2,misc1,flist0 src/ dest/ + > ``` + + Note that `--info=name`'s output is affected by the [`--out-format`](#opt) + and [`--itemize-changes`](#opt) (`-i`) options. See those options for more + information on what is output and when. + + This option was added to 3.1.0 (released September 2013), + so an older rsync on the server side might + reject your attempts at fine-grained control. + See also the "`max verbosity`" caveat above when dealing with a daemon. + +004. `--debug=FLAGS` + + This option lets you have fine-grained control over the debug output you + want to see. An individual flag name may be followed by a level number, + with 0 meaning to silence that output, 1 being the default output level, + and higher numbers increasing the output of that flag (for those that + support higher levels). Use `--debug=help` to see all the available flag + names, what they output, and what flag names are added for each increase in + the verbose level. Some examples: + + > ``` + > rsync -avvv --debug=none src/ dest/ + > rsync -avA --del --debug=del2,acl src/ dest/ + > ``` + + Note that some debug messages will only be output when the [`--stderr=all`](#opt) + option is specified, especially those pertaining to I/O and buffer debugging. + + This option is not forwarded by the client to the server side, so that + you can specify different debug values for each side of the transfer. + This also allows you to specify debug options that are only + present in one of the rsync versions. If you want to duplicate the same + option on both sides, using brace expansion is an easy way to save you some + typing. This works in zsh and bash: + + > ``` + > rsync -aiv {-M,}--debug=del2 src/ dest/ + > ``` + +005. `--stderr=errors|all|client` + + This option controls which processes output to stderr, and whether + info messages are output to stderr rather than stdout. + The mode strings can be abbreviated down as far as a single letter. + The 3 possible choices are: + + - `errors` - (the default) causes all the rsync processes to send + errors directly to stderr, even if the process is on the remote side of + the transfer. Info messages are sent to the client side via the protocol + stream. If stderr is not available (i.e. when directly connecting with a + daemon via a socket) errors fall back to being sent via the protocol + stream. + + - `all` - causes all rsync messages (info and error) to be written + directly to stderr from all (possible) processes. This causes stderr to + become line-buffered (instead of unbuffered) and eliminates the ability to + divide up the info and error messages by file handle. For those doing + debugging or using several levels of verbosity, this option can help to + avoid clogging up the transfer stream (which should prevent any chance of + a deadlock bug hanging things up). It also allows [`--debug`](#opt) to + enable some extra I/O related messages. + + - `client` - causes all rsync messages to be sent to the client side + via the protocol stream. One client process outputs all messages, with + errors on stderr and info messages on stdout. This **was** the default + in older rsync versions, but can cause error delays when a lot of + transfer data is ahead of the messages. If you're pushing files to an + older rsync, you may want to use `--stderr=all` since that idiom has + been around for several releases. + + Rsync also accepts the old `--msgs2stderr` and `--no-msgs2stderr` + options, equivalent to the `all` and `client` settings, + respectively, and uses them when forwarding non-default settings + to the remote side, in case the remote rsync is an older version. + +006. `--quiet`, `-q` + + This option decreases the amount of information you are given during the + transfer, notably suppressing information messages from the remote server. + This option is useful when invoking rsync from cron. + +007. `--no-motd` + + This option affects the information that is output by the client at the + start of a daemon transfer. This suppresses the message-of-the-day (MOTD) + text, but it also affects the list of modules that the daemon sends in + response to the "rsync host::" request (due to a limitation in the rsync + protocol), so omit this option if you want to request the list of modules + from the daemon. + +008. `--ignore-times`, `-I` + + Normally rsync will skip any files that are already the same size and have + the same modification timestamp. This option turns off this "quick check" + behavior, causing all files to be updated. + + This option can be confusing compared to [`--ignore-existing`](#opt) and + [`--ignore-non-existing`](#opt) in that that they cause rsync to transfer + fewer files, while this option causes rsync to transfer more files. + +009. `--size-only` + + This modifies rsync's "quick check" algorithm for finding files that need + to be transferred, changing it from the default of transferring files with + either a changed size or a changed last-modified time to just looking for + files that have changed in size. This is useful when starting to use rsync + after using another mirroring system which may not preserve timestamps + exactly. + +010. `--time-only` + + For an existing regular destination file, compare only the modification + time when deciding whether to transfer its data. A matching time skips the + data even when the sizes differ. Files absent from the destination and + alternate `--link-dest`, `--copy-dest` or `--compare-dest` candidates are + not subject to this option; they keep their existing selection rules. This + can preserve a compressed local copy or a zero-byte marker that retains + the source's modification time. + + Use this only when source modification times reliably identify changes: + different content with the same time will be skipped. The option applies + to local transfers and pulls. Remote pushes are refused because the option + is not sent to the remote receiver. For an existing destination, combining + it with [`--size-only`](#opt) requires both size and time to match. + `--time-only` cannot be combined with [`--checksum`](#opt), + [`--ignore-times`](#opt), [`--hard-links`](#opt), + [`--append`](#opt) or [`--remove-source-files`](#opt). A hard-link group + could otherwise copy a skipped marker into a missing destination member. + +011. `--modify-window=NUM`, `-@` + + When comparing two timestamps, rsync treats the timestamps as being equal + if they differ by no more than the modify-window value. The default is 0, + which matches just integer seconds. If you specify a negative value (and + the receiver is at least version 3.1.3, released January 2018) + then nanoseconds will also be taken + into account. Specifying 1 is useful for copies to/from MS Windows FAT + filesystems, because FAT represents times with a 2-second resolution + (allowing times to differ from the original by up to 1 second). + + If you want all your transfers to default to comparing nanoseconds, you can + create a `~/.popt` file and put these lines in it: + + > ``` + > rsync alias -a -a@-1 + > rsync alias -t -t@-1 + > ``` + + With that as the default, you'd need to specify `--modify-window=0` (aka + `-@0`) to override it and ignore nanoseconds, e.g. if you're copying + between ext3 and ext4, or if the receiving rsync is older than 3.1.3. + +012. `--checksum`, `-c` + + This changes the way rsync checks if the files have been changed and are in + need of a transfer. Without this option, rsync uses a "quick check" that + (by default) checks if each file's size and time of last modification match + between the sender and receiver. This option changes this to compare a + checksum for each file that has a matching size. Generating the + checksums means that both sides will expend a lot of disk I/O reading all + the data in the files in the transfer, so this can slow things down + significantly (and this is prior to any reading that will be done to + transfer changed files) + + The sending side generates its checksums while it is doing the file-system + scan that builds the list of the available files. The receiver generates + its checksums when it is scanning for changed files, and will checksum any + 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. + + Note that rsync normally 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 + after-the-transfer verification has nothing to do with this option's + before-the-transfer "Does this file need to be updated?" check. + + The checksum used is auto-negotiated between the client and the server, but + can be overridden using either the [`--checksum-choice`](#opt) (`--cc`) + option or an environment variable that is discussed in that option's + section. + +013. `--archive`, `-a` + + This is equivalent to `-rlptgoD`. It is a quick way of saying you want + 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`). + + The only exception to the above equivalence is when [`--files-from`](#opt) + is specified, in which case [`-r`](#opt) is not implied. + +014. `--no-OPTION` + + You may turn off one or more implied options by prefixing the option name + with "no-". Not all positive options have a negated opposite, but a lot + do, including those that can be used to disable an implied option (e.g. + `--no-D`, `--no-perms`) or have different defaults in various circumstances + (e.g. [`--no-whole-file`](#opt), `--no-blocking-io`, `--no-dirs`). Every + valid negated option accepts both the short and the long option name after + the "no-" prefix (e.g. `--no-R` is the same as `--no-relative`). + + As an example, if you want to use [`--archive`](#opt) (`-a`) but don't want + [`--owner`](#opt) (`-o`), instead of converting `-a` into `-rlptgD`, you + can specify `-a --no-o` (aka `--archive --no-owner`). + + The order of the options is important: if you specify `--no-r -a`, the `-r` + option would end up being turned on, the opposite of `-a --no-r`. Note + also that the side-effects of the [`--files-from`](#opt) option are NOT + positional, as it affects the default state of several options and slightly + changes the meaning of [`-a`](#opt) (see the [`--files-from`](#opt) option + for more details). + +015. `--recursive`, `-r` + + This tells rsync to copy directories recursively. See also + [`--dirs`](#opt) (`-d`) for an option that allows the scanning of a single + directory. + + See the [`--inc-recursive`](#opt) option for a discussion of the + incremental recursion for creating the list of files to transfer. + +016. `--inc-recursive`, `--i-r` + + This option explicitly enables incremental recursion when scanning for + files, which is enabled by default when using the [`--recursive`](#opt) + option and both sides of the transfer are running rsync 3.0.0 + (released March 2008) or newer. + + Incremental recursion uses much less memory than non-incremental, while + also beginning the transfer more quickly (since it doesn't need to scan the + entire transfer hierarchy before it starts transferring files). If no + recursion is enabled in the source files, this option has no effect. + + Some options require rsync to know the full file list, so these options + disable the incremental recursion mode. These include: + + - [`--delete-before`](#opt) (the old default of [`--delete`](#opt)) + - [`--delete-after`](#opt) + - [`--prune-empty-dirs`](#opt) + - [`--delay-updates`](#opt) + - [`--delay-symlinks`](#opt) + + In order to be compatible with incremental recursion, + [`--delete-during`](#opt) is the default delete mode for [`--delete`](#opt). + + One side-effect of incremental recursion is that any missing + sub-directories inside a recursively-scanned directory are (by default) + created prior to recursing into the sub-directories. This earlier creation point + (compared to a non-incremental recursion) allows rsync to then set the + modify time of the finished directory right away (without having to delay + that until a bunch of recursive copying has finished). However, these + early directories don't yet have their completed mode, mtime, or ownership + set -- they have more restrictive rights until the subdirectory's copying + actually begins. This early-creation idiom can be avoided by using the + [`--omit-dir-times`](#opt) option. + + Incremental recursion can be disabled using the + [`--no-inc-recursive`](#opt) (`--no-i-r`) option. + +017. `--no-inc-recursive`, `--no-i-r` + + Disables the incremental recursion algorithm of the + [`--recursive`](#opt) option. This makes rsync scan the full file list + before it begins to transfer files. See [`--inc-recursive`](#opt) for more + info. + +018. `--relative`, `-R` + + Use relative paths. This means that the full path names specified on the + command line are sent to the server rather than just the last parts of the + filenames. This is particularly useful when you want to send several + different directories at the same time. For example, this command: + + > ``` + > rsync -av /foo/bar/baz.c remote:/tmp/ + > ``` + + would create a file named baz.c in /tmp/ on the remote machine. If instead + you used + + > ``` + > rsync -avR /foo/bar/baz.c remote:/tmp/ + > ``` + + then a file named /tmp/foo/bar/baz.c would be created on the remote + machine, preserving its full path. These extra path elements are called + "implied directories" (i.e. the "foo" and the "foo/bar" directories in the + above example). + + Rsync always sends these implied directories as + real directories in the file list, even if a path element is really a + symlink on the sending side. This prevents some really unexpected behaviors + when copying the full path of a file that has a symlink + in its path. If you want to duplicate a server-side symlink, include both + the symlink via its path, and the referent directory via its real path. If + you're dealing with an older rsync on the sending side, you may need to use + the [`--no-implied-dirs`](#opt) option. + + It is also possible to limit the amount of path information that is sent as + implied directories for each path you specify. With a modern rsync on the + sending side (beginning with 2.6.7, released March 2006), + you can insert a dot and a slash into + the source path, like this: + + > ``` + > rsync -avR /foo/./bar/baz.c remote:/tmp/ + > ``` + + That would create /tmp/bar/baz.c on the receiving machine. (Note that the dot + must be followed by a slash, so "/foo/." would not be abbreviated.) For + older rsync versions, you would need to change directory to limit the source + path. For example, when pushing files: + + > ``` + > (cd /foo; rsync -avR bar/baz.c remote:/tmp/) + > ``` + + (Note that the parentheses put the two commands into a sub-shell, so that the + "cd" command doesn't remain in effect for future commands.) If you're + pulling files from an older rsync, use this idiom (but only for a + non-daemon transfer): + + > ``` + > rsync -avR --rsync-path="cd /foo; rsync" \ + > remote:bar/baz.c /tmp/ + > ``` + +019. `--no-implied-dirs` + + This option affects the default behavior of the [`--relative`](#opt) option. When + it is specified, the attributes of the implied directories from the source + names are not included in the transfer. This means that the corresponding + path elements on the destination system are left unchanged if they exist, + and any missing implied directories are created with default attributes. + This even allows these implied path elements to have big differences, such + as being a symlink to a directory on the receiving side. + + For instance, if a command-line argument or a files-from entry told rsync to + transfer the file "path/foo/file", the directories "path" and "path/foo" + are implied when [`--relative`](#opt) is used. If "path/foo" is a symlink to "bar" + on the destination system, the receiving rsync would ordinarily delete + "path/foo", recreate it as a directory, and receive the file into the new + directory. With `--no-implied-dirs`, the receiving rsync leaves the + existing "path/foo" symlink in place and follows it, so the file is written + through the symlink and ends up in "path/bar". Note the security + implication: a pre-existing in-tree symlink-to-directory on the receiving + side will redirect where the file is written, so only use + `--no-implied-dirs` when you trust the destination's existing path elements. + (A symlink whose target is absolute or escapes the destination tree is still + refused by the secure path resolver rather than followed.) Another way to + accomplish this link preservation is to use the [`--keep-dirlinks`](#opt) + option (which will also affect symlinks to directories in the rest of the + transfer). + + When pulling files from an rsync older than 3.0.0 (March 2008), + you may need to use this + option if the sending side has a symlink in the path you request and you + wish the implied directories to be transferred as normal directories. + +020. `--backup`, `-b` + + With this option, preexisting destination files are renamed as each file is + transferred or deleted (that is, each file to be deleted or overwritten + gets renamed instead). You can control where the backup file goes and + what (if any) suffix gets appended using the [`--backup-dir`](#opt) and + [`--suffix`](#opt) options. + + If you don't specify [`--backup-dir`](#opt): + + 1. the [`--omit-dir-times`](#opt) option will be forced on + 2. the use of [`--delete`](#opt) (without [`--delete-excluded`](#opt)), + causes rsync to add a "protect" [filter-rule](#FILTER_RULES) for the + backup suffix to the end of all your existing filters that looks like + this: `-f "P *~"`. This rule prevents previously backed-up files from + being deleted. + + Note that if you are supplying your own filter rules, you may need to + manually insert your own exclude/protect rule somewhere higher up in the + list so that it has a high enough priority to be effective (e.g. if your + rules specify a trailing inclusion/exclusion of `*`, the auto-added rule + would never be reached). + +021. `--backup-dir=DIR` + + This implies the [`--backup`](#opt) option, and tells rsync to store all + backups in the specified directory on the receiving side. This can be used + for incremental backups. You can additionally specify a backup suffix + using the [`--suffix`](#opt) option (otherwise the files backed up in the + specified directory will keep their original filenames). + + Note that if you specify a relative path, the backup directory will be + relative to the destination directory, so you probably want to specify + either an absolute path or a path that starts with "../". If an rsync + daemon is the receiver, the backup directory cannot go outside the module's + path hierarchy, so take extra care not to delete or copy into the + backup directory inadvertently. + +022. `--suffix=SUFFIX` + + This option allows you to override the default backup suffix used with the + [`--backup`](#opt) (`-b`) option. The default suffix is a `~` if no + [`--backup-dir`](#opt) was specified, otherwise it is an empty string. + +023. `--update`, `-u` + + This forces rsync to skip any files which exist on the destination and have + a modified time that is newer than the source file. (If an existing + destination file has a modification time equal to the source file's, it + will be updated if the sizes are different.) + + Note that this does not affect the copying of directories, symlinks, or other + special files. Also, a difference of object type between the sender and + receiver is always considered to be important enough for an update, no + matter what date is on the objects. For example, if the source has a + directory where the destination has a file, the transfer would occur + regardless of the timestamps. + + This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any + exclude side effects. + + A caution for those that choose to combine [`--inplace`](#opt) with + `--update`: an interrupted transfer will leave behind a partial file on the + receiving side that has a very recent modified time, so re-running the + transfer will probably **not** continue the interrupted file. As such, it + is usually best to avoid combining this with[ `--inplace`](#opt) unless you + have implemented manual steps to handle any interrupted in-progress files. + +024. `--inplace` + + This option changes how rsync transfers a file when its data needs to be + updated: instead of the default method of creating a new copy of the file + and moving it into place when it is complete, rsync instead writes the + updated data directly to the destination file. + + This has several effects: + + - Hard links are not broken. This means the new data will be visible + through other hard links to the destination file. Moreover, attempts to + copy differing source files onto a multiply-linked destination file will + result in a "tug of war" with the destination data changing back and + forth. + - In-use binaries cannot be updated (either the OS will prevent this from + happening, or binaries that attempt to swap-in their data will misbehave + or crash). + - The file's data will be in an inconsistent state during the transfer and + will be left that way if the transfer is interrupted or if an update + fails. + - A file that rsync cannot write to cannot be updated. While a super user + can update any file, a normal user needs to be granted write permission + for the open of the file for writing to be successful. + - The efficiency of rsync's delta-transfer algorithm may be reduced if some + data in the destination file is overwritten before it can be copied to a + position later in the file. This does not apply if you use [`--backup`](#opt), + since rsync is smart enough to use the backup file as the basis file for + the transfer. + + WARNING: you should not use this option to update files that are being + accessed by others, so be careful when choosing to use this for a copy. + + This option is useful for transferring large files with block-based changes + or appended data, and also on systems that are disk bound, not network + bound. It can also help keep a copy-on-write filesystem snapshot from + diverging the entire contents of a file that only has minor changes. + + The option implies [`--partial`](#opt) (since an interrupted transfer does + not delete the file), but conflicts with [`--partial-dir`](#opt) and + [`--delay-updates`](#opt). + +025. `--append` + + This special copy mode is only applicable to update files that are + known to be growing larger, that is, where any existing content on the receiving side + is also known to be the same as the content on the sender. The use of + `--append` **can be dangerous** if you aren't 100% sure that all the files + in the transfer are shared, growing files. You should thus use filter + rules to ensure that you weed out any files that do not fit this criteria. + + Rsync updates these growing file in-place without verifying any of the + existing content in the file (it only verifies the content that it is + appending). Rsync skips any files that exist on the receiving side that + are not shorter than the associated file on the sending side. + It also skips any files whose size on the + sending side gets shorter during the send negotiations (rsync warns about a + "diminished" file when this happens). + + This does not interfere with the updating of a file's non-content + attributes (e.g. permissions, ownership, etc.) when the file does not need + to be transferred, nor does it affect the updating of any directories or + non-regular files. + +026. `--append-verify` + + This special copy mode works like [`--append`](#opt) except that all the + data in the file is included in the checksum verification, making it less + efficient but also potentially safer. This option **can be dangerous** if + you aren't 100% sure that all the files in the transfer are shared, growing + files. See the [`--append`](#opt) option for more details. + + Note: prior to rsync 3.0.0 (March 2008), the [`--append`](#opt) option worked like + `--append-verify`, so if you are interacting with an older rsync (or the + transfer is using a protocol prior to 30), specifying either append option + will initiate an `--append-verify` transfer. + +027. `--dirs`, `-d` + + Tell the sending side to include any directories that are encountered. + Unlike [`--recursive`](#opt), a directory's contents are not copied unless + the directory name specified is "." or ends with a trailing slash (e.g. + ".", "dir/.", "dir/", etc.). Without this option or the + [`--recursive`](#opt) option, rsync will skip all directories it encounters + (and output a message to that effect for each one). If you specify both + `--dirs` and [`--recursive`](#opt), `--recursive` takes precedence. + + The `--dirs` option is implied by the [`--files-from`](#opt) option or the + [`--list-only`](#opt) option (including an implied [`--list-only`](#opt) + usage) if [`--recursive`](#opt) wasn't specified (so that directories are + seen in the listing). Specify `--no-dirs` (or `--no-d`) if you want to + turn this off. + + See also the backward-compatibility helper option [`--old-dirs`](#opt). + +028. `--old-dirs`, `--old-d` + + This backward-compatibility helper tells rsync to use a hack of + `-r --exclude='/*/*'` to get an older remote rsync to list a single directory + without recursing. + +029. `--mkpath` + + Create all missing path components of the destination path. + + By default, rsync will create only the final component of the destination path + if it does not exist. If any other component does not exist that is an + error, as this can help to catch mistakes in the destination path specification. + With this option, rsync creates all the missing destination-path + components, just as if `mkdir -p $DEST_PATH` had been run on the receiving + side. + + When specifying a destination path, including a trailing slash ensures that + the whole path is treated as directory names to be created, even when the + file list has a single item. See the [COPYING TO A DIFFERENT NAME](#) + section for full details on how rsync decides if a final destination-path + component should be created as a directory or not. + + If you would like the newly-created destination directories to match the directories on + the sending side, you should be using [`--relative`](#opt) (`-R`) instead + of `--mkpath`. For instance, the following two commands result in the same + destination tree, but only the second command ensures that the + "some/extra/path" components match the directories on the sending side: + + > ``` + > rsync -ai --mkpath host:some/extra/path/*.c some/extra/path/ + > rsync -aiR host:some/extra/path/*.c ./ + > ``` + +030. `--links`, `-l` + + Add symlinks to the transferred files instead of noisily ignoring them with + a "non-regular file" warning for each symlink encountered. You can + alternatively silence the warning by specifying [`--info=nonreg0`](#opt). + + The default handling of symlinks is to recreate each symlink's unchanged + value on the receiving side. + + See the [SYMBOLIC LINKS](#) section for multi-option info. + +031. `--copy-links`, `-L` + + The sender transforms each symlink encountered in the transfer into the + referent item, following the symlink chain to the file or directory that it + references. If a symlink chain is broken, an error is output and the file + is dropped from the transfer. + + This option supersedes any other options that affect symlinks in the + transfer, since there are no symlinks left in the transfer. + + This option does not change the handling of existing symlinks on the + receiving side. + + See the [`--keep-dirlinks`](#opt) (`-K`) if you need a symlink to a + directory to be treated as a real directory on the receiving side. + + See the [SYMBOLIC LINKS](#) section for multi-option info. - > --filter='-x! user.*' +032. `--copy-unsafe-links` + + This tells rsync to copy the referent of symbolic links that point outside + the copied tree. Absolute symlinks are also treated like ordinary files, + and so are any symlinks in the source path itself when [`--relative`](#opt) + is used. + + A symlink is judged unsafe by a lexical test on its value, without resolving + it on disk. An absolute or empty target is always unsafe. A relative + target is unsafe if its ".." components would climb above the top of the + transfer; a ".." that appears anywhere other than as a leading prefix (an + embedded or trailing "/..") is also treated as unsafe. The top is set by + how the source is specified: a trailing slash on the source (e.g. + "/src/subdir/" copied to "/dest/subdir") makes that directory itself the + top, so a symlink may not point above it; without the trailing slash (e.g. + "/src/subdir" copied to "/dest/") the source's parent ("/src") is the top, + so "subdir" is a name inside the transfer and a relative symlink may point + to any other name within it. - To prevent any attributes from being deleted, you could specify a - receiver-only rule that excludes all names: + Note that safe symlinks are only copied if [`--links`](#opt) was also + specified or implied. The `--copy-unsafe-links` option has no extra effect + when combined with [`--copy-links`](#opt). + + See the [SYMBOLIC LINKS](#) section for multi-option info. - > --filter='-xr *' +033. `--safe-links` - Note that the `-X` option does not copy rsync's special xattr values (e.g. - 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). + This tells the receiving rsync to ignore any symbolic links in the transfer + which point outside the copied tree. All absolute symlinks are also + ignored. + + This option applies only to symlink entries received in the file list. It + does not control symlink components in the destination or other protected + operator-supplied paths; those are handled by the default ownership check + described under [`--insecure-links`](#opt). + + Since this ignoring is happening on the receiving side, it will still be + effective even when the sending side has munged symlinks (when it is using + [`--munge-links`](#opt)). It also affects deletions, since the file being + present in the transfer prevents any matching file on the receiver from + being deleted when the symlink is deemed to be unsafe and is skipped. + + This option has no effect unless it is combined with [`--links`](#opt) (or + an option that implies [`--links`](#opt) such as [`--archive`](#opt)), + because without [`--links`](#opt) there will not be any symlinks in the + transfer. [`--archive`](#opt) does not itself enable `--safe-links`. + [`--copy-unsafe-links`](#opt) takes precedence over `--safe-links`. + + Using this option in conjunction with [`--relative`](#opt) may give + unexpected results. + + See the [SYMBOLIC LINKS](#) section for multi-option info. + +034. `--insecure-links` + + Allow rsync to follow symlinks owned by other users in the destination and + auxiliary paths. By default each symlink followed in these paths must be + owned by root or by the effective user running that rsync process. The rule + applies to absolute and relative paths. + + The checked directories are the destination and those named by + `--backup-dir`, `--temp-dir` (`-T`), `--partial-dir`, `--link-dest`, + `--compare-dest` and `--copy-dest`. + + The check also covers files named by `--log-file`, `--password-file`, + `--files-from`, `--include-from`, `--exclude-from`, `--write-batch`, + `--read-batch` and merge files read by `--filter`. Files supplied locally + before the transfer can live outside the transfer tree. A list or merge file + selected by a daemon client must stay inside the module. Paths selected from a + `--files-from` list and merge files read during the transfer can also be + confined by [`--confine-root`](#opt). + + This option is not needed to preserve symlink entries with [`--links`](#opt) + or [`--archive`](#opt): those entries are recreated without following their + targets. Use `--insecure-links` only when every directory along the paths + rsync will follow is trusted. + + The option is **local only**: it is not sent to the remote side of the + transfer. A remote-shell peer that needs the opt-out must set it there using + [`--rsync-path`](#opt). A daemon refuses `--insecure-links` from a client. + Its administrator can enable `insecure links = yes` for a trusted module in + [**rsyncd.conf**(5)](rsyncd.conf.5); a client cannot enable it. + + See the [SYMBOLIC LINKS](#) section for multi-option info. + +035. `--confine-root=DIR` + + In the default symlink mode this bounds paths used for backups, partial files, + alternate-destination lookups, merge files read during the transfer and + entries selected from a [`--files-from`](#opt) list. Such a path is refused + if it resolves outside DIR, even when its symlinks are owned by root or the + running user. Explicit source arguments still select their own transfer roots. + + Files opened locally before the transfer, such as log files, password files, + batch files and file lists, are checked for symlink ownership but may reside + outside DIR. A local `--files-from` list can therefore live outside DIR even + when the paths read from it are confined. + + DIR must be absolute. `--confine-root=/` adds no restriction. + + Restricted-shell wrappers such as `rrsync` use this option to constrain + paths received over the protocol. `rrsync` sets DIR to its restricted + directory unless that directory is `/`. + + A daemon ignores this option -- its module directory is already the + boundary, and the option arrives in a client-supplied argv, so honouring it + could only widen the module. + + [`--insecure-links`](#opt) is refused alongside it. That opt-out restores + the historical open, which skips the walk that enforces the root, so the two + together would silently mean no confinement at all. + + Like [`--drop-D`](#opt), it is not forwarded to the remote side: it is meant + to be applied to one end of a connection by itself. + +036. `--munge-links` + + This option affects just one side of the transfer and tells rsync to munge + symlink values when it is receiving files or unmunge symlink values when it + is sending files. + "Munging" changes the symlink target so that the symlink cannot be followed + successfully, but allows the original target of the symlink to be + recovered. "Unmunging" reverses this process so that the symlink points to + the original target. + + This option can be enabled on the server side without the client's + knowledge, such as in an rsync daemon's configuration file or by an option + given to the rrsync (restricted rsync) script. When specified on the + client side, specify the option normally if it is the client side that + has or needs the munged symlinks, or use `-M--munge-links` to give the option + to the server when it has or needs the munged symlinks. Note that on a local + transfer, the client is the sender, so specifying the option directly + unmunges symlinks while specifying it as a remote option munges symlinks. + + This option has no effect when sent to a daemon via [`--remote-option`](#opt) + because the daemon configures whether it wants munged symlinks via its + "`munge symlinks`" parameter. + + The symlink value is munged or unmunged once it is in the transfer, so any + option that transforms symlinks into non-symlinks occurs prior to the + munging/unmunging **except** for [`--safe-links`](#opt), which is a choice + that the receiver makes, so it bases its decision on the munged/unmunged + value. This does mean that if a receiver has munging enabled, using + [`--safe-links`](#opt) will cause all symlinks to be ignored (since munging + makes them all absolute). + + The method that rsync uses to munge a symlink is to prefix its + value with the string "/rsyncd-munged/". This prevents the link from + being used, provided that the /rsyncd-munged directory does not exist. + When this option is + enabled, rsync will refuse to run if that path is a directory or a symlink + to a directory (though it only checks at startup). See also the + "munge-symlinks" python script in the support directory of the source code + for a way to munge/unmunge one or more symlinks in-place. + +037. `--copy-dirlinks`, `-k` + + This option causes the sending side to treat a symlink to a directory as + though it were a real directory. This is useful if you don't want symlinks + to non-directories to be affected, as they would be using + [`--copy-links`](#opt). + + 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`](#opt) or [`--delete`](#opt) is in effect). + + See also [`--keep-dirlinks`](#opt) for an analogous option for the + receiving side. + + `--copy-dirlinks` applies to all symlinks to directories in the source. If + you want to follow only a few specified symlinks, a trick you can use is to + pass them as additional source arguments with a trailing slash, using + [`--relative`](#opt) to make the paths match up right. For example: + + > ``` + > rsync -r --relative src/./ src/./follow-me/ dest/ + > ``` + + See the [SYMBOLIC LINKS](#) section for multi-option info. + +038. `--keep-dirlinks`, `-K` + + This option causes the receiving side to treat a symlink to a directory as + though it were a real directory, but only if it matches a real directory + from the sender. Without this option, the receiver's symlink would be + deleted and replaced with a real directory. + + For example, suppose you transfer a directory "foo" that contains a file + "file", but on the receiver, "foo" is a symlink to directory "bar". Without + `--keep-dirlinks`, the receiver deletes symlink "foo", recreates it as a + directory, and receives the file into the new directory. With + `--keep-dirlinks`, the receiver keeps the symlink and "file" ends up in + "bar". + + One note of caution: if you use `--keep-dirlinks`, you must either trust all the + symlinks in the copy, or enable the [`--munge-links`](#opt) option on the + receiving side! If it is possible for an untrusted user to create their + own symlink to any real directory, the user could then (on a subsequent + copy) replace the symlink with a real directory and affect the content of + whatever directory the symlink references. For backup copies, you are + better off using something like a bind mount instead of a symlink to modify + your receiving hierarchy. + + See also [`--copy-dirlinks`](#opt) for an analogous option for the sending + side. + + See the [SYMBOLIC LINKS](#) section for multi-option info. + +039. `--hard-links`, `-H` + + This tells rsync to look for hard-linked files in the source and link + together the corresponding files on the destination. Without this option, + hard-linked files in the source are treated as though they were separate + files. + + This option does NOT necessarily ensure that the pattern of hard links on + the destination exactly matches that on the source. Cases in which the + destination may end up with extra hard links include the following: + + - If the destination contains extraneous hard-links (more linking than what + is present in the source file list), the copying algorithm will not break + them explicitly. However, if one or more of the paths have content + differences, the normal file-update process will break those extra links + (unless you are using the [`--inplace`](#opt) option). + - If you specify a [`--link-dest`](#opt) directory that contains hard + links, the linking of the destination files against the + [`--link-dest`](#opt) files can cause some paths in the destination to + become linked together due to the [`--link-dest`](#opt) associations. + + Note that rsync can only detect hard links between files that are inside + the transfer set. If rsync updates a file that has extra hard-link + connections to files outside the transfer, that linkage will be broken. If + you are tempted to use the [`--inplace`](#opt) option to avoid this breakage, be + very careful that you know how your files are being updated so that you are + certain that no unintended changes happen due to lingering hard links (and + see the [`--inplace`](#opt) option for more caveats). + + If incremental recursion is active (see [`--inc-recursive`](#opt)), rsync + may transfer a missing hard-linked file before it finds that another link + for that contents exists elsewhere in the hierarchy. This does not affect + the accuracy of the transfer (i.e. which files are hard-linked together), + just its efficiency (i.e. copying the data for a new, early copy of a + hard-linked file that could have been found later in the transfer in + another member of the hard-linked set of files). One way to avoid this + inefficiency is to disable incremental recursion using the + [`--no-inc-recursive`](#opt) option. + +040. `--perms`, `-p` + + This option causes the receiving rsync to set the destination permissions + to be the same as the source permissions. (See also the [`--chmod`](#opt) + option for a way to modify what rsync considers to be the source + permissions.) + + When this option is _off_, permissions are set as follows: + + - Existing files (including updated files) retain their existing + permissions, though the [`--executability`](#opt) option might change + just the execute permission for the file. + - New files get their "normal" permission bits set to the source file's + permissions masked with the receiving directory's default permissions + (either the receiving process's umask, or the permissions specified via + the destination directory's default ACL), and their special permission + bits disabled except in the case where a new directory inherits a setgid + bit from its parent directory. + + Thus, when `--perms` and [`--executability`](#opt) are both disabled, rsync's + behavior is the same as that of other file-copy utilities, such as **cp**(1) + and **tar**(1). + + If a filesystem refuses to apply an inferred mode to an already-open + destination, rsync may leave that mode unchanged. Path lookup failures and + refusals to apply requested modes are still reported as errors. + + In summary: to give destination files (both old and new) the source + permissions, use `--perms`. To give new files the destination-default + permissions (while leaving existing files unchanged), make sure that the + `--perms` option is off and use [`--chmod=ugo=rwX`](#opt) (which ensures + that all non-masked bits get enabled). If you'd care to make this latter + behavior easier to type, you could define a popt alias for it, such as + putting this line in the file `~/.popt` (the following defines the `-Z` + option, and includes `--no-g` to use the default group of the destination + directory): + + > ``` + > rsync alias -Z --no-p --no-g --chmod=ugo=rwX + > ``` + + You could then use this new option in a command such as this one: + + > ``` + > rsync -avZ src/ dest/ + > ``` + + (Caveat: make sure that `-a` does not follow `-Z`, or it will re-enable the + two `--no-*` options mentioned above.) + + Note that if the remote rsync is older than 2.6.7 (March 2006) and it is + the receiver, the behavior when `--perms` is off may differ from that + described above. + +041. `--executability`, `-E` + + This option causes rsync to preserve the executability or + non-executability of regular files when [`--perms`](#opt) is not enabled. + A regular file is considered to be executable if at least one 'x' is turned + on in its permissions. When an existing destination file's executability + differs from that of the corresponding source file, rsync modifies the + destination file's permissions as follows: + + - To make a file non-executable, rsync turns off all its 'x' permissions. + - To make a file executable, rsync turns on each 'x' permission that has a + corresponding 'r' permission enabled. + + If [`--perms`](#opt) is enabled, this option is ignored. + +042. `--acls`, `-A` + + This option causes rsync to update the destination ACLs to be the same as + the source ACLs. The option also implies [`--perms`](#opt). + + The source and destination systems must have compatible ACL entries for + this option to work properly. See the [`--fake-super`](#opt) option for a + way to backup and restore ACLs that are not compatible. + +043. `--xattrs`, `-X` + + This option causes rsync to update the destination extended attributes to + be the same as the source ones. + + On NetBSD rsync refuses to grow an existing extended attribute because + growing a value on NetBSD FFS can damage other attributes on the same + file. This also applies to attributes used by [`--fake-super`](#opt). + + For systems that support extended-attribute namespaces, a copy being done + by a super-user copies all namespaces except system.\*. A normal user only + copies the user.\* namespace. To be able to backup and restore non-user + namespaces as a normal user, see the [`--fake-super`](#opt) option. + + The above name filtering can be overridden by using one or more filter + options with the **x** modifier. When you specify an xattr-affecting + filter rule, rsync requires that you do your own system/user filtering, as + well as any additional filtering for what xattr names are copied and what + names are allowed to be deleted. For example, to skip the system + namespace, you could specify: + + > ``` + > --filter='-x system.*' + > ``` + + To skip all namespaces except the user namespace, you could specify a + negated-user match: + + > ``` + > --filter='-x! user.*' + > ``` + + To prevent any attributes from being deleted, you could specify a + receiver-only rule that excludes all names: + + > ``` + > --filter='-xr *' + > ``` -0. `--chmod=CHMOD` + Note that the `-X` option does not copy rsync's special xattr values (e.g. + 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). - This option tells rsync to apply one or more comma-separated "chmod" modes - to the permission of the files in the transfer. The resulting value is - treated as though it were the permissions that the sending side supplied - for the file, which means that this option can seem to have no effect on - existing files if [`--perms`](#opt) is not enabled. +044. `--chmod=CHMOD` - In addition to the normal parsing rules specified in the **chmod**(1) - manpage, you can specify an item that should only apply to a directory by - prefixing it with a 'D', or specify an item that should only apply to a - file by prefixing it with a 'F'. For example, the following will ensure - that all directories get marked set-gid, that no files are other-writable, - that both are user-writable and group-writable, and that both have - consistent executability across all bits: + This option tells rsync to apply one or more comma-separated "chmod" modes + to the permission of the files in the transfer. The resulting value is + treated as though it were the permissions that the sending side supplied + for the file, which means that this option can seem to have no effect on + existing files if [`--perms`](#opt) is not enabled. - > --chmod=Dg+s,ug+w,Fo-w,+X + In addition to the normal parsing rules specified in the **chmod**(1) + manpage, you can specify an item that should only apply to a directory by + prefixing it with a 'D', or specify an item that should only apply to a + file by prefixing it with a 'F'. For example, the following will ensure + that all directories get marked set-gid, that no files are other-writable, + that both are user-writable and group-writable, and that both have + consistent executability across all bits: - Using octal mode numbers is also allowed: + > ``` + > --chmod=Dg+s,ug+w,Fo-w,+X + > ``` - > --chmod=D2775,F664 + Using octal mode numbers is also allowed: - Symbolic permission-copy modes are also allowed, such as `g=u`, `o=g` or - `g-o`. A permission-copy item may copy from one class only (`u`, `g` or - `o`) and cannot be combined with `rwxXst` permission letters in the same - item. Use comma-separated items when you need both behaviours, such as - `g=o,o=`. + > ``` + > --chmod=D2775,F664 + > ``` - A permission-copy `=` item also clears the special bit for each destination - class it updates (`u` clears setuid, `g` clears setgid, and `o` clears - sticky), matching GNU **chmod** behaviour. + Symbolic permission-copy modes are also allowed, such as `g=u`, `o=g` or + `g-o`. A permission-copy item may copy from one class only (`u`, `g` or + `o`) and cannot be combined with `rwxXst` permission letters in the same + item. Use comma-separated items when you need both behaviours, such as + `g=o,o=`. - It is also legal to specify multiple `--chmod` options, as each additional - option is just appended to the list of changes to make. + A permission-copy `=` item also clears the special bit for each destination + class it updates (`u` clears setuid, `g` clears setgid, and `o` clears + sticky), matching GNU **chmod** behaviour. - See the [`--perms`](#opt) and [`--executability`](#opt) options for how the - resulting permission value can be applied to the files in the transfer. + It is also legal to specify multiple `--chmod` options, as each additional + option is just appended to the list of changes to make. -0. `--owner`, `-o` + See the [`--perms`](#opt) and [`--executability`](#opt) options for how the + resulting permission value can be applied to the files in the transfer. - This option causes rsync to set the owner of each destination filesystem - object (file, directory, etc.) to be the - same as the source object, but only if the receiving rsync is being run as - the super-user (see also the [`--super`](#opt) and [`--fake-super`](#opt) - options). Without this option, the owner of new and/or transferred files - are set to the invoking user on the receiving side. +045. `--owner`, `-o` - The preservation of ownership will associate matching names by default, but - may fall back to using the ID number in some circumstances (see also the - [`--numeric-ids`](#opt) option for a full discussion). + This option causes rsync to set the owner of each destination filesystem + object (file, directory, etc.) to be the + same as the source object, but only if the receiving rsync is being run as + the super-user (see also the [`--super`](#opt) and [`--fake-super`](#opt) + options). Without this option, the owner of new and/or transferred files + are set to the invoking user on the receiving side. -0. `--group`, `-g` + The preservation of ownership will associate matching names by default, but + may fall back to using the ID number in some circumstances (see also the + [`--numeric-ids`](#opt) option for a full discussion). - This option causes rsync to set the group of each destination filesystem - object (file, directory, etc.) to be the - same as the source object. If the receiving program is not running as the - super-user (or if `--no-super` was specified), only groups that the - invoking user on the receiving side is a member of will be preserved. - Without this option, the group is set to the default group of the invoking - user on the receiving side. +046. `--group`, `-g` - The preservation of group information will associate matching names by - default, but may fall back to using the ID number in some circumstances - (see also the [`--numeric-ids`](#opt) option for a full discussion). + This option causes rsync to set the group of each destination filesystem + object (file, directory, etc.) to be the + same as the source object. If the receiving program is not running as the + super-user (or if `--no-super` was specified), only groups that the + invoking user on the receiving side is a member of will be preserved. + Without this option, the group is set to the default group of the invoking + user on the receiving side. -0. `--devices` + The preservation of group information will associate matching names by + default, but may fall back to using the ID number in some circumstances + (see also the [`--numeric-ids`](#opt) option for a full discussion). - This option causes rsync to transfer character and block device files to - the remote system to recreate these devices. This option has no effect if - the receiving rsync is not run as the super-user and neither - [`--super`](#opt) nor [`--fake-super`](#opt) is in effect. +047. `--devices` - When a device file is not created, rsync generates the usual "non-regular - file" warning. You can silence the warning by specifying - [`--info=nonreg0`](#opt). + This option causes rsync to transfer character and block device files to + the remote system to recreate these devices. This option has no effect if + the receiving rsync is not run as the super-user and neither + [`--super`](#opt) nor [`--fake-super`](#opt) is in effect. -0. `--specials` + When a device file is not created, rsync generates the usual "non-regular + file" warning. You can silence the warning by specifying + [`--info=nonreg0`](#opt). - This option causes rsync to transfer special files, such as named sockets - and fifos. Creating these files does not normally require super-user - privileges. Use [`--drop-D`](#opt) to make the receiving rsync refuse to - create them regardless of what the transfer requested. +048. `--specials` - By default, rsync generates a "non-regular file" warning for each special - file encountered when this option is not set. You can silence the warning - by specifying [`--info=nonreg0`](#opt). + This option causes rsync to transfer special files, such as named sockets + and fifos. Creating these files does not normally require super-user + privileges. Use [`--drop-D`](#opt) to make the receiving rsync refuse to + create them regardless of what the transfer requested. -0. `-D` + By default, rsync generates a "non-regular file" warning for each special + file encountered when this option is not set. You can silence the warning + by specifying [`--info=nonreg0`](#opt). - The `-D` option is equivalent to "[`--devices`](#opt) - [`--specials`](#opt)". +049. `-D` -0. `--drop-D` + The `-D` option is equivalent to "[`--devices`](#opt) + [`--specials`](#opt)". - This tells the receiving rsync to refuse to create device files and - special files, whatever the transfer requested. Entries for them are - skipped exactly as if [`-D`](#opt) had not been used, with the usual - "non-regular file" warning. +050. `--drop-D` - This differs from `--no-D` in that it changes only what is created, not - how the file list is encoded. `--no-D` also turns off the rdev fields - that devices and special files carry on the wire, so applying it to one - end of a connection alone leaves the two ends disagreeing about the - encoding and the transfer fails. `--drop-D` can therefore be added on the - receiving side by itself, which is what it exists for -- the `rrsync` - wrapper uses it to stop a restricted directory's clients creating device - and special files in it. Nodes already present there are left alone. + This tells the receiving rsync to refuse to create device files and + special files, whatever the transfer requested. Entries for them are + skipped exactly as if [`-D`](#opt) had not been used, with the usual + "non-regular file" warning. - Because it only withholds creation, it has no effect on a sending rsync. + This differs from `--no-D` in that it changes only what is created, not + how the file list is encoded. `--no-D` also turns off the rdev fields + that devices and special files carry on the wire, so applying it to one + end of a connection alone leaves the two ends disagreeing about the + encoding and the transfer fails. `--drop-D` can therefore be added on the + receiving side by itself, which is what it exists for -- the `rrsync` + wrapper uses it to stop a restricted directory's clients creating device + and special files in it. Nodes already present there are left alone. - This option is not forwarded to the remote side, since its whole purpose - is to be applied to one end of a connection by itself. It therefore - affects the rsync process you give it to and no other: on a local copy, or - on the receiving end of a `--server` invocation such as the one rrsync - builds. To set it on a remote receiver from the command line, send it - explicitly with [`--remote-option`](#opt) (`-M`): + Because it only withholds creation, it has no effect on a sending rsync. - > rsync -av -M--drop-D src/ host:dest/ + This option is not forwarded to the remote side, since its whole purpose + is to be applied to one end of a connection by itself. It therefore + affects the rsync process you give it to and no other: on a local copy, or + on the receiving end of a `--server` invocation such as the one rrsync + builds. To set it on a remote receiver from the command line, send it + explicitly with [`--remote-option`](#opt) (`-M`): - Passing a plain `--drop-D` to a push affects only the local sender, where - it does nothing. + > ``` + > rsync -av -M--drop-D src/ host:dest/ + > ``` -0. `--copy-devices` + Passing a plain `--drop-D` to a push affects only the local sender, where + it does nothing. - This tells rsync to treat a device on the sending side as a regular file, - allowing it to be copied to a normal destination file (or another device - if `--write-devices` was also specified). +051. `--copy-devices` - This option is refused by default by an rsync daemon. + This tells rsync to treat a device on the sending side as a regular file, + allowing it to be copied to a normal destination file (or another device + if `--write-devices` was also specified). -0. `--write-devices` + This option is refused by default by an rsync daemon. - This tells rsync to treat a device on the receiving side as a regular file, - allowing the writing of file data into a device. +052. `--write-devices` - This option implies the [`--inplace`](#opt) option. + This tells rsync to treat a device on the receiving side as a regular file, + allowing the writing of file data into a device. - Be careful using this, as you should know what devices are present on the - receiving side of the transfer, especially when running rsync as root. + This option implies the [`--inplace`](#opt) option. - This option is refused by default by an rsync daemon. + Be careful using this, as you should know what devices are present on the + receiving side of the transfer, especially when running rsync as root. + + This option is refused by default by an rsync daemon. -0. `--times`, `-t` +053. `--times`, `-t` - This tells rsync to set the modification times of the destination files - (including directories, symlinks, devices, etc.) to be the same as the - source files. - Note that if this option is not used, - the optimization that excludes files that have not been modified cannot be - effective; in other words, a missing `-t` (or [`-a`](#opt)) will cause the - next transfer to behave as if it used [`--ignore-times`](#opt) (`-I`), - causing all files to be updated. (Although rsync's delta-transfer algorithm - will make the update fairly efficient if the files haven't actually - changed, you're much better off using `-t`.) + This tells rsync to set the modification times of the destination files + (including directories, symlinks, devices, etc.) to be the same as the + source files. + Note that if this option is not used, + the optimization that excludes files that have not been modified cannot be + effective; in other words, a missing `-t` (or [`-a`](#opt)) will cause the + next transfer to behave as if it used [`--ignore-times`](#opt) (`-I`), + causing all files to be updated. (Although rsync's delta-transfer algorithm + will make the update fairly efficient if the files haven't actually + changed, you're much better off using `-t`.) - If the negotiated protocol is older than 30 -- usually because the remote - rsync is older than 3.0.0 (March 2008), but also if [`--protocol`](#opt) - forces it -- the range of modification times that can be conveyed is - restricted. If you - have files dated older than 1970, make sure your rsync executables are - upgraded so that the full range of dates can be conveyed. + If the negotiated protocol is older than 30 -- usually because the remote + rsync is older than 3.0.0 (March 2008), but also if [`--protocol`](#opt) + forces it -- the range of modification times that can be conveyed is + restricted. If you + have files dated older than 1970, make sure your rsync executables are + upgraded so that the full range of dates can be conveyed. -0. `--atimes`, `-U` +054. `--atimes`, `-U` - This tells rsync to set the access (use) times of the destination files to - the same value as the source files. + This tells rsync to set the access (use) times of the destination files to + the same value as the source files. - If repeated, it also sets the [`--open-noatime`](#opt) option, which can help you - to make the sending and receiving systems have the same access times on the - transferred files without needing to run rsync an extra time after a file - is transferred. + If repeated, it also sets the [`--open-noatime`](#opt) option, which can help you + to make the sending and receiving systems have the same access times on the + transferred files without needing to run rsync an extra time after a file + is transferred. -0. `--open-noatime` +055. `--open-noatime` - This tells rsync to open files with the O_NOATIME flag (on systems that - support it) to avoid changing the access time of the files that are being - transferred. If your OS does not support the O_NOATIME flag then rsync - will silently ignore this option. Note also that some filesystems are - mounted to avoid updating the atime on read access even without the - O_NOATIME flag being set. + This tells rsync to open files with the O_NOATIME flag (on systems that + support it) to avoid changing the access time of the files that are being + transferred. If your OS does not support the O_NOATIME flag then rsync + will silently ignore this option. Note also that some filesystems are + mounted to avoid updating the atime on read access even without the + O_NOATIME flag being set. -0. `--crtimes`, `-N,` +056. `--crtimes`, `-N,` - This tells rsync to set the create times (newness) of the destination - files to the same value as the source files. Your OS & filesystem must - support the setting of arbitrary creation (birth) times for this option - to be supported. + This tells rsync to set the create times (newness) of the destination + files to the same value as the source files. Your OS & filesystem must + support the setting of arbitrary creation (birth) times for this option + to be supported. + +057. `--omit-dir-times`, `-O` -0. `--omit-dir-times`, `-O` + This tells rsync to omit directories when it is preserving modification, + access, and create times. If NFS is sharing the directories on the receiving + side, it is a good idea to use `-O`. This option is inferred if you use + [`--backup`](#opt) without [`--backup-dir`](#opt). + + This option also has the side-effect of avoiding early creation of missing + sub-directories when incremental recursion is enabled, as discussed in the + [`--inc-recursive`](#opt) section. + +058. `--omit-link-times`, `-J` + + This tells rsync to omit symlinks when it is preserving modification, + access, and create times. + +059. `--super` + + This tells the receiving side to attempt super-user activities even if the + receiving rsync wasn't run by the super-user. These activities include: + preserving users via the [`--owner`](#opt) option, preserving all groups + (not just the current user's groups) via the [`--group`](#opt) option, and + copying devices via the [`--devices`](#opt) option. This is useful for + systems that allow such activities without being the super-user, and also + for ensuring that you will get errors if the receiving side isn't being run + as the super-user. To turn off super-user activities, the super-user can + use `--no-super`. + +060. `--fake-super` - This tells rsync to omit directories when it is preserving modification, - access, and create times. If NFS is sharing the directories on the receiving - side, it is a good idea to use `-O`. This option is inferred if you use - [`--backup`](#opt) without [`--backup-dir`](#opt). - - This option also has the side-effect of avoiding early creation of missing - sub-directories when incremental recursion is enabled, as discussed in the - [`--inc-recursive`](#opt) section. + When this option is enabled, rsync simulates super-user activities by + saving/restoring the privileged attributes via special extended attributes + that are attached to each file (as needed). This includes the file's owner + and group (if it is not the default), the file's device info (device & + special files are created as empty text files), and any permission bits + that we won't allow to be set on the real file (e.g. the real file gets + u-s,g-s,o-t for safety) or that would limit the owner's access (since the + real super-user can always access/change a file, the files we create can + always be accessed/changed by the creating user). This option also handles + ACLs (if [`--acls`](#opt) was specified) and non-user extended attributes + (if [`--xattrs`](#opt) was specified). + + This is a good way to backup data without using a super-user, and to store + ACLs from incompatible systems. + + The `--fake-super` option only affects the side where the option is used. + To affect the remote side of a remote-shell connection, use the + [`--remote-option`](#opt) (`-M`) option: + + > ``` + > rsync -av -M--fake-super /src/ host:/dest/ + > ``` + + For a local copy, this option affects both the source and the destination. + If you wish a local copy to enable this option just for the destination + files, specify `-M--fake-super`. If you wish a local copy to enable this + option just for the source files, combine `--fake-super` with `-M--super`. + + This option is overridden by both [`--super`](#opt) and `--no-super`. + + See also the [`fake super`](rsyncd.conf.5#fake_super) setting in the + daemon's rsyncd.conf file. + +061. `--sparse`, `-S` + + Try to handle sparse files efficiently so they take up less space on the + destination. This relies on the destination filesystem supporting sparse + files, that is, files where some parts of the file don't have corresponding + disk blocks allocated for them because they contain all zero bytes. + + If combined with [`--inplace`](#opt) the file created may not end up with + sparse blocks (depending on the filesystem type and kernel version), + unless the [`--whole-file`](#opt) option is also in effect. Note that versions + of rsync older than 3.1.3 (January 2018) will reject the combination of + `--sparse` and [`--inplace`](#opt). + +062. `--preallocate` + + This tells the receiver to allocate each destination file to its eventual + size before writing data to the file. Rsync will only use the real + filesystem-level preallocation support provided by Linux's **fallocate**(2) + system call or Cygwin's **posix_fallocate**(3), not the slow glibc + implementation that writes a null byte into each block. + + Without this option, larger files may not be entirely contiguous on the + filesystem, but with this option rsync will probably copy more slowly. If + the destination is not an extent-supporting filesystem (such as ext4, xfs, + NTFS, etc.), this option may have no positive effect at all. + + If combined with [`--sparse`](#opt), the file will only have sparse blocks + (as opposed to allocated sequences of null bytes) if the kernel version and + filesystem type support creating holes in the allocated data. + +063. `--dry-run`, `-n` + + This makes rsync perform a trial run that doesn't make any changes, and + produces mostly the same output as a real run. It is most commonly used + in combination with the [`--verbose`](#opt) (`-v`) and/or + [`--itemize-changes`](#opt) (`-i`) options to see what an rsync command is + going to do before one actually runs it. + + The output of [`--itemize-changes`](#opt) is supposed to be exactly the + same on a dry run and a subsequent real run (barring external changes to + the source or destination + and system call failures); if it isn't, that's a bug. Other output should + be mostly unchanged, but may differ in some areas. Notably, a dry run does + not send the actual data for file transfers, so [`--progress`](#opt) has no + effect, the "bytes sent", "bytes received", "literal data", and "matched + data" statistics are too small, and the "speedup" value is equivalent to a + run where no file transfers were needed. + +064. `--whole-file`, `-W` + + This option disables rsync's delta-transfer algorithm, causing the whole of + all transferred files to be sent. The transfer may be faster if this + option is used when the bandwidth between the source and destination + machines is higher than the bandwidth to disk (especially when the "disk" + is actually a networked filesystem). This is the default when both the + source and destination are specified as local paths, but only if no + batch-writing option is in effect. + +065. `--no-whole-file`, `--no-W` + + Disable whole-file updating when it is enabled by default for a local + transfer. This usually slows rsync down, but it can be useful if you are + trying to minimize the writes to the destination file (if combined with + [`--inplace`](#opt)) or for testing the checksum-based update algorithm. + + See also the [`--whole-file`](#opt) option. + +066. `--checksum-choice=STR`, `--cc=STR` + + This option overrides the checksum algorithms. If one algorithm name is + specified, it is used for both the transfer checksums and the pre-transfer + checksums (note that the pre-transfer checksum is only performed if + [`--checksum`](#opt) is specified). If two + comma-separated names are supplied, the first name affects the transfer + checksums, and the second name affects the pre-transfer checksums. + + The checksum options that you may be able to use are: + + - `auto` (the default automatic choice) + - `xxh128` + - `xxh3` + - `xxh64` (aka `xxhash`) + - `sha3-512` + - `sha3-384` + - `sha3-256` + - `sha256` + - `md5` + - `md4` + - `sha1` + - `none` + + The `sha3-*` and `sha256` choices require an rsync built with OpenSSL + support and a libcrypto that provides the chosen digest. They are not + offered during default negotiation. Use `--checksum-choice` or include the + chosen digest in both peers' [`RSYNC_CHECKSUM_LIST`](#). + + Run `rsync --version` to see the checksum choices available in your build. + + If "none" is specified for the first (or only) name, the [`--whole-file`](#opt) + option is forced on and no checksum verification is performed on the + transferred data. If "none" is specified for the second (or only) name, + the [`--checksum`](#opt) option cannot be used. + + The "auto" option is the default, where rsync bases its algorithm choice on + a negotiation between the client and the server as follows: + + When both sides of the transfer are at least 3.2.0 (released June 2020), + each side chooses its own + most-preferred algorithm that also appears in the peer's list. Both sides + order their lists strongest-first, so they converge on the strongest mutual + choice. If no common checksum choice is found, rsync exits with + an error. If the remote rsync is too old to support checksum negotiation, + a value is chosen based on the protocol version (which chooses between MD5 + and various flavors of MD4 based on protocol age). + + The default order can be customized by setting the environment variable + [`RSYNC_CHECKSUM_LIST`](#) to a space-separated list of acceptable checksum + names. If the string contains a "`&`" character, it is separated into the + "client string & server string", otherwise the same string applies to both. + If the string (or string portion) contains no non-whitespace characters, + the default checksum list is used. This method does not allow you to + specify the transfer checksum separately from the pre-transfer checksum, + and it discards "auto" and all unknown checksum names. A list with only + invalid names results in a failed negotiation. + + The use of the `--checksum-choice` option overrides this environment list. + +067. `--one-file-system`, `-x` + + This tells rsync to avoid crossing a filesystem boundary when recursing. + This does not limit the user's ability to specify items to copy from + multiple filesystems, just rsync's recursion through the hierarchy of each + directory that the user specified, and also the analogous recursion on the + receiving side during deletion. Also keep in mind that rsync treats a + "bind" mount to the same device as being on the same filesystem. + + If this option is repeated, rsync omits all mount-point directories from + the copy. Otherwise, it includes an empty directory at each mount-point it + encounters (using the attributes of the mounted directory because those of + the underlying mount-point directory are inaccessible). + + If rsync has been told to collapse symlinks (via [`--copy-links`](#opt) or + [`--copy-unsafe-links`](#opt)), a symlink to a directory on another device + is treated like a mount-point. Symlinks to non-directories are unaffected + by this option. + +068. `--ignore-non-existing`, `--existing` + + This tells rsync to skip creating files (including directories) that do not + exist yet on the destination. If this option is combined with the + [`--ignore-existing`](#opt) option, no files will be updated (which can be + useful if all you want to do is delete extraneous files). + + This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any + exclude side effects. + +069. `--ignore-existing` + + This tells rsync to skip updating files that already exist on the + destination (this does _not_ ignore existing directories, or nothing would + get done). See also [`--ignore-non-existing`](#opt). + + This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any + exclude side effects. + + This option can be useful for those doing backups using the + [`--link-dest`](#opt) option when they need to continue a backup run that + got interrupted. Since a [`--link-dest`](#opt) run is copied into a new + directory hierarchy (when it is used properly), using \[`--ignore-existing` + will ensure that the already-handled files don't get tweaked (which avoids + a change in permissions on the hard-linked files). This does mean that + this option is only looking at the existing files in the destination + hierarchy itself. + + When [`--info=skip2`](#opt) is used rsync will output "FILENAME exists + (INFO)" messages where the INFO indicates one of "type change", "sum + change" (requires [`-c`](#opt)), "file change" (based on the quick check), + "attr change", or "uptodate". Using [`--info=skip1`](#opt) (which is also + implied by 2 [`-v`](#opt) options) outputs the exists message without the + INFO suffix. + +070. `--remove-source-files` + + This tells rsync to remove from the sending side the files (meaning + non-directories) that are a part of the transfer and have been successfully + duplicated on the receiving side. + + Note that you should only use this option on source files that are + quiescent. If you are using this to move files that show up in a + particular directory over to another host, make sure that the finished + files get renamed into the source directory, not directly written into it, + so that rsync can't possibly transfer a file that is not yet fully written. + If you can't first write the files into a different directory, you should + use a naming idiom that lets rsync avoid transferring files that are not + yet finished (e.g. name the file "foo.new" when it is written, rename it to + "foo" when it is done, and then use the option [`--exclude='*.new'`](#opt) + for the rsync transfer). + + Rsync will skip the sender-side removal, and output an + error, if the file's size or modify time has not stayed unchanged. + + If the copy is local, rsync will ensure that the sender does + not remove a file the receiver just verified, such as when the user + accidentally makes the source and destination directory the same path. + +071. `--delete` + + This tells rsync to delete extraneous files from the receiving side (those + that don't exist on the sending side), but only for the directories that are + being synchronized. You must have asked rsync to send the whole directory + (e.g. "`dir`" or "`dir/`"), rather than asking for all the files in a + directory via a wildcard (e.g. "`dir/*`"), since the wildcard is + expanded by the shell and + rsync thus gets a request to transfer individual files, not the files' + parent directory. Files that are excluded from the transfer are also + excluded from being deleted unless you use the [`--delete-excluded`](#opt) + option or mark the rules as only matching on the sending side (see the + include/exclude modifiers in the [FILTER RULES](#) section). + + This option has no effect unless either [`--recursive`](#opt) or + [`--dirs`](#opt) (`-d`) is enabled. In the latter case, deletions only + occur in directories whose contents are being copied. + + This option can be dangerous if used incorrectly! It is a very good idea to + first try a run using the [`--dry-run`](#opt) (`-n`) option to see what + files are going to be deleted. + + If the sending side detects any I/O errors, then the deletion of any files + at the destination will be automatically disabled. This is to prevent + temporary filesystem failures (such as NFS errors) on the sending side from + causing a massive deletion of files on the destination. You can override + this with the [`--ignore-errors`](#opt) option. + + The `--delete` option may be combined with one of the --delete-WHEN options + without conflict, as well as [`--delete-excluded`](#opt). However, if none + of the `--delete-WHEN` options are specified, rsync will choose the + [`--delete-during`](#opt) algorithm when talking to rsync 3.0.0 (March + 2008\) or newer, + or the [`--delete-before`](#opt) algorithm when talking to an older rsync. + See also [`--delete-delay`](#opt) and [`--delete-after`](#opt). + +072. `--delete-before` + + Request that the file-deletions on the receiving side be done before the + transfer starts. See [`--delete`](#opt) (which is implied) for more + details on file-deletion. + + Deleting before the transfer is helpful if the filesystem is tight for + space and removing extraneous files would help to make the transfer + possible. However, it does introduce a delay before the start of the + transfer, and this delay might cause the transfer to timeout (if + [`--timeout`](#opt) was specified). It also forces rsync to use the old, + non-incremental recursion algorithm that requires rsync to scan all the + files in the transfer into memory at once (see [`--recursive`](#opt)). + +073. `--delete-during`, `--del` + + Request that the file-deletions on the receiving side be done incrementally + as the transfer happens. The per-directory delete scan is done right + before each directory is checked for updates, so it behaves like a more + efficient [`--delete-before`](#opt), including doing the deletions prior to + any per-directory filter files being updated. + See [`--delete`](#opt) (which is implied) for more + details on file-deletion. + +074. `--delete-delay` + + Request that the file-deletions on the receiving side be computed during + the transfer (like [`--delete-during`](#opt)), and then removed after the + transfer completes. This is useful when combined with + [`--delay-updates`](#opt) and/or [`--fuzzy`](#opt), and is more efficient + than using [`--delete-after`](#opt), but can behave differently, since + [`--delete-after`](#opt) computes the deletions in a separate pass after + all updates are done. If the number of removed files overflows an + internal buffer, a temporary file will be created on the receiving side to + hold the names (it is removed while open, so you shouldn't see it during + the transfer). If the creation of the temporary file fails, rsync will try + to fall back to using [`--delete-after`](#opt) (which it cannot do if + [`--recursive`](#opt) is doing an incremental scan). See + [`--delete`](#opt) (which is implied) for more details on file-deletion. + +075. `--delete-after` + + Request that the file-deletions on the receiving side be done after the + transfer has completed. This is useful if you are sending new + per-directory merge files as a part of the transfer and you want their + exclusions to take effect for the delete phase of the current transfer. It + also forces rsync to use the old, non-incremental recursion algorithm that + requires rsync to scan all the files in the transfer into memory at once + (see [`--recursive`](#opt)). See [`--delete`](#opt) (which is implied) for + more details on file-deletion. + + See also the [`--delete-delay`](#opt) option that might be a faster choice + for those that just want the deletions to occur at the end of the transfer. + +076. `--delete-excluded` + + This option turns any unqualified exclude/include rules into server-side + rules that do not affect the receiver's deletions. + + By default, an exclude or include has both a server-side effect (to "hide" + and "show" files when building the server's file list) and a receiver-side + effect (to "protect" and "risk" files when deletions are occurring). Any + rule that has no modifier to specify what sides it is executed on will be + instead treated as if it were a server-side rule only, avoiding any + "protect" effects of the rules. + + A rule can still apply to both sides even with this option specified if the + rule is given both the sender & receiver modifier letters (e.g., `-f'-sr foo'`). Receiver-side protect/risk rules can also be explicitly specified + to limit the deletions. This saves you from having to edit a bunch of + `-f'- foo'` rules into `-f'-s foo'` (aka `-f'H foo'`) rules (not to mention + the corresponding includes). + + See the [FILTER RULES](#) section for more information. See + [`--delete`](#opt) (which is implied) for more details on deletion. + +077. `--ignore-missing-args` + + When rsync is first processing the explicitly requested source files (e.g. + command-line arguments or [`--files-from`](#opt) entries), it is normally + an error if the file cannot be found. This option suppresses that error, + and does not try to transfer the file. This does not affect subsequent + vanished-file errors if a file was initially found to be present and later + is no longer there. + +078. `--delete-missing-args` + + This option takes the behavior of the (implied) + [`--ignore-missing-args`](#opt) option a step farther: each missing argument + 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 + independent of any other type of delete processing. + + The missing source files are represented by special file-list entries which + display as a "`*missing`" entry in the [`--list-only`](#opt) output. + +079. `--ignore-errors` + + Tells [`--delete`](#opt) to go ahead and delete files even when there are + I/O errors. + +080. `--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`](#opt) for details). + +081. `--max-delete=NUM` + + This tells rsync not to delete more than NUM files or directories. If that + limit is exceeded, all further deletions are skipped through the end of the + transfer. At the end, rsync outputs a warning (including a count of the + skipped deletions) and exits with an error code of 25 (unless some more + important error condition also occurred). + + You may specify `--max-delete=0` to be warned + about any extraneous files in the destination without removing any of them. + CAUTION: a client rsync older than 3.0.0 (March 2008) treats + `--max-delete=0` as unlimited, so use `--max-delete=-1` if the command + might be run by such an old rsync. (A 3.0.0 or newer client protects an + older remote by forwarding the option as `--max-delete=-1`.) + +082. `--max-size=SIZE` + + This tells rsync to avoid transferring any file that is larger than the + specified SIZE. A numeric value can be suffixed with a string to indicate + the numeric units or left unqualified to specify bytes, and the numeric + value can have a fractional part, such as `--max-size=1.5m`. + + A period always denotes the decimal point. The locale's decimal separator + is also accepted. Rsync scales the number to bytes and rounds down before + applying a final `+1` or `-1`. + + This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any + exclude side effects. + + The first letter of a units string can be `B` (bytes), `K` (kilo), `M` + (mega), `G` (giga), `T` (tera), or `P` (peta). If the string is a single + char or has "ib" added to it (e.g. "G" or "GiB") then the units are + multiples of 1024. If you use a two-letter suffix that ends with a "B" + (e.g. "kb") then you get units that are multiples of 1000. The string's + letters can be any mix of upper and lower-case that you want to use. + + Finally, if the string ends with either "+1" or "-1", it is offset by one + byte in the indicated direction. The largest possible value is usually + `8192P-1`. + + Examples: `--max-size=1.5mb-1` is 1499999 bytes, and `--max-size=2g+1` is + 2147483649 bytes. + +083. `--min-size=SIZE` + + This tells rsync to avoid transferring any file that is smaller than the + specified SIZE, which can help in not transferring small, junk files. See + the [`--max-size`](#opt) option for a description of SIZE and other info. + +084. `--max-alloc=SIZE` + + By default rsync limits an individual malloc/realloc to about 1GB in size. + For most people this limit works just fine and prevents a protocol error + causing rsync to request massive amounts of memory. However, if you have + many millions of files in a transfer, a large amount of server memory, and + you don't want to split up your transfer into multiple parts, you can + increase the per-allocation limit to something larger, allowing rsync to + consume more memory. + + Keep in mind that this is not a limit on the total size of allocated + memory. It is a sanity-check value for each individual allocation. + + See the [`--max-size`](#opt) option for a description of how SIZE can be + specified. The default suffix if none is given is bytes. + + A value of 0 is an easy way to say "the largest limit this build supports". + It resolves to the same ceiling an explicit SIZE is checked against, so it + is never a higher limit than one you could have typed out yourself. + + Because the option is passed to the remote rsync as you wrote it, each side + resolves a 0 against its own maximum. That makes 0 the only spelling that + is correct for both ends of a transfer between hosts of different word + sizes: a literal value large enough to be useful on a 64-bit client is + rejected as too large by a 32-bit daemon. + + A value of 0 was accepted beginning in 3.2.3 and rejected in 3.5.0; the + release after 3.5.0 accepts it again. + + A daemon administrator who does not want clients to change the configured + allocation ceiling can set `refuse options = max-alloc` in the module's + `rsyncd.conf`. This refuses every client-supplied value, including 0. + + You can set a default value using the environment variable + [`RSYNC_MAX_ALLOC`](#) using the same SIZE values as supported by this + option. If the remote rsync doesn't understand the `--max-alloc` option, + you can override an environmental value by specifying `--max-alloc=1g`, + which will make rsync avoid sending the option to the remote side (because + "1G" is the default). + +085. `--block-size=SIZE`, `-B` + + This forces the block size used in rsync's delta-transfer algorithm to a + fixed value. It is normally selected based on the size of each file being + updated. See the technical report for details. + + The SIZE can be specified with a suffix as detailed in + the [`--max-size`](#opt) option. + +086. `--rsh=COMMAND`, `-e` + + This option allows you to choose an alternative remote shell program to use + for communication between the local and remote copies of rsync. Typically, + rsync is configured to use ssh by default. + + If this option is used with `[user@]host::module/path`, then the remote + shell _COMMAND_ will be used to run an rsync daemon on the remote host, and + all data will be transmitted through that remote shell connection, rather + than through a direct socket connection to a running rsync daemon on the + remote host. See the [USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL + CONNECTION](#) section above. + + The [`RSYNC_PORT`](#) environment variable will + be set when a daemon connection is being made via a remote-shell + connection. It is set to 0 if the default daemon port is being assumed, or + it is set to the value of the rsync port that was specified via either the + [`--port`](#opt) option or a non-empty port value in an `rsync://` URL (for + example `rsync://host.example.com:984`). This is useful if the program + being run is not actually rsync but rather something such as an SSL or + stunnel helper script; the script can use `RSYNC_PORT` to determine whether + it should connect to a default or alternate port. + + Command-line arguments are permitted in COMMAND provided that COMMAND is + presented to rsync as a single argument. You must use spaces (not tabs or + other whitespace) to separate the command and arguments from each other, and you + can use single- and/or double-quotes to preserve spaces in an argument (but + not backslashes). Note that doubling a single-quote inside a single-quoted + string gives you a single-quote; likewise for double-quotes (though you + need to pay attention to which quotes your shell is parsing and which + quotes rsync is parsing). Some examples: + + > ``` + > -e 'ssh -p 2234' + > -e 'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"' + > ``` + + (Note that ssh users can alternately customize site-specific connect + options in their .ssh/config file.) + + You can also choose the remote shell program using the [`RSYNC_RSH`](#) + environment variable, which accepts the same range of values as `-e`. + + See also the [`--blocking-io`](#opt) option which is affected by this + option. + +087. `--rsync-path=PROGRAM` + + Use this to specify what program is to be run on the remote machine to + start-up rsync. Often used when rsync is not in the default remote-shell's + path (e.g. `--rsync-path=/usr/local/bin/rsync`). Note that PROGRAM is run + with the help of a shell, so it can be any program, script, or command + sequence you'd care to run, so long as it does not corrupt the standard-in + & standard-out that rsync is using to communicate. + + One tricky example is to set a different default directory on the remote + machine for use with the [`--relative`](#opt) option. For instance: + + > ``` + > rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/ + > ``` + +088. `--remote-option=OPTION`, `-M` + + This option is used for more advanced situations where you want certain + effects to be limited to one side of the transfer only. For instance, if + you want to pass [`--log-file=FILE`](#opt) and [`--fake-super`](#opt) to + the remote system, specify it like this: + + > ``` + > rsync -av -M --log-file=foo -M--fake-super src/ dest/ + > ``` + + If you want to have an option affect only the local side of a transfer when + it normally affects both sides, send its negation to the remote side. Like + this: + + > ``` + > rsync -av -x -M--no-x src/ dest/ + > ``` + + Be cautious using this, as it is possible to toggle an option that will + cause rsync to have a different idea about what data to expect next over + the socket, and that will make it fail in a cryptic fashion. + + Note that you should use a separate `-M` option for each remote option you + want to pass. On older rsync versions, the presence of any spaces in the + remote-option argument could cause it to be split into separate remote arguments, but + this requires the use of [`--old-args`](#opt) in a modern rsync. + + When performing a local transfer, the "local" side is the sender and the + "remote" side is the receiver. + + Note some versions of the popt option-parsing library have a bug in them + that prevents you from using an adjacent argument with an equal in it next to a + short option letter (e.g. `-M--log-file=/tmp/foo`). If this bug affects + your version of popt, you can use the version of popt that is included with + rsync. + +089. `--cvs-exclude`, `-C` + + This is a useful shorthand for excluding a broad range of files that you + often don't want to transfer between systems. It uses a similar algorithm + to CVS to determine if a file should be ignored. + + The exclude list is initialized to exclude the following items (these + initial items are marked as perishable -- see the [FILTER RULES](#) + section): + + > `RCS` + > `SCCS` + > `CVS` + > `CVS.adm` + > `RCSLOG` + > `cvslog.*` + > `tags` + > `TAGS` + > `.make.state` + > `.nse_depinfo` + > `*~` + > `#*` + > `.#*` + > `,*` + > `_$*` + > `*$` + > `*.old` + > `*.bak` + > `*.BAK` + > `*.orig` + > `*.rej` + > `.del-*` + > `*.a` + > `*.olb` + > `*.o` + > `*.obj` + > `*.so` + > `*.exe` + > `*.Z` + > `*.elc` + > `*.ln` + > `core` + > `.svn/` + > `.git/` + > `.hg/` + > `.bzr/` + + then, files listed in a $HOME/.cvsignore are added to the list and any + files listed in the CVSIGNORE environment variable (all cvsignore names are + delimited by whitespace). + + Finally, any file is ignored if it is in the same directory as a .cvsignore + file and matches one of the patterns listed therein. Unlike rsync's + filter/exclude files, these patterns are split on whitespace. See the + **cvs**(1) manual for more information. + + If you're combining `-C` with your own [`--filter`](#opt) rules, you should + note that these CVS excludes are appended at the end of your own rules, + regardless of where the `-C` was placed on the command-line. This makes + them a lower priority than any rules you specified explicitly. If you want + to control where these CVS excludes get inserted into your filter rules, + you should omit the `-C` as a command-line option and use a combination of + [`--filter=:C`](#opt) and [`--filter=-C`](#opt) (either on your + command-line or by putting the ":C" and "-C" rules into a filter file with + your other rules). The first option turns on the per-directory scanning + for the .cvsignore file. The second option does a one-time import of the + CVS excludes mentioned above. + +090. `--filter=RULE`, `-f` + + This option allows you to add rules to selectively exclude certain files + from the list of files to be transferred. This is most useful in + combination with a recursive transfer. + + You may use as many `--filter` options on the command line as you like to + build up the list of files to exclude. If the filter contains whitespace, + be sure to quote it so that the shell gives the rule to rsync as a single + argument. You can use an underscore instead of a space to separate a rule + from its argument. + + See the [FILTER RULES](#) section for detailed information on this option. + +091. `-F` + + The `-F` option is a shorthand for adding two [`--filter`](#opt) rules to + your command. The first time it is used is a shorthand for this rule: + + > ``` + > --filter='dir-merge /.rsync-filter' + > ``` + + This tells rsync to look for per-directory .rsync-filter files that have + been sprinkled through the hierarchy and use their rules to filter the + files in the transfer. If `-F` is repeated, it is a shorthand for this + rule: + + > ``` + > --filter='exclude .rsync-filter' + > ``` + + This filters out the .rsync-filter files themselves from the transfer. + + See the [FILTER RULES](#) section for detailed information on how these + options work. + +092. `--exclude=PATTERN` + + This option is a simplified form of the [`--filter`](#opt) option that + specifies an exclude rule and does not allow the full rule-parsing syntax + of normal filter rules. This is equivalent to specifying `-f'- PATTERN'`. + + See the [FILTER RULES](#) section for detailed information on this option. + +093. `--exclude-from=FILE` + + This option is related to the [`--exclude`](#opt) option, but it specifies + a FILE that contains exclude patterns (one per line). Blank lines in the + file are ignored, as are whole-line comments that start with '`;`' or '`#`' + (filename rules that contain those characters are unaffected). + + If a line begins with "`- `" (dash, space) or "`+ `" (plus, space), then + the type of rule is being explicitly specified as an exclude or an include + (respectively). Any rules without such a prefix are taken to be an exclude. + + If a line consists of just "`!`", then the current filter rules are cleared + before adding any further rules. + + If _FILE_ is '`-`', the list will be read from standard input. + +094. `--include=PATTERN` + + This option is a simplified form of the [`--filter`](#opt) option that + specifies an include rule and does not allow the full rule-parsing syntax + of normal filter rules. This is equivalent to specifying `-f'+ PATTERN'`. + + See the [FILTER RULES](#) section for detailed information on this option. + +095. `--include-from=FILE` + + This option is related to the [`--include`](#opt) option, but it specifies + a FILE that contains include patterns (one per line). Blank lines in the + file are ignored, as are whole-line comments that start with '`;`' or '`#`' + (filename rules that contain those characters are unaffected). + + If a line begins with "`- `" (dash, space) or "`+ `" (plus, space), then + the type of rule is being explicitly specified as an exclude or an include + (respectively). Any rules without such a prefix are taken to be an include. + + If a line consists of just "`!`", then the current filter rules are cleared + before adding any further rules. + + If _FILE_ is '`-`', the list will be read from standard input. + +096. `--files-from=FILE` + + Using this option tells rsync to read the exact list of files to transfer + from FILE (or standard input if FILE is '`-`'). It also + tweaks the default behavior of rsync to make transferring just the + specified files and directories easier: + + - The [`--relative`](#opt) (`-R`) option is implied, which preserves the + path information that is specified for each item in the file (use + `--no-relative` or `--no-R` if you want to turn that off). + - The [`--dirs`](#opt) (`-d`) option is implied, which will create + directories specified in the list on the destination rather than noisily + skipping them (use `--no-dirs` or `--no-d` if you want to turn that off). + - The [`--archive`](#opt) (`-a`) option's behavior does not imply + [`--recursive`](#opt) (`-r`), so specify it explicitly, if you want it. + - These side-effects change the default state of rsync, so the position of + the `--files-from` option on the command-line has no bearing on how other + options are parsed (e.g. [`-a`](#opt) works the same before or after + `--files-from`, as does `--no-R` and all other options). + + With one source argument and no destination, rsync lists the selected + source entries instead of copying them. + + Listing individual files with `--files-from` does not make unlisted + siblings eligible for deletion. The [`--delete`](#opt) option only removes + entries from directories whose complete contents are being synchronised, + so list the directory itself and enable recursion if that deletion scope is + intended. + + The filenames that are read from the FILE are all relative to the source + directory: any leading slash is removed, and ".." components are resolved away so + an entry cannot rise above the source directory -- e.g. "../foo" is taken as "foo" + within the source directory. An entry that still contains an active ".." after + that resolution (one that cannot be collapsed) is rejected with an error. + Blank entries are ignored, as are whole-entry comments that start with '`;`' + or '`#`'. For example, take this command: + + > ``` + > rsync -a --files-from=/tmp/foo /usr remote:/backup + > ``` + + If /tmp/foo contains the string "bin" (or even "/bin"), the /usr/bin + directory will be created as /backup/bin on the remote host. If it + contains "bin/" (note the trailing slash), the immediate contents of the + directory would also be sent, without needing to be explicitly mentioned in + the file. In both cases, if the + [`-r`](#opt) option was enabled, that directory's entire hierarchy would also be + transferred (keep in mind that [`-r`](#opt) needs to be specified + explicitly with `--files-from`, since it is not implied by [`-a`](#opt). + Also note that the effect of the (enabled by default) [`-r`](#opt) option + is to duplicate only the path info that is read from the file -- it does + not force the duplication of the source-spec path (/usr in this case). + + In addition, the `--files-from` file can be read from the remote host + instead of the local host if you specify a "host:" in front of the file + (the host must match one end of the transfer). As a short-cut, you can + specify just a prefix of ":" to mean "use the remote end of the transfer". + For example: + + > ``` + > rsync -a --files-from=:/path/file-list src:/ /tmp/copy + > ``` + + This would copy all the files specified in the /path/file-list file that + was located on the remote "src" host. + + If the [`--iconv`](#opt) and [`--secluded-args`](#opt) options are specified + and the `--files-from` filenames are being sent from one host to another, + the filenames will be translated from the sending host's charset to the + receiving host's charset. + + NOTE: sorting the list of files in the `--files-from` input helps rsync to + be more efficient, as it will avoid re-visiting the path elements that are + shared between adjacent entries. If the input is not sorted, some path + elements (implied directories) may end up being scanned multiple times, and + rsync will eventually unduplicate them after they get turned into file-list + elements. + +097. `--from0`, `-0` + + This tells rsync that the rules or filenames it reads from a file are + terminated by a null ('\\0') character, not a NL, CR, or CR+LF. This + affects [`--exclude-from`](#opt), [`--include-from`](#opt), + [`--files-from`](#opt), and any merged files specified in a + [`--filter`](#opt) rule. It does not affect [`--cvs-exclude`](#opt) (since + all names read from a .cvsignore file are split on whitespace). + +098. `--old-args` + + This option tells rsync not to protect the argument values sent to the + remote side from unintended word-splitting or other misinterpretation. + It also allows the client to treat an empty argument as a "." instead of + generating an error. + + The default in a modern rsync is for "shell-active" characters (including + spaces) to be backslash-escaped in the arguments that are sent to the remote + shell. The wildcard characters `*`, `?`, `[`, & `]` are not escaped in + filename arguments (allowing them to expand into multiple filenames) while being + protected in option arguments, such as [`--usermap`](#opt). + + If you have a script that wants to use old-style argument splitting in its + filenames, specify this option once. If the remote shell has a problem + with any backslash escapes at all, specify this option twice. + + You may also control this setting via the [`RSYNC_OLD_ARGS`](#) environment + variable. If it has the value "1", rsync will default to a single-option + setting. If it has the value "2" (or more), rsync will default to a + repeated-option setting. If it is "0", you'll get the default escaping + behavior. The environment is always overridden by manually specified + positive or negative options (the negative is `--no-old-args`). + + Note that this option also disables the extra safety check + that ensures that a remote sender isn't including extra top-level items in + the file-list that you didn't request. This side-effect is necessary + because we can't know for sure what names to expect when the remote shell + is interpreting the arguments. + + This option conflicts with the [`--secluded-args`](#opt) option. + +099. `--secluded-args`, `-s` + + This option sends all filenames and most options to the remote rsync via + the protocol (rather than via the remote shell command line), which avoids + the possibility of the remote shell modifying them. + Wildcards are expanded on the remote host by rsync instead of a shell. + + Without this option, rsync does backslash-escaping of arguments to prevent + things like space splitting and unwanted special-character side-effects, + which is normally sufficient to avoid unwanted modifications by the shell. + This option is useful for those times that you need the argument's + character set to be converted for the remote host, if the remote shell is + incompatible with the default backslash-escaping method, or there is some + other reason that you want the majority of the options and arguments to + bypass the command-line of the remote shell. + + This option is incompatible with remote rsync versions prior to 3.0.0 + (March 2008). It also has the drawback of being refused by restricted + shells that want to be able to inspect all the option values for safety. + + If you combine this option with [`--iconv`](#opt), the arguments related to the + remote side will be translated from the local to the remote character-set. + The translation happens before wild-cards are expanded. See also the + [`--files-from`](#opt) option. + + You may also control this setting via the [`RSYNC_PROTECT_ARGS`](#) + environment variable. If it has a non-zero value, this setting will be + enabled by default, otherwise it will be disabled by default. Either state + is overridden by a manually specified positive or negative version of this + option (note that `--no-s` and `--no-secluded-args` are the negative + versions). This environment variable is also superseded by a non-zero + [`RSYNC_OLD_ARGS`](#) environment variable. + + This option conflicts with the [`--old-args`](#opt) option. + + This option used to be called `--protect-args` (before 3.2.6, September + 2022\) and that + older name can still be used (though specifying it as `-s` is always the + easiest and most compatible choice). + +100. `--trust-sender` + + This option disables two extra validation checks that a local client + performs on the file list generated by a remote sender. This option should + only be used if you trust the sender to not put something malicious in the + file list (something that could possibly be done via a modified rsync, a + modified shell, or some other similar manipulation). + + Normally, the rsync client runs two extra validation + checks when pulling files from a remote rsync: + + - It verifies that additional argument items didn't get added at the top of the + transfer. + - It verifies that none of the items in the file list are names that should + have been excluded (if filter rules were specified). + + Note that various options can turn off one or both of these checks if the + option interferes with the validation. For instance: + + - Using a per-directory filter file reads filter rules that only the server + knows about, so the filter checking is disabled. + - Using the [`--old-args`](#opt) option allows the sender to manipulate the + requested arguments, so the argument checking is disabled. + - Reading the files-from list from the server side means that the client + doesn't know the argument list, so the argument checking is disabled. + - Using [`--read-batch`](#opt) disables both checks since the batch file's + contents will have been verified when it was created. + + This option may help an under-powered client server if the extra pattern + matching is slowing things down on a huge transfer. It could also be used + for a transfer from a trusted sender as a workaround if there appeared to + be a bug in the verification logic. + + When using this option it is a good idea to specify a dedicated destination + directory, as discussed in the [SECURITY](#) section. + +101. `--copy-as=USER[:GROUP]` + + This option instructs rsync to use the USER and (if specified after a + colon) the GROUP for the copy operations. This only works if the user that + is running rsync has the ability to change users. If the group is not + specified then the user's default groups are used. + + This option can help to reduce the risk in the case where rsync is being + run as root, copying into or out of a directory that might have live + changes happening to it, and you + want to make sure that root-level read or write actions of system files are + not possible. While you could alternatively run all of rsync as the + specified user, sometimes you need the root-level host-access credentials + to be used, so this allows rsync to drop root for the copying part of the + operation after the remote-shell or daemon connection is established. + + The option only affects one side of the transfer unless the transfer is + local, in which case it affects both sides. Use the + [`--remote-option`](#opt) to affect the remote side, such as + `-M--copy-as=joe`. For a local transfer, the lsh (or lsh.sh) support file + provides a local-shell helper script that can be used to allow a + "localhost:" or "lh:" host-spec to be specified without needing to setup + any remote shells, allowing you to specify remote options that affect the + side of the transfer that is using the host-spec (and using hostname "lh" + avoids the overriding of the remote directory to the user's home directory). + + For example, the following rsync writes the local files as user "joe": + + > ``` + > sudo rsync -aiv --copy-as=joe host1:backups/joe/ /home/joe/ + > ``` + + This makes all files owned by user "joe", limits the groups to those that + are available to that user, and makes it impossible for the joe user to do + a timed exploit of the path to induce a change to a file that the joe user + has no permissions to change. + + The following command does a local copy into the "dest/" directory as user "joe" + (assuming you've installed support/lsh into a directory on your $PATH): + + > ``` + > sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/ + > ``` + +102. `--temp-dir=DIR`, `-T` + + This option instructs rsync to use DIR as a scratch directory when creating + temporary copies of the files transferred on the receiving side. The + default behavior is to create each temporary file in the same directory as + the associated destination file. The temp-file + names inside the specified DIR will not be prefixed with an extra dot, + though they will still have a random suffix added. + + This option is most often used when the receiving disk partition does not + have enough free space to hold a copy of the largest file in the transfer. + In this case (i.e. when the scratch directory is on a different disk + partition), rsync will not be able to rename each received temporary file + over the top of the associated destination file, but instead must copy it + into place. Rsync does this by copying the file over the top of the + destination file, which means that the destination file will contain + truncated data during this copy. If this were not done this way, + it would be possible for the old file to continue taking up disk space (if + someone had it open), and thus there might not be enough room to fit the + new version on the disk at the same time. + + If you are using this option for reasons other than a shortage of disk + space, you may wish to combine it with the [`--delay-updates`](#opt) + option, which will ensure that all copied files get put into subdirectories + in the destination hierarchy, awaiting the end of the transfer. If you + don't have enough room to duplicate all the arriving files on the + destination partition, another way to tell rsync that you aren't overly + concerned about disk space is to use the [`--partial-dir`](#opt) option + with a relative path; because this tells rsync that it is OK to stash off a + copy of a single file in a subdirectory in the destination hierarchy, rsync will + use the partial-dir as a staging area to bring over the copied file, and + then rename it into place from there. (Specifying a [`--partial-dir`](#opt) + with an absolute path does not have this side-effect.) + +103. `--fuzzy`, `-y` + + This option tells rsync that it should look for a basis file for any + destination file that is missing. With this option, rsync looks in the same + directory as the destination file for either a file that has an identical + size and modified-time, or a similarly-named file. If found, rsync uses + the fuzzy basis file to try to speed up the transfer. + + If the option is repeated, the fuzzy scan will also be done in any matching + alternate destination directories that are specified via + [`--compare-dest`](#opt), [`--copy-dest`](#opt), or [`--link-dest`](#opt). + + Note that the use of the [`--delete`](#opt) option might get rid of any + potential fuzzy-match files, so either use [`--delete-after`](#opt) or + specify some filename exclusions if you need to prevent this. + +104. `--compare-dest=DIR` + + This option instructs rsync to use _DIR_ on the destination machine as an + additional hierarchy to compare destination files against doing transfers + (if the files are missing in the destination directory). If a file is + found in _DIR_ that is identical to the sender's file, the file will NOT be + transferred to the destination directory. This is useful for creating a + sparse backup of just files that have changed from an earlier backup. This + option is typically used to copy into an empty (or newly created) + directory. + + Multiple `--compare-dest` directories may be + provided, which will cause rsync to search the list in the order specified + for an exact match. If a match is found that differs only in attributes, a + local copy is made and the attributes updated. If a match is not found, a + basis file from one of the _DIRs_ will be selected to try to speed up the + transfer. + + Basis directories and their aliases should remain stable during the + transfer. Rsync can continue using an opened directory after its name or + alias changes. + + If _DIR_ is a relative path, it is relative to the destination directory. + See also [`--copy-dest`](#opt) and [`--link-dest`](#opt). + + NOTE: rsync will remove a file from a + non-empty destination hierarchy if an exact match is found in one of the + compare-dest hierarchies, making the end result more closely match a fresh + copy. + +105. `--copy-dest=DIR` + + This option behaves like [`--compare-dest`](#opt), but rsync will also copy + unchanged files found in _DIR_ to the destination directory using a local + copy. This is useful for doing transfers to a new destination while + leaving existing files intact, and then doing a flash-cutover when all + files have been successfully transferred. + + Multiple `--copy-dest` directories may be provided, which will cause rsync + to search the list in the order specified for an unchanged file. If a + match is not found, a basis file from one of the _DIRs_ will be selected to + try to speed up the transfer. + + If _DIR_ is a relative path, it is relative to the destination directory. + See also [`--compare-dest`](#opt) and [`--link-dest`](#opt). + +106. `--link-dest=DIR` + + This option behaves like [`--copy-dest`](#opt), but unchanged files are + hard linked from _DIR_ to the destination directory. The files must be + identical in all preserved attributes (e.g. permissions, possibly + ownership) in order for the files to be linked together. An example: + + > ``` + > rsync -av --link-dest=$PWD/prior_dir host:src_dir/ new_dir/ + > ``` + + If files aren't linking, double-check their attributes. Also check if + some attributes are getting forced outside of rsync's control, such a mount + option that squishes root to a single user, or mounts a removable drive + with generic ownership (such as OS X's "Ignore ownership on this volume" + option). + + Multiple `--link-dest` directories may be + provided, which will cause rsync to search the list in the order specified + for an exact match (there is a limit of 20 such directories). If a match + is found that differs only in attributes, a local copy is made and the + attributes updated. If a match is not found, a basis file from one of the + _DIRs_ will be selected to try to speed up the transfer. + + Not every filesystem can hard-link a symlink, a device node, a FIFO or a + socket, and the destination need not agree with the one rsync was built on + -- macOS builds on APFS, which can, and may write to HFS+, which cannot. + Where the destination refuses to link such an entry, it is copied instead + and the transfer carries on, so only that entry loses the space saving. + This applies to any refusal, because the error alone does not identify one: + link(2) reports `EPERM` both for a filesystem without hard links and for an + ordinary permission refusal. Regular files have always behaved this way. + + One case is not covered. With [`--hard-links`](#opt) (`-H`), a group of + such entries hard-linked to *each other* in the source needs a second link, + from the first member to the rest, inside the destination itself. Where + that link is refused too -- a destination that cannot hard-link the type at + all -- the members after the first are not created and the transfer fails. + A `--link-dest` on another filesystem is fine: only the link to _DIR_ is + impossible there, and the ones within the destination still succeed. + + This option works best when copying into an empty destination hierarchy, as + existing files may get their attributes tweaked, and that can affect + alternate destination files via hard-links. Also, itemizing of changes can + get a bit muddled. Note that prior to version 3.1.0 (September 2013), an + alternate-directory exact match would never be found (nor linked into the + destination) when a destination file already exists. + + Note that if you combine this option with [`--ignore-times`](#opt), rsync will not + link any files together because it only links identical files together as a + substitute for transferring the file, never as an additional check after + the file is updated. + + If _DIR_ is a relative path, it is relative to the destination directory. + See also [`--compare-dest`](#opt) and [`--copy-dest`](#opt). + + Note that rsync versions prior to 2.6.1 (April 2004) had a bug that could prevent + `--link-dest` from working properly for a non-super-user when + [`--owner`](#opt) (`-o`) was specified (or implied). You can work-around + this bug by avoiding the `-o` option (or using `--no-o`) when sending to a + really old remote rsync. + +107. `--compress`, `-z` + + With this option, rsync compresses the file data as it is sent to the + destination machine, which reduces the amount of data being transmitted -- + something that is useful over a slow connection. + + Rsync supports multiple compression methods and will choose one for you + unless you force the choice using the [`--compress-choice`](#opt) (`--zc`) + option. + + Run `rsync --version` to see the default compress list compiled into your + version. + + When both sides of the transfer are at least 3.2.0 (June 2020), + each side chooses its own + most-preferred algorithm that also appears in the peer's list. Both sides + order their lists strongest-first, so they converge on the strongest mutual + choice. If no common compress choice is found, rsync exits with + an error. If the remote rsync is too old to support checksum negotiation, + its list is assumed to be "zlib". + + The default order can be customized by setting the environment variable + [`RSYNC_COMPRESS_LIST`](#) to a space-separated list of acceptable + compression names. If the string contains a "`&`" character, it is + separated into the "client string & server string", otherwise the same + string applies to both. If the string (or string portion) contains no + non-whitespace characters, the default compress list is used. Any unknown + compression names are discarded from the list, but a list with only invalid + names results in a failed negotiation. + + There are some older rsync versions that were configured to reject a `-z` + option and require the use of `-zz` because their compression library was + not compatible with the default zlib compression method. You can usually + ignore this weirdness unless the rsync server complains and tells you to + specify `-zz`. + +108. `--compress-choice=STR`, `--zc=STR` + + This option can be used to override the automatic negotiation of the + compression algorithm that occurs when [`--compress`](#opt) is used. The + option implies [`--compress`](#opt) unless "none" was specified, which + instead implies `--no-compress`. + + The compression options that you may be able to use are: + + - `zstd` + - `lz4` + - `zlibx` + - `zlib` + - `none` + + Run `rsync --version` to see the default compress list compiled into your + version (which may differ from the list above). + + Note that if you see an error about an option named `--old-compress` or + `--new-compress`, this is rsync trying to send the `--compress-choice=zlib` + or `--compress-choice=zlibx` option in a backward-compatible manner that + more rsync versions understand. This error indicates that the older rsync + version on the server will not allow you to force the compression type. + + Note that the "zlibx" compression algorithm is just the "zlib" algorithm + with matched data excluded from the compression stream (to try to make it + more compatible with an external zlib implementation). + +109. `--compress-level=NUM`, `--zl=NUM` + + Explicitly set the compression level to use (see [`--compress`](#opt), + `-z`) instead of using the default. The [`--compress`](#opt) option is + implied as long as the level chosen is not a "don't compress" level for the + compression algorithm that is in effect (e.g. zlib compression treats level + 0 as "off"). + + The level values vary depending on the checksum in effect. Because rsync + will negotiate a checksum choice by default (when the remote rsync is new + enough), it can be good to combine this option with a + [`--compress-choice`](#opt) (`--zc`) option unless you're sure of the + choice in effect. For example: + + > ``` + > rsync -aiv --zc=zstd --zl=22 host:src/ dest/ + > ``` + + For zlib & zlibx compression the valid values are from 1 to 9 with 6 being + the default. Specifying `--zl=0` turns compression off, and specifying + `--zl=-1` chooses the default level of 6. -0. `--omit-link-times`, `-J` - - This tells rsync to omit symlinks when it is preserving modification, - access, and create times. - -0. `--super` - - This tells the receiving side to attempt super-user activities even if the - receiving rsync wasn't run by the super-user. These activities include: - preserving users via the [`--owner`](#opt) option, preserving all groups - (not just the current user's groups) via the [`--group`](#opt) option, and - copying devices via the [`--devices`](#opt) option. This is useful for - systems that allow such activities without being the super-user, and also - for ensuring that you will get errors if the receiving side isn't being run - as the super-user. To turn off super-user activities, the super-user can - use `--no-super`. + For zstd compression the valid values are from -131072 to 22 with 3 being + the default. Specifying 0 chooses the default of 3. -0. `--fake-super` + For lz4 compression there are no levels, so the value is always 0. - When this option is enabled, rsync simulates super-user activities by - saving/restoring the privileged attributes via special extended attributes - that are attached to each file (as needed). This includes the file's owner - and group (if it is not the default), the file's device info (device & - special files are created as empty text files), and any permission bits - that we won't allow to be set on the real file (e.g. the real file gets - u-s,g-s,o-t for safety) or that would limit the owner's access (since the - real super-user can always access/change a file, the files we create can - always be accessed/changed by the creating user). This option also handles - ACLs (if [`--acls`](#opt) was specified) and non-user extended attributes - (if [`--xattrs`](#opt) was specified). - - This is a good way to backup data without using a super-user, and to store - ACLs from incompatible systems. - - The `--fake-super` option only affects the side where the option is used. - To affect the remote side of a remote-shell connection, use the - [`--remote-option`](#opt) (`-M`) option: - - > rsync -av -M--fake-super /src/ host:/dest/ - - For a local copy, this option affects both the source and the destination. - If you wish a local copy to enable this option just for the destination - files, specify `-M--fake-super`. If you wish a local copy to enable this - option just for the source files, combine `--fake-super` with `-M--super`. - - This option is overridden by both [`--super`](#opt) and `--no-super`. - - See also the [`fake super`](rsyncd.conf.5#fake_super) setting in the - daemon's rsyncd.conf file. - -0. `--sparse`, `-S` - - Try to handle sparse files efficiently so they take up less space on the - destination. This relies on the destination filesystem supporting sparse - files, that is, files where some parts of the file don't have corresponding - disk blocks allocated for them because they contain all zero bytes. - - If combined with [`--inplace`](#opt) the file created may not end up with - sparse blocks (depending on the filesystem type and kernel version), - unless the [`--whole-file`](#opt) option is also in effect. Note that versions - of rsync older than 3.1.3 (January 2018) will reject the combination of - `--sparse` and [`--inplace`](#opt). - -0. `--preallocate` - - This tells the receiver to allocate each destination file to its eventual - size before writing data to the file. Rsync will only use the real - filesystem-level preallocation support provided by Linux's **fallocate**(2) - system call or Cygwin's **posix_fallocate**(3), not the slow glibc - implementation that writes a null byte into each block. - - Without this option, larger files may not be entirely contiguous on the - filesystem, but with this option rsync will probably copy more slowly. If - the destination is not an extent-supporting filesystem (such as ext4, xfs, - NTFS, etc.), this option may have no positive effect at all. - - If combined with [`--sparse`](#opt), the file will only have sparse blocks - (as opposed to allocated sequences of null bytes) if the kernel version and - filesystem type support creating holes in the allocated data. - -0. `--dry-run`, `-n` - - This makes rsync perform a trial run that doesn't make any changes, and - produces mostly the same output as a real run. It is most commonly used - in combination with the [`--verbose`](#opt) (`-v`) and/or - [`--itemize-changes`](#opt) (`-i`) options to see what an rsync command is - going to do before one actually runs it. - - The output of [`--itemize-changes`](#opt) is supposed to be exactly the - same on a dry run and a subsequent real run (barring external changes to - the source or destination - and system call failures); if it isn't, that's a bug. Other output should - be mostly unchanged, but may differ in some areas. Notably, a dry run does - not send the actual data for file transfers, so [`--progress`](#opt) has no - effect, the "bytes sent", "bytes received", "literal data", and "matched - data" statistics are too small, and the "speedup" value is equivalent to a - run where no file transfers were needed. - -0. `--whole-file`, `-W` - - This option disables rsync's delta-transfer algorithm, causing the whole of - all transferred files to be sent. The transfer may be faster if this - option is used when the bandwidth between the source and destination - machines is higher than the bandwidth to disk (especially when the "disk" - is actually a networked filesystem). This is the default when both the - source and destination are specified as local paths, but only if no - batch-writing option is in effect. - -0. `--no-whole-file`, `--no-W` - - Disable whole-file updating when it is enabled by default for a local - transfer. This usually slows rsync down, but it can be useful if you are - trying to minimize the writes to the destination file (if combined with - [`--inplace`](#opt)) or for testing the checksum-based update algorithm. - - See also the [`--whole-file`](#opt) option. - -0. `--checksum-choice=STR`, `--cc=STR` - - This option overrides the checksum algorithms. If one algorithm name is - specified, it is used for both the transfer checksums and the pre-transfer - checksums (note that the pre-transfer checksum is only performed if - [`--checksum`](#opt) is specified). If two - comma-separated names are supplied, the first name affects the transfer - checksums, and the second name affects the pre-transfer checksums. - - The checksum options that you may be able to use are: - - - `auto` (the default automatic choice) - - `xxh128` - - `xxh3` - - `xxh64` (aka `xxhash`) - - `sha3-512` - - `sha3-384` - - `sha3-256` - - `sha256` - - `md5` - - `md4` - - `sha1` - - `none` - - The `sha3-*` and `sha256` choices require an rsync built with OpenSSL - support and a libcrypto that provides the chosen digest. They are not - offered during default negotiation. Use `--checksum-choice` or include the - chosen digest in both peers' [`RSYNC_CHECKSUM_LIST`](#). - - Run `rsync --version` to see the checksum choices available in your build. - - If "none" is specified for the first (or only) name, the [`--whole-file`](#opt) - option is forced on and no checksum verification is performed on the - transferred data. If "none" is specified for the second (or only) name, - the [`--checksum`](#opt) option cannot be used. - - The "auto" option is the default, where rsync bases its algorithm choice on - a negotiation between the client and the server as follows: - - When both sides of the transfer are at least 3.2.0 (released June 2020), - each side chooses its own - most-preferred algorithm that also appears in the peer's list. Both sides - order their lists strongest-first, so they converge on the strongest mutual - choice. If no common checksum choice is found, rsync exits with - an error. If the remote rsync is too old to support checksum negotiation, - a value is chosen based on the protocol version (which chooses between MD5 - and various flavors of MD4 based on protocol age). - - The default order can be customized by setting the environment variable - [`RSYNC_CHECKSUM_LIST`](#) to a space-separated list of acceptable checksum - names. If the string contains a "`&`" character, it is separated into the - "client string & server string", otherwise the same string applies to both. - If the string (or string portion) contains no non-whitespace characters, - the default checksum list is used. This method does not allow you to - specify the transfer checksum separately from the pre-transfer checksum, - and it discards "auto" and all unknown checksum names. A list with only - invalid names results in a failed negotiation. - - The use of the `--checksum-choice` option overrides this environment list. - -0. `--one-file-system`, `-x` - - This tells rsync to avoid crossing a filesystem boundary when recursing. - This does not limit the user's ability to specify items to copy from - multiple filesystems, just rsync's recursion through the hierarchy of each - directory that the user specified, and also the analogous recursion on the - receiving side during deletion. Also keep in mind that rsync treats a - "bind" mount to the same device as being on the same filesystem. - - If this option is repeated, rsync omits all mount-point directories from - the copy. Otherwise, it includes an empty directory at each mount-point it - encounters (using the attributes of the mounted directory because those of - the underlying mount-point directory are inaccessible). - - If rsync has been told to collapse symlinks (via [`--copy-links`](#opt) or - [`--copy-unsafe-links`](#opt)), a symlink to a directory on another device - is treated like a mount-point. Symlinks to non-directories are unaffected - by this option. - -0. `--ignore-non-existing`, `--existing` - - This tells rsync to skip creating files (including directories) that do not - exist yet on the destination. If this option is combined with the - [`--ignore-existing`](#opt) option, no files will be updated (which can be - useful if all you want to do is delete extraneous files). - - This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any - exclude side effects. - -0. `--ignore-existing` - - This tells rsync to skip updating files that already exist on the - destination (this does _not_ ignore existing directories, or nothing would - get done). See also [`--ignore-non-existing`](#opt). - - This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any - exclude side effects. - - This option can be useful for those doing backups using the - [`--link-dest`](#opt) option when they need to continue a backup run that - got interrupted. Since a [`--link-dest`](#opt) run is copied into a new - directory hierarchy (when it is used properly), using [`--ignore-existing` - will ensure that the already-handled files don't get tweaked (which avoids - a change in permissions on the hard-linked files). This does mean that - this option is only looking at the existing files in the destination - hierarchy itself. - - When [`--info=skip2`](#opt) is used rsync will output "FILENAME exists - (INFO)" messages where the INFO indicates one of "type change", "sum - change" (requires [`-c`](#opt)), "file change" (based on the quick check), - "attr change", or "uptodate". Using [`--info=skip1`](#opt) (which is also - implied by 2 [`-v`](#opt) options) outputs the exists message without the - INFO suffix. - -0. `--remove-source-files` - - This tells rsync to remove from the sending side the files (meaning - non-directories) that are a part of the transfer and have been successfully - duplicated on the receiving side. - - Note that you should only use this option on source files that are - quiescent. If you are using this to move files that show up in a - particular directory over to another host, make sure that the finished - files get renamed into the source directory, not directly written into it, - so that rsync can't possibly transfer a file that is not yet fully written. - If you can't first write the files into a different directory, you should - use a naming idiom that lets rsync avoid transferring files that are not - yet finished (e.g. name the file "foo.new" when it is written, rename it to - "foo" when it is done, and then use the option [`--exclude='*.new'`](#opt) - for the rsync transfer). - - Rsync will skip the sender-side removal, and output an - error, if the file's size or modify time has not stayed unchanged. - - If the copy is local, rsync will ensure that the sender does - not remove a file the receiver just verified, such as when the user - accidentally makes the source and destination directory the same path. - -0. `--delete` - - This tells rsync to delete extraneous files from the receiving side (those - that don't exist on the sending side), but only for the directories that are - being synchronized. You must have asked rsync to send the whole directory - (e.g. "`dir`" or "`dir/`"), rather than asking for all the files in a - directory via a wildcard (e.g. "`dir/*`"), since the wildcard is - expanded by the shell and - rsync thus gets a request to transfer individual files, not the files' - parent directory. Files that are excluded from the transfer are also - excluded from being deleted unless you use the [`--delete-excluded`](#opt) - option or mark the rules as only matching on the sending side (see the - include/exclude modifiers in the [FILTER RULES](#) section). - - This option has no effect unless either [`--recursive`](#opt) or - [`--dirs`](#opt) (`-d`) is enabled. In the latter case, deletions only - occur in directories whose contents are being copied. - - This option can be dangerous if used incorrectly! It is a very good idea to - first try a run using the [`--dry-run`](#opt) (`-n`) option to see what - files are going to be deleted. - - If the sending side detects any I/O errors, then the deletion of any files - at the destination will be automatically disabled. This is to prevent - temporary filesystem failures (such as NFS errors) on the sending side from - causing a massive deletion of files on the destination. You can override - this with the [`--ignore-errors`](#opt) option. - - The `--delete` option may be combined with one of the --delete-WHEN options - without conflict, as well as [`--delete-excluded`](#opt). However, if none - of the `--delete-WHEN` options are specified, rsync will choose the - [`--delete-during`](#opt) algorithm when talking to rsync 3.0.0 (March - 2008) or newer, - or the [`--delete-before`](#opt) algorithm when talking to an older rsync. - See also [`--delete-delay`](#opt) and [`--delete-after`](#opt). - -0. `--delete-before` - - Request that the file-deletions on the receiving side be done before the - transfer starts. See [`--delete`](#opt) (which is implied) for more - details on file-deletion. - - Deleting before the transfer is helpful if the filesystem is tight for - space and removing extraneous files would help to make the transfer - possible. However, it does introduce a delay before the start of the - transfer, and this delay might cause the transfer to timeout (if - [`--timeout`](#opt) was specified). It also forces rsync to use the old, - non-incremental recursion algorithm that requires rsync to scan all the - files in the transfer into memory at once (see [`--recursive`](#opt)). - -0. `--delete-during`, `--del` - - Request that the file-deletions on the receiving side be done incrementally - as the transfer happens. The per-directory delete scan is done right - before each directory is checked for updates, so it behaves like a more - efficient [`--delete-before`](#opt), including doing the deletions prior to - any per-directory filter files being updated. - See [`--delete`](#opt) (which is implied) for more - details on file-deletion. - -0. `--delete-delay` - - Request that the file-deletions on the receiving side be computed during - the transfer (like [`--delete-during`](#opt)), and then removed after the - transfer completes. This is useful when combined with - [`--delay-updates`](#opt) and/or [`--fuzzy`](#opt), and is more efficient - than using [`--delete-after`](#opt), but can behave differently, since - [`--delete-after`](#opt) computes the deletions in a separate pass after - all updates are done. If the number of removed files overflows an - internal buffer, a temporary file will be created on the receiving side to - hold the names (it is removed while open, so you shouldn't see it during - the transfer). If the creation of the temporary file fails, rsync will try - to fall back to using [`--delete-after`](#opt) (which it cannot do if - [`--recursive`](#opt) is doing an incremental scan). See - [`--delete`](#opt) (which is implied) for more details on file-deletion. - -0. `--delete-after` - - Request that the file-deletions on the receiving side be done after the - transfer has completed. This is useful if you are sending new - per-directory merge files as a part of the transfer and you want their - exclusions to take effect for the delete phase of the current transfer. It - also forces rsync to use the old, non-incremental recursion algorithm that - requires rsync to scan all the files in the transfer into memory at once - (see [`--recursive`](#opt)). See [`--delete`](#opt) (which is implied) for - more details on file-deletion. - - See also the [`--delete-delay`](#opt) option that might be a faster choice - for those that just want the deletions to occur at the end of the transfer. - -0. `--delete-excluded` - - This option turns any unqualified exclude/include rules into server-side - rules that do not affect the receiver's deletions. - - By default, an exclude or include has both a server-side effect (to "hide" - and "show" files when building the server's file list) and a receiver-side - effect (to "protect" and "risk" files when deletions are occurring). Any - rule that has no modifier to specify what sides it is executed on will be - instead treated as if it were a server-side rule only, avoiding any - "protect" effects of the rules. - - A rule can still apply to both sides even with this option specified if the - rule is given both the sender & receiver modifier letters (e.g., `-f'-sr - foo'`). Receiver-side protect/risk rules can also be explicitly specified - to limit the deletions. This saves you from having to edit a bunch of - `-f'- foo'` rules into `-f'-s foo'` (aka `-f'H foo'`) rules (not to mention - the corresponding includes). - - See the [FILTER RULES](#) section for more information. See - [`--delete`](#opt) (which is implied) for more details on deletion. - -0. `--ignore-missing-args` - - When rsync is first processing the explicitly requested source files (e.g. - command-line arguments or [`--files-from`](#opt) entries), it is normally - an error if the file cannot be found. This option suppresses that error, - and does not try to transfer the file. This does not affect subsequent - vanished-file errors if a file was initially found to be present and later - is no longer there. - -0. `--delete-missing-args` - - This option takes the behavior of the (implied) - [`--ignore-missing-args`](#opt) option a step farther: each missing argument - 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 - independent of any other type of delete processing. - - The missing source files are represented by special file-list entries which - display as a "`*missing`" entry in the [`--list-only`](#opt) output. - -0. `--ignore-errors` - - Tells [`--delete`](#opt) to go ahead and delete files even when there are - I/O errors. - -0. `--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`](#opt) for details). - -0. `--max-delete=NUM` - - This tells rsync not to delete more than NUM files or directories. If that - limit is exceeded, all further deletions are skipped through the end of the - transfer. At the end, rsync outputs a warning (including a count of the - skipped deletions) and exits with an error code of 25 (unless some more - important error condition also occurred). - - You may specify `--max-delete=0` to be warned - about any extraneous files in the destination without removing any of them. - CAUTION: a client rsync older than 3.0.0 (March 2008) treats - `--max-delete=0` as unlimited, so use `--max-delete=-1` if the command - might be run by such an old rsync. (A 3.0.0 or newer client protects an - older remote by forwarding the option as `--max-delete=-1`.) - -0. `--max-size=SIZE` - - This tells rsync to avoid transferring any file that is larger than the - specified SIZE. A numeric value can be suffixed with a string to indicate - the numeric units or left unqualified to specify bytes, and the numeric - value can have a fractional part, such as `--max-size=1.5m`. - - A period always denotes the decimal point. The locale's decimal separator - is also accepted. Rsync scales the number to bytes and rounds down before - applying a final `+1` or `-1`. - - This option is a [TRANSFER RULE](#TRANSFER_RULES), so don't expect any - exclude side effects. - - The first letter of a units string can be `B` (bytes), `K` (kilo), `M` - (mega), `G` (giga), `T` (tera), or `P` (peta). If the string is a single - char or has "ib" added to it (e.g. "G" or "GiB") then the units are - multiples of 1024. If you use a two-letter suffix that ends with a "B" - (e.g. "kb") then you get units that are multiples of 1000. The string's - letters can be any mix of upper and lower-case that you want to use. - - Finally, if the string ends with either "+1" or "-1", it is offset by one - byte in the indicated direction. The largest possible value is usually - `8192P-1`. - - Examples: `--max-size=1.5mb-1` is 1499999 bytes, and `--max-size=2g+1` is - 2147483649 bytes. - -0. `--min-size=SIZE` - - This tells rsync to avoid transferring any file that is smaller than the - specified SIZE, which can help in not transferring small, junk files. See - the [`--max-size`](#opt) option for a description of SIZE and other info. - -0. `--max-alloc=SIZE` - - By default rsync limits an individual malloc/realloc to about 1GB in size. - For most people this limit works just fine and prevents a protocol error - causing rsync to request massive amounts of memory. However, if you have - many millions of files in a transfer, a large amount of server memory, and - you don't want to split up your transfer into multiple parts, you can - increase the per-allocation limit to something larger, allowing rsync to - consume more memory. - - Keep in mind that this is not a limit on the total size of allocated - memory. It is a sanity-check value for each individual allocation. - - See the [`--max-size`](#opt) option for a description of how SIZE can be - specified. The default suffix if none is given is bytes. + If you specify a too-large or too-small value, the number is silently + limited to a valid value. This allows you to specify something like + `--zl=999999999` and be assured that you'll end up with the maximum + compression level no matter what algorithm was chosen. + + If you want to know the compression level that is in effect, specify + [`--debug=nstr`](#opt) to see the "negotiated string" results. This will + report something like "`Client compress: zstd (level 3)`" (along with the + checksum choice in effect). - A value of 0 is an easy way to say "the largest limit this build supports". - It resolves to the same ceiling an explicit SIZE is checked against, so it - is never a higher limit than one you could have typed out yourself. +110. `--compress-threads=NUM`, `--zt=NUM` + + Set the number of threads to spawn when compressing data. Setting this + option to 1 or more will instruct the compression library to spawn 1 or + more threads for compression. Ideally, increasing the number of threads + will increase transfer speed if the transfer is CPU bound on the sender. + + This option does not affect decompression. - Because the option is passed to the remote rsync as you wrote it, each side - resolves a 0 against its own maximum. That makes 0 the only spelling that - is correct for both ends of a transfer between hosts of different word - sizes: a literal value large enough to be useful on a 64-bit client is - rejected as too large by a 32-bit daemon. - - A value of 0 was accepted beginning in 3.2.3 and rejected in 3.5.0; the - release after 3.5.0 accepts it again. - - A daemon administrator who does not want clients to change the configured - allocation ceiling can set `refuse options = max-alloc` in the module's - `rsyncd.conf`. This refuses every client-supplied value, including 0. - - You can set a default value using the environment variable - [`RSYNC_MAX_ALLOC`](#) using the same SIZE values as supported by this - option. If the remote rsync doesn't understand the `--max-alloc` option, - you can override an environmental value by specifying `--max-alloc=1g`, - which will make rsync avoid sending the option to the remote side (because - "1G" is the default). - -0. `--block-size=SIZE`, `-B` - - This forces the block size used in rsync's delta-transfer algorithm to a - fixed value. It is normally selected based on the size of each file being - updated. See the technical report for details. - - The SIZE can be specified with a suffix as detailed in - the [`--max-size`](#opt) option. - -0. `--rsh=COMMAND`, `-e` - - This option allows you to choose an alternative remote shell program to use - for communication between the local and remote copies of rsync. Typically, - rsync is configured to use ssh by default. - - If this option is used with `[user@]host::module/path`, then the remote - shell _COMMAND_ will be used to run an rsync daemon on the remote host, and - all data will be transmitted through that remote shell connection, rather - than through a direct socket connection to a running rsync daemon on the - remote host. See the [USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL - CONNECTION](#) section above. - - The [`RSYNC_PORT`](#) environment variable will - be set when a daemon connection is being made via a remote-shell - connection. It is set to 0 if the default daemon port is being assumed, or - it is set to the value of the rsync port that was specified via either the - [`--port`](#opt) option or a non-empty port value in an `rsync://` URL (for - example `rsync://host.example.com:984`). This is useful if the program - being run is not actually rsync but rather something such as an SSL or - stunnel helper script; the script can use `RSYNC_PORT` to determine whether - it should connect to a default or alternate port. - - Command-line arguments are permitted in COMMAND provided that COMMAND is - presented to rsync as a single argument. You must use spaces (not tabs or - other whitespace) to separate the command and arguments from each other, and you - can use single- and/or double-quotes to preserve spaces in an argument (but - not backslashes). Note that doubling a single-quote inside a single-quoted - string gives you a single-quote; likewise for double-quotes (though you - need to pay attention to which quotes your shell is parsing and which - quotes rsync is parsing). Some examples: - - > -e 'ssh -p 2234' - > -e 'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"' - - (Note that ssh users can alternately customize site-specific connect - options in their .ssh/config file.) - - You can also choose the remote shell program using the [`RSYNC_RSH`](#) - environment variable, which accepts the same range of values as `-e`. - - See also the [`--blocking-io`](#opt) option which is affected by this - option. - -0. `--rsync-path=PROGRAM` - - Use this to specify what program is to be run on the remote machine to - start-up rsync. Often used when rsync is not in the default remote-shell's - path (e.g. `--rsync-path=/usr/local/bin/rsync`). Note that PROGRAM is run - with the help of a shell, so it can be any program, script, or command - sequence you'd care to run, so long as it does not corrupt the standard-in - & standard-out that rsync is using to communicate. - - One tricky example is to set a different default directory on the remote - machine for use with the [`--relative`](#opt) option. For instance: - - > rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/ - -0. `--remote-option=OPTION`, `-M` - - This option is used for more advanced situations where you want certain - effects to be limited to one side of the transfer only. For instance, if - you want to pass [`--log-file=FILE`](#opt) and [`--fake-super`](#opt) to - the remote system, specify it like this: - - > rsync -av -M --log-file=foo -M--fake-super src/ dest/ - - If you want to have an option affect only the local side of a transfer when - it normally affects both sides, send its negation to the remote side. Like - this: - - > rsync -av -x -M--no-x src/ dest/ - - Be cautious using this, as it is possible to toggle an option that will - cause rsync to have a different idea about what data to expect next over - the socket, and that will make it fail in a cryptic fashion. - - Note that you should use a separate `-M` option for each remote option you - want to pass. On older rsync versions, the presence of any spaces in the - remote-option argument could cause it to be split into separate remote arguments, but - this requires the use of [`--old-args`](#opt) in a modern rsync. - - When performing a local transfer, the "local" side is the sender and the - "remote" side is the receiver. - - Note some versions of the popt option-parsing library have a bug in them - that prevents you from using an adjacent argument with an equal in it next to a - short option letter (e.g. `-M--log-file=/tmp/foo`). If this bug affects - your version of popt, you can use the version of popt that is included with - rsync. - -0. `--cvs-exclude`, `-C` - - This is a useful shorthand for excluding a broad range of files that you - often don't want to transfer between systems. It uses a similar algorithm - to CVS to determine if a file should be ignored. - - The exclude list is initialized to exclude the following items (these - initial items are marked as perishable -- see the [FILTER RULES](#) - section): - - [comment]: # (This list gets used for the default-cvsignore.h file.) - - > `RCS` - > `SCCS` - > `CVS` - > `CVS.adm` - > `RCSLOG` - > `cvslog.*` - > `tags` - > `TAGS` - > `.make.state` - > `.nse_depinfo` - > `*~` - > `#*` - > `.#*` - > `,*` - > `_$*` - > `*$` - > `*.old` - > `*.bak` - > `*.BAK` - > `*.orig` - > `*.rej` - > `.del-*` - > `*.a` - > `*.olb` - > `*.o` - > `*.obj` - > `*.so` - > `*.exe` - > `*.Z` - > `*.elc` - > `*.ln` - > `core` - > `.svn/` - > `.git/` - > `.hg/` - > `.bzr/` - - then, files listed in a $HOME/.cvsignore are added to the list and any - files listed in the CVSIGNORE environment variable (all cvsignore names are - delimited by whitespace). - - Finally, any file is ignored if it is in the same directory as a .cvsignore - file and matches one of the patterns listed therein. Unlike rsync's - filter/exclude files, these patterns are split on whitespace. See the - **cvs**(1) manual for more information. - - If you're combining `-C` with your own [`--filter`](#opt) rules, you should - note that these CVS excludes are appended at the end of your own rules, - regardless of where the `-C` was placed on the command-line. This makes - them a lower priority than any rules you specified explicitly. If you want - to control where these CVS excludes get inserted into your filter rules, - you should omit the `-C` as a command-line option and use a combination of - [`--filter=:C`](#opt) and [`--filter=-C`](#opt) (either on your - command-line or by putting the ":C" and "-C" rules into a filter file with - your other rules). The first option turns on the per-directory scanning - for the .cvsignore file. The second option does a one-time import of the - CVS excludes mentioned above. - -0. `--filter=RULE`, `-f` - - This option allows you to add rules to selectively exclude certain files - from the list of files to be transferred. This is most useful in - combination with a recursive transfer. - - You may use as many `--filter` options on the command line as you like to - build up the list of files to exclude. If the filter contains whitespace, - be sure to quote it so that the shell gives the rule to rsync as a single - argument. You can use an underscore instead of a space to separate a rule - from its argument. - - See the [FILTER RULES](#) section for detailed information on this option. - -0. `-F` - - The `-F` option is a shorthand for adding two [`--filter`](#opt) rules to - your command. The first time it is used is a shorthand for this rule: - - > --filter='dir-merge /.rsync-filter' - - This tells rsync to look for per-directory .rsync-filter files that have - been sprinkled through the hierarchy and use their rules to filter the - files in the transfer. If `-F` is repeated, it is a shorthand for this - rule: - - > --filter='exclude .rsync-filter' - - This filters out the .rsync-filter files themselves from the transfer. - - See the [FILTER RULES](#) section for detailed information on how these - options work. - -0. `--exclude=PATTERN` - - This option is a simplified form of the [`--filter`](#opt) option that - specifies an exclude rule and does not allow the full rule-parsing syntax - of normal filter rules. This is equivalent to specifying `-f'- PATTERN'`. - - See the [FILTER RULES](#) section for detailed information on this option. - -0. `--exclude-from=FILE` - - This option is related to the [`--exclude`](#opt) option, but it specifies - a FILE that contains exclude patterns (one per line). Blank lines in the - file are ignored, as are whole-line comments that start with '`;`' or '`#`' - (filename rules that contain those characters are unaffected). - - If a line begins with "`- `" (dash, space) or "`+ `" (plus, space), then - the type of rule is being explicitly specified as an exclude or an include - (respectively). Any rules without such a prefix are taken to be an exclude. - - If a line consists of just "`!`", then the current filter rules are cleared - before adding any further rules. - - If _FILE_ is '`-`', the list will be read from standard input. - -0. `--include=PATTERN` - - This option is a simplified form of the [`--filter`](#opt) option that - specifies an include rule and does not allow the full rule-parsing syntax - of normal filter rules. This is equivalent to specifying `-f'+ PATTERN'`. - - See the [FILTER RULES](#) section for detailed information on this option. - -0. `--include-from=FILE` - - This option is related to the [`--include`](#opt) option, but it specifies - a FILE that contains include patterns (one per line). Blank lines in the - file are ignored, as are whole-line comments that start with '`;`' or '`#`' - (filename rules that contain those characters are unaffected). - - If a line begins with "`- `" (dash, space) or "`+ `" (plus, space), then - the type of rule is being explicitly specified as an exclude or an include - (respectively). Any rules without such a prefix are taken to be an include. - - If a line consists of just "`!`", then the current filter rules are cleared - before adding any further rules. - - If _FILE_ is '`-`', the list will be read from standard input. - -0. `--files-from=FILE` - - Using this option tells rsync to read the exact list of files to transfer - from FILE (or standard input if FILE is '`-`'). It also - tweaks the default behavior of rsync to make transferring just the - specified files and directories easier: - - - The [`--relative`](#opt) (`-R`) option is implied, which preserves the - path information that is specified for each item in the file (use - `--no-relative` or `--no-R` if you want to turn that off). - - The [`--dirs`](#opt) (`-d`) option is implied, which will create - directories specified in the list on the destination rather than noisily - skipping them (use `--no-dirs` or `--no-d` if you want to turn that off). - - The [`--archive`](#opt) (`-a`) option's behavior does not imply - [`--recursive`](#opt) (`-r`), so specify it explicitly, if you want it. - - These side-effects change the default state of rsync, so the position of - the `--files-from` option on the command-line has no bearing on how other - options are parsed (e.g. [`-a`](#opt) works the same before or after - `--files-from`, as does `--no-R` and all other options). - - With one source argument and no destination, rsync lists the selected - source entries instead of copying them. - - Listing individual files with `--files-from` does not make unlisted - siblings eligible for deletion. The [`--delete`](#opt) option only removes - entries from directories whose complete contents are being synchronised, - so list the directory itself and enable recursion if that deletion scope is - intended. - - The filenames that are read from the FILE are all relative to the source - directory: any leading slash is removed, and ".." components are resolved away so - an entry cannot rise above the source directory -- e.g. "../foo" is taken as "foo" - within the source directory. An entry that still contains an active ".." after - that resolution (one that cannot be collapsed) is rejected with an error. - Blank entries are ignored, as are whole-entry comments that start with '`;`' - or '`#`'. For example, take this command: - - > rsync -a --files-from=/tmp/foo /usr remote:/backup - - If /tmp/foo contains the string "bin" (or even "/bin"), the /usr/bin - directory will be created as /backup/bin on the remote host. If it - contains "bin/" (note the trailing slash), the immediate contents of the - directory would also be sent, without needing to be explicitly mentioned in - the file. In both cases, if the - [`-r`](#opt) option was enabled, that directory's entire hierarchy would also be - transferred (keep in mind that [`-r`](#opt) needs to be specified - explicitly with `--files-from`, since it is not implied by [`-a`](#opt). - Also note that the effect of the (enabled by default) [`-r`](#opt) option - is to duplicate only the path info that is read from the file -- it does - not force the duplication of the source-spec path (/usr in this case). - - In addition, the `--files-from` file can be read from the remote host - instead of the local host if you specify a "host:" in front of the file - (the host must match one end of the transfer). As a short-cut, you can - specify just a prefix of ":" to mean "use the remote end of the transfer". - For example: - - > rsync -a --files-from=:/path/file-list src:/ /tmp/copy - - This would copy all the files specified in the /path/file-list file that - was located on the remote "src" host. - - If the [`--iconv`](#opt) and [`--secluded-args`](#opt) options are specified - and the `--files-from` filenames are being sent from one host to another, - the filenames will be translated from the sending host's charset to the - receiving host's charset. - - NOTE: sorting the list of files in the `--files-from` input helps rsync to - be more efficient, as it will avoid re-visiting the path elements that are - shared between adjacent entries. If the input is not sorted, some path - elements (implied directories) may end up being scanned multiple times, and - rsync will eventually unduplicate them after they get turned into file-list - elements. - -0. `--from0`, `-0` - - This tells rsync that the rules or filenames it reads from a file are - terminated by a null ('\\0') character, not a NL, CR, or CR+LF. This - affects [`--exclude-from`](#opt), [`--include-from`](#opt), - [`--files-from`](#opt), and any merged files specified in a - [`--filter`](#opt) rule. It does not affect [`--cvs-exclude`](#opt) (since - all names read from a .cvsignore file are split on whitespace). - -0. `--old-args` - - This option tells rsync not to protect the argument values sent to the - remote side from unintended word-splitting or other misinterpretation. - It also allows the client to treat an empty argument as a "." instead of - generating an error. - - The default in a modern rsync is for "shell-active" characters (including - spaces) to be backslash-escaped in the arguments that are sent to the remote - shell. The wildcard characters `*`, `?`, `[`, & `]` are not escaped in - filename arguments (allowing them to expand into multiple filenames) while being - protected in option arguments, such as [`--usermap`](#opt). - - If you have a script that wants to use old-style argument splitting in its - filenames, specify this option once. If the remote shell has a problem - with any backslash escapes at all, specify this option twice. - - You may also control this setting via the [`RSYNC_OLD_ARGS`](#) environment - variable. If it has the value "1", rsync will default to a single-option - setting. If it has the value "2" (or more), rsync will default to a - repeated-option setting. If it is "0", you'll get the default escaping - behavior. The environment is always overridden by manually specified - positive or negative options (the negative is `--no-old-args`). - - Note that this option also disables the extra safety check - that ensures that a remote sender isn't including extra top-level items in - the file-list that you didn't request. This side-effect is necessary - because we can't know for sure what names to expect when the remote shell - is interpreting the arguments. - - This option conflicts with the [`--secluded-args`](#opt) option. - -0. `--secluded-args`, `-s` - - This option sends all filenames and most options to the remote rsync via - the protocol (rather than via the remote shell command line), which avoids - the possibility of the remote shell modifying them. - Wildcards are expanded on the remote host by rsync instead of a shell. - - Without this option, rsync does backslash-escaping of arguments to prevent - things like space splitting and unwanted special-character side-effects, - which is normally sufficient to avoid unwanted modifications by the shell. - This option is useful for those times that you need the argument's - character set to be converted for the remote host, if the remote shell is - incompatible with the default backslash-escaping method, or there is some - other reason that you want the majority of the options and arguments to - bypass the command-line of the remote shell. - - This option is incompatible with remote rsync versions prior to 3.0.0 - (March 2008). It also has the drawback of being refused by restricted - shells that want to be able to inspect all the option values for safety. - - If you combine this option with [`--iconv`](#opt), the arguments related to the - remote side will be translated from the local to the remote character-set. - The translation happens before wild-cards are expanded. See also the - [`--files-from`](#opt) option. - - You may also control this setting via the [`RSYNC_PROTECT_ARGS`](#) - environment variable. If it has a non-zero value, this setting will be - enabled by default, otherwise it will be disabled by default. Either state - is overridden by a manually specified positive or negative version of this - option (note that `--no-s` and `--no-secluded-args` are the negative - versions). This environment variable is also superseded by a non-zero - [`RSYNC_OLD_ARGS`](#) environment variable. - - This option conflicts with the [`--old-args`](#opt) option. - - This option used to be called `--protect-args` (before 3.2.6, September - 2022) and that - older name can still be used (though specifying it as `-s` is always the - easiest and most compatible choice). - -0. `--trust-sender` - - This option disables two extra validation checks that a local client - performs on the file list generated by a remote sender. This option should - only be used if you trust the sender to not put something malicious in the - file list (something that could possibly be done via a modified rsync, a - modified shell, or some other similar manipulation). - - Normally, the rsync client runs two extra validation - checks when pulling files from a remote rsync: - - - It verifies that additional argument items didn't get added at the top of the - transfer. - - It verifies that none of the items in the file list are names that should - have been excluded (if filter rules were specified). - - Note that various options can turn off one or both of these checks if the - option interferes with the validation. For instance: - - - Using a per-directory filter file reads filter rules that only the server - knows about, so the filter checking is disabled. - - Using the [`--old-args`](#opt) option allows the sender to manipulate the - requested arguments, so the argument checking is disabled. - - Reading the files-from list from the server side means that the client - doesn't know the argument list, so the argument checking is disabled. - - Using [`--read-batch`](#opt) disables both checks since the batch file's - contents will have been verified when it was created. - - This option may help an under-powered client server if the extra pattern - matching is slowing things down on a huge transfer. It could also be used - for a transfer from a trusted sender as a workaround if there appeared to - be a bug in the verification logic. - - When using this option it is a good idea to specify a dedicated destination - directory, as discussed in the [SECURITY](#) section. - -0. `--copy-as=USER[:GROUP]` - - This option instructs rsync to use the USER and (if specified after a - colon) the GROUP for the copy operations. This only works if the user that - is running rsync has the ability to change users. If the group is not - specified then the user's default groups are used. - - This option can help to reduce the risk in the case where rsync is being - run as root, copying into or out of a directory that might have live - changes happening to it, and you - want to make sure that root-level read or write actions of system files are - not possible. While you could alternatively run all of rsync as the - specified user, sometimes you need the root-level host-access credentials - to be used, so this allows rsync to drop root for the copying part of the - operation after the remote-shell or daemon connection is established. - - The option only affects one side of the transfer unless the transfer is - local, in which case it affects both sides. Use the - [`--remote-option`](#opt) to affect the remote side, such as - `-M--copy-as=joe`. For a local transfer, the lsh (or lsh.sh) support file - provides a local-shell helper script that can be used to allow a - "localhost:" or "lh:" host-spec to be specified without needing to setup - any remote shells, allowing you to specify remote options that affect the - side of the transfer that is using the host-spec (and using hostname "lh" - avoids the overriding of the remote directory to the user's home directory). - - For example, the following rsync writes the local files as user "joe": - - > sudo rsync -aiv --copy-as=joe host1:backups/joe/ /home/joe/ - - This makes all files owned by user "joe", limits the groups to those that - are available to that user, and makes it impossible for the joe user to do - a timed exploit of the path to induce a change to a file that the joe user - has no permissions to change. - - The following command does a local copy into the "dest/" directory as user "joe" - (assuming you've installed support/lsh into a directory on your $PATH): - - > sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/ - -0. `--temp-dir=DIR`, `-T` - - This option instructs rsync to use DIR as a scratch directory when creating - temporary copies of the files transferred on the receiving side. The - default behavior is to create each temporary file in the same directory as - the associated destination file. The temp-file - names inside the specified DIR will not be prefixed with an extra dot, - though they will still have a random suffix added. - - This option is most often used when the receiving disk partition does not - have enough free space to hold a copy of the largest file in the transfer. - In this case (i.e. when the scratch directory is on a different disk - partition), rsync will not be able to rename each received temporary file - over the top of the associated destination file, but instead must copy it - into place. Rsync does this by copying the file over the top of the - destination file, which means that the destination file will contain - truncated data during this copy. If this were not done this way, - it would be possible for the old file to continue taking up disk space (if - someone had it open), and thus there might not be enough room to fit the - new version on the disk at the same time. - - If you are using this option for reasons other than a shortage of disk - space, you may wish to combine it with the [`--delay-updates`](#opt) - option, which will ensure that all copied files get put into subdirectories - in the destination hierarchy, awaiting the end of the transfer. If you - don't have enough room to duplicate all the arriving files on the - destination partition, another way to tell rsync that you aren't overly - concerned about disk space is to use the [`--partial-dir`](#opt) option - with a relative path; because this tells rsync that it is OK to stash off a - copy of a single file in a subdirectory in the destination hierarchy, rsync will - use the partial-dir as a staging area to bring over the copied file, and - then rename it into place from there. (Specifying a [`--partial-dir`](#opt) - with an absolute path does not have this side-effect.) - -0. `--fuzzy`, `-y` - - This option tells rsync that it should look for a basis file for any - destination file that is missing. With this option, rsync looks in the same - directory as the destination file for either a file that has an identical - size and modified-time, or a similarly-named file. If found, rsync uses - the fuzzy basis file to try to speed up the transfer. - - If the option is repeated, the fuzzy scan will also be done in any matching - alternate destination directories that are specified via - [`--compare-dest`](#opt), [`--copy-dest`](#opt), or [`--link-dest`](#opt). - - Note that the use of the [`--delete`](#opt) option might get rid of any - potential fuzzy-match files, so either use [`--delete-after`](#opt) or - specify some filename exclusions if you need to prevent this. - -0. `--compare-dest=DIR` - - This option instructs rsync to use _DIR_ on the destination machine as an - additional hierarchy to compare destination files against doing transfers - (if the files are missing in the destination directory). If a file is - found in _DIR_ that is identical to the sender's file, the file will NOT be - transferred to the destination directory. This is useful for creating a - sparse backup of just files that have changed from an earlier backup. This - option is typically used to copy into an empty (or newly created) - directory. - - Multiple `--compare-dest` directories may be - provided, which will cause rsync to search the list in the order specified - for an exact match. If a match is found that differs only in attributes, a - local copy is made and the attributes updated. If a match is not found, a - basis file from one of the _DIRs_ will be selected to try to speed up the - transfer. - - Basis directories and their aliases should remain stable during the - transfer. Rsync can continue using an opened directory after its name or - alias changes. - - If _DIR_ is a relative path, it is relative to the destination directory. - See also [`--copy-dest`](#opt) and [`--link-dest`](#opt). - - NOTE: rsync will remove a file from a - non-empty destination hierarchy if an exact match is found in one of the - compare-dest hierarchies, making the end result more closely match a fresh - copy. - -0. `--copy-dest=DIR` - - This option behaves like [`--compare-dest`](#opt), but rsync will also copy - unchanged files found in _DIR_ to the destination directory using a local - copy. This is useful for doing transfers to a new destination while - leaving existing files intact, and then doing a flash-cutover when all - files have been successfully transferred. - - Multiple `--copy-dest` directories may be provided, which will cause rsync - to search the list in the order specified for an unchanged file. If a - match is not found, a basis file from one of the _DIRs_ will be selected to - try to speed up the transfer. - - If _DIR_ is a relative path, it is relative to the destination directory. - See also [`--compare-dest`](#opt) and [`--link-dest`](#opt). - -0. `--link-dest=DIR` - - This option behaves like [`--copy-dest`](#opt), but unchanged files are - hard linked from _DIR_ to the destination directory. The files must be - identical in all preserved attributes (e.g. permissions, possibly - ownership) in order for the files to be linked together. An example: - - > rsync -av --link-dest=$PWD/prior_dir host:src_dir/ new_dir/ - - If files aren't linking, double-check their attributes. Also check if - some attributes are getting forced outside of rsync's control, such a mount - option that squishes root to a single user, or mounts a removable drive - with generic ownership (such as OS X's "Ignore ownership on this volume" - option). - - Multiple `--link-dest` directories may be - provided, which will cause rsync to search the list in the order specified - for an exact match (there is a limit of 20 such directories). If a match - is found that differs only in attributes, a local copy is made and the - attributes updated. If a match is not found, a basis file from one of the - _DIRs_ will be selected to try to speed up the transfer. - - Not every filesystem can hard-link a symlink, a device node, a FIFO or a - socket, and the destination need not agree with the one rsync was built on - -- macOS builds on APFS, which can, and may write to HFS+, which cannot. - Where the destination refuses to link such an entry, it is copied instead - and the transfer carries on, so only that entry loses the space saving. - This applies to any refusal, because the error alone does not identify one: - link(2) reports `EPERM` both for a filesystem without hard links and for an - ordinary permission refusal. Regular files have always behaved this way. - - One case is not covered. With [`--hard-links`](#opt) (`-H`), a group of - such entries hard-linked to *each other* in the source needs a second link, - from the first member to the rest, inside the destination itself. Where - that link is refused too -- a destination that cannot hard-link the type at - all -- the members after the first are not created and the transfer fails. - A `--link-dest` on another filesystem is fine: only the link to _DIR_ is - impossible there, and the ones within the destination still succeed. - - This option works best when copying into an empty destination hierarchy, as - existing files may get their attributes tweaked, and that can affect - alternate destination files via hard-links. Also, itemizing of changes can - get a bit muddled. Note that prior to version 3.1.0 (September 2013), an - alternate-directory exact match would never be found (nor linked into the - destination) when a destination file already exists. - - Note that if you combine this option with [`--ignore-times`](#opt), rsync will not - link any files together because it only links identical files together as a - substitute for transferring the file, never as an additional check after - the file is updated. - - If _DIR_ is a relative path, it is relative to the destination directory. - See also [`--compare-dest`](#opt) and [`--copy-dest`](#opt). - - Note that rsync versions prior to 2.6.1 (April 2004) had a bug that could prevent - `--link-dest` from working properly for a non-super-user when - [`--owner`](#opt) (`-o`) was specified (or implied). You can work-around - this bug by avoiding the `-o` option (or using `--no-o`) when sending to a - really old remote rsync. - -0. `--compress`, `-z` - - With this option, rsync compresses the file data as it is sent to the - destination machine, which reduces the amount of data being transmitted -- - something that is useful over a slow connection. - - Rsync supports multiple compression methods and will choose one for you - unless you force the choice using the [`--compress-choice`](#opt) (`--zc`) - option. - - Run `rsync --version` to see the default compress list compiled into your - version. - - When both sides of the transfer are at least 3.2.0 (June 2020), - each side chooses its own - most-preferred algorithm that also appears in the peer's list. Both sides - order their lists strongest-first, so they converge on the strongest mutual - choice. If no common compress choice is found, rsync exits with - an error. If the remote rsync is too old to support checksum negotiation, - its list is assumed to be "zlib". - - The default order can be customized by setting the environment variable - [`RSYNC_COMPRESS_LIST`](#) to a space-separated list of acceptable - compression names. If the string contains a "`&`" character, it is - separated into the "client string & server string", otherwise the same - string applies to both. If the string (or string portion) contains no - non-whitespace characters, the default compress list is used. Any unknown - compression names are discarded from the list, but a list with only invalid - names results in a failed negotiation. - - There are some older rsync versions that were configured to reject a `-z` - option and require the use of `-zz` because their compression library was - not compatible with the default zlib compression method. You can usually - ignore this weirdness unless the rsync server complains and tells you to - specify `-zz`. - -0. `--compress-choice=STR`, `--zc=STR` - - This option can be used to override the automatic negotiation of the - compression algorithm that occurs when [`--compress`](#opt) is used. The - option implies [`--compress`](#opt) unless "none" was specified, which - instead implies `--no-compress`. - - The compression options that you may be able to use are: - - - `zstd` - - `lz4` - - `zlibx` - - `zlib` - - `none` - - Run `rsync --version` to see the default compress list compiled into your - version (which may differ from the list above). - - Note that if you see an error about an option named `--old-compress` or - `--new-compress`, this is rsync trying to send the `--compress-choice=zlib` - or `--compress-choice=zlibx` option in a backward-compatible manner that - more rsync versions understand. This error indicates that the older rsync - version on the server will not allow you to force the compression type. - - Note that the "zlibx" compression algorithm is just the "zlib" algorithm - with matched data excluded from the compression stream (to try to make it - more compatible with an external zlib implementation). - -0. `--compress-level=NUM`, `--zl=NUM` - - Explicitly set the compression level to use (see [`--compress`](#opt), - `-z`) instead of using the default. The [`--compress`](#opt) option is - implied as long as the level chosen is not a "don't compress" level for the - compression algorithm that is in effect (e.g. zlib compression treats level - 0 as "off"). - - The level values vary depending on the checksum in effect. Because rsync - will negotiate a checksum choice by default (when the remote rsync is new - enough), it can be good to combine this option with a - [`--compress-choice`](#opt) (`--zc`) option unless you're sure of the - choice in effect. For example: - - > rsync -aiv --zc=zstd --zl=22 host:src/ dest/ - - For zlib & zlibx compression the valid values are from 1 to 9 with 6 being - the default. Specifying `--zl=0` turns compression off, and specifying - `--zl=-1` chooses the default level of 6. - - For zstd compression the valid values are from -131072 to 22 with 3 being - the default. Specifying 0 chooses the default of 3. - - For lz4 compression there are no levels, so the value is always 0. - - If you specify a too-large or too-small value, the number is silently - limited to a valid value. This allows you to specify something like - `--zl=999999999` and be assured that you'll end up with the maximum - compression level no matter what algorithm was chosen. - - If you want to know the compression level that is in effect, specify - [`--debug=nstr`](#opt) to see the "negotiated string" results. This will - report something like "`Client compress: zstd (level 3)`" (along with the - checksum choice in effect). - -0. `--compress-threads=NUM`, `--zt=NUM` - - Set the number of threads to spawn when compressing data. Setting this - option to 1 or more will instruct the compression library to spawn 1 or - more threads for compression. Ideally, increasing the number of threads - will increase transfer speed if the transfer is CPU bound on the sender. - - This option does not affect decompression. - - Compression algorithms that allow threading: - - - `zstd` (only when libzstd is compiled with threading support) - - This option is ignored if one of the above alogithms is not selected as the + Compression algorithms that allow threading: + + - `zstd` (only when libzstd is compiled with threading support) + + This option is ignored if one of the above alogithms is not selected as the `--compression-choice` or if compression not enabled. -0. `--skip-compress=LIST` - - **NOTE:** no compression method currently supports per-file compression - changes, so this option has no effect. - - Override the list of file suffixes that will be compressed as little as - possible. Rsync can set the compression level on a per-file basis based on - the file's suffix. If the compression algorithm has an "off" level, then - no compression occurs for those files. Other algorithms that support - changing the streaming level on-the-fly will have the level minimized to - reduces the CPU usage as much as possible for a matching file. - - The **LIST** should be one or more file suffixes (without the dot) separated - by slashes (`/`). You may specify an empty string to indicate that no files - should be skipped. - - Simple character-class matching is supported: each must consist of a list - of letters inside the square brackets (e.g. no special classes, such as - "[:alpha:]", are supported, and '-' has no special meaning). - - The characters asterisk (`*`) and question-mark (`?`) have no special meaning. - - Here's an example that specifies 6 suffixes to skip (since 1 of the 5 rules - matches 2 suffixes): - - > --skip-compress=gz/jpg/mp[34]/7z/bz2 - - The default file suffixes in the skip-compress list in this version of - rsync are: - - [comment]: # (This list gets used for the default-dont-compress.h file.) - - > 3g2 - > 3gp - > 7z - > aac - > ace - > apk - > avi - > bz2 - > deb - > dmg - > ear - > f4v - > flac - > flv - > gpg - > gz - > iso - > jar - > jpeg - > jpg - > lrz - > lz - > lz4 - > lzma - > lzo - > m1a - > m1v - > m2a - > m2ts - > m2v - > m4a - > m4b - > m4p - > m4r - > m4v - > mka - > mkv - > mov - > mp1 - > mp2 - > mp3 - > mp4 - > mpa - > mpeg - > mpg - > mpv - > mts - > odb - > odf - > odg - > odi - > odm - > odp - > ods - > odt - > oga - > ogg - > ogm - > ogv - > ogx - > opus - > otg - > oth - > otp - > ots - > ott - > oxt - > png - > qt - > rar - > rpm - > rz - > rzip - > spx - > squashfs - > sxc - > sxd - > sxg - > sxm - > sxw - > sz - > tbz - > tbz2 - > tgz - > tlz - > ts - > txz - > tzo - > vob - > war - > webm - > webp - > xz - > z - > zip - > zst - - This list will be replaced by your `--skip-compress` list in all but one - situation: a copy from a daemon rsync will add your skipped suffixes to its - list of non-compressing files (and its list may be configured to a - different default). - -0. `--numeric-ids` - - With this option rsync will transfer numeric group and user IDs rather than - using user and group names and mapping them at both ends. - - By default rsync will use the username and groupname to determine what - ownership to give files. The special uid 0 and the special group 0 are - never mapped via user/group names even if the `--numeric-ids` option is not - specified. - - If a user or group has no name on the source system or it has no match on - the destination system, then the numeric ID from the source system is used - instead. See also the [`use chroot`](rsyncd.conf.5#use_chroot) setting - in the rsyncd.conf manpage for some comments on how the chroot setting - affects rsync's ability to look up the names of the users and groups and - what you can do about it. - -0. `--usermap=STRING`, `--groupmap=STRING` - - These options allow you to specify users and groups that should be mapped - to other values by the receiving side. The **STRING** is one or more - **FROM**:**TO** pairs of values separated by commas. Any matching **FROM** - value from the sender is replaced with a **TO** value from the receiver. - You may specify usernames or user IDs for the **FROM** and **TO** values, - and the **FROM** value may also be a wild-card string, which will be - matched against the sender's names (wild-cards do NOT match against ID - numbers, though see below for why a '`*`' matches everything). You may - instead specify a range of ID numbers via an inclusive range: LOW-HIGH. - For example: - - > --usermap=0-99:nobody,wayne:admin,*:normal --groupmap=usr:1,1:usr - - The first match in the list is the one that is used. You should specify - all your user mappings using a single `--usermap` option, and/or all your - group mappings using a single `--groupmap` option. - - Note that the sender's name for the 0 user and group are not transmitted to - the receiver, so you should either match these values using a 0, or use the - names in effect on the receiving side (typically "root"). All other - **FROM** names match those in use on the sending side. All **TO** names - match those in use on the receiving side. - - Any IDs that do not have a name on the sending side are treated as having - an empty name for the purpose of matching. This allows them to be matched - via a "`*`" or using an empty name. For instance: - - > --usermap=:nobody --groupmap=*:nobody - - An empty **FROM** value matches only sender-side IDs that have no name. It - is not a wildcard for named users or groups; use "`*`" when you want to map - every sender-side name. - - When the [`--numeric-ids`](#opt) option is used, the sender does not send any - names, so all the IDs are treated as having an empty name. This means that - you will need to specify numeric **FROM** values if you want to map these - nameless IDs to different values. - - For the `--usermap` option to work, the receiver will need to be running as - a super-user (see also the [`--super`](#opt) and [`--fake-super`](#opt) - options). For the `--groupmap` option to work, the receiver will need to - have permissions to set that group. - - The `--usermap` option implies the - [`--owner`](#opt) (`-o`) option, and the `--groupmap` option implies the - [`--group`](#opt) (`-g`) option (since rsync needs to have those options - enabled for the mapping options to work). - - An older rsync client may need to use [`-s`](#opt) to avoid a complaint - about wildcard characters, but a modern rsync handles this automatically. - -0. `--chown=USER:GROUP` - - This option forces all files to be owned by USER with group GROUP. This is - a simpler interface than using [`--usermap`](#opt) & [`--groupmap`](#opt) - directly, but it is implemented using those options internally, thus they - cannot be mixed. If either the USER or GROUP is empty, no mapping for the - omitted user/group will occur. If GROUP is empty, the trailing colon may - be omitted, but if USER is empty, a leading colon must be supplied. - - If you specify "`--chown=foo:bar`", this is exactly the same as specifying - "`--usermap=*:foo --groupmap=*:bar`", only easier (and with the same - implied [`--owner`](#opt) and/or [`--group`](#opt) options). - - An older rsync client may need to use [`-s`](#opt) to avoid a complaint - about wildcard characters, but a modern rsync handles this automatically. - -0. `--timeout=SECONDS` - - This option allows you to set a maximum I/O timeout in seconds. If no data - is transferred for the specified time then rsync will exit. The default is - 0, which means no timeout. - -0. `--contimeout=SECONDS` - - This option allows you to set the amount of time that rsync will wait for - its connection to an rsync daemon to succeed. If the timeout is reached, - rsync exits with an error. - -0. `--address=ADDRESS` - - By default rsync will bind to the wildcard address when connecting to an - rsync daemon. The `--address` option allows you to specify a specific IP - address (or hostname) to bind to. - - See also [the daemon version of the `--address` option](#dopt--address). - -0. `--port=PORT` - - This specifies an alternate TCP port number to use rather than the default - of 873. This is only needed if you are using the double-colon (::) syntax - to connect with an rsync daemon (since the URL syntax has a way to specify - the port as a part of the URL). - - See also [the daemon version of the `--port` option](#dopt--port). - -0. `--sockopts=OPTIONS` - - This option can provide endless fun for people who like to tune their - systems to the utmost degree. You can set all sorts of socket options - which may make transfers faster (or slower!). Read the manpage for the - `setsockopt()` system call for details on some of the options you may be - able to set. By default no special socket options are set. This only - affects direct socket connections to a remote rsync daemon. - - See also [the daemon version of the `--sockopts` option](#dopt--sockopts). - -0. `--blocking-io` - - This tells rsync to use blocking I/O when launching a remote shell - transport. If the remote shell is either rsh or remsh, rsync defaults to - using blocking I/O, otherwise it defaults to using non-blocking I/O. (Note - that ssh prefers non-blocking I/O.) - -0. `--outbuf=MODE` - - This sets the output buffering mode. The mode can be None (aka - Unbuffered), Line, or Block (aka Full). You may specify as little as a - single letter for the mode, and use upper or lower case. - - The main use of this option is to change Full buffering to Line buffering - when rsync's output is going to a file or pipe. - -0. `--itemize-changes`, `-i` - - Requests a simple itemized list of the changes that are being made to each - file, including attribute changes. This is exactly the same as specifying - [`--out-format='%i %n%L'`](#opt). If you repeat the option, unchanged - files will also be output, but only if the receiving rsync is at least - version 2.6.7 (March 2006). You can use `-vv` with older versions of rsync, - but 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 - of update being done, **X** is replaced by the file-type, and the other - letters represent attributes that may be output if they are being modified. - - The update types that replace the **Y** are as follows: - - - A `<` means that a file is being transferred to the remote host (sent). - - A `>` means that a file is being transferred to the local host - (received). - - A `c` means that a local change/creation is occurring for the item (such - as the creation of a directory or the changing of a symlink, etc.). - - A `h` means that the item is a hard link to another item (requires - [`--hard-links`](#opt)). - - A `.` means that the item is not being updated (though it might have - attributes that are being modified). - - A `*` means that the rest of the itemized-output area contains a message - (e.g. "deleting"). - - The file-types that replace the **X** are: `f` for a file, a `d` for a - directory, an `L` for a symlink, a `D` for a device, and a `S` for a - special file (e.g. named sockets and fifos). - - The other letters in the string indicate if some attributes of the file - have changed, as follows: - - - "`.`" - the attribute is unchanged. - - "`+`" - the file is newly created. - - "` `" - all the attributes are unchanged (all dots turn to spaces). - - "`?`" - the change is unknown (when the remote rsync is old). - - A letter indicates an attribute is being updated. - - The attribute that is associated with each letter is as follows: - - - A `c` means either that a regular file has a different checksum (requires - [`--checksum`](#opt)) or that a symlink, device, or special file has a - changed value. Note that if you are sending files to an rsync prior to - 3.0.1 (April 2008), this change flag will be present only for checksum-differing - regular files. - - A `s` means the size of a regular file is different and will be updated - by the file transfer. - - A `t` means the modification time is different and is being updated to - the sender's value (requires [`--times`](#opt)). An alternate value of - `T` means that the modification time will be set to the transfer time, - which happens when a file/symlink/device is updated without - [`--times`](#opt) and when a symlink is changed and the receiver can't - set its time. - - A `p` means the permissions are different and are being updated to the - sender's value (requires [`--perms`](#opt)). - - An `o` means the owner is different and is being updated to the sender's - value (requires [`--owner`](#opt) and super-user privileges). - - A `g` means the group is different and is being updated to the sender's - value (requires [`--group`](#opt) and the authority to set the group). - - A `u`|`n`|`b` indicates the following information: - - `u` means the access (use) time is different and is being updated to - the sender's value (requires [`--atimes`](#opt)) - - `n` means the create time (newness) is different and is being updated - to the sender's value (requires [`--crtimes`](#opt)) - - `b` means that both the access and create times are being updated - - An `a` means that the ACL information is being changed. - - An `x` means that the extended attribute information is being changed. - - One other output is possible: when deleting files, the "%i" will output the - string "`*deleting`" for each item that is being removed (assuming that you - are talking to a recent enough rsync that it logs deletions instead of - outputting them as a verbose message). - -0. `--out-format=FORMAT` - - This allows you to specify exactly what the rsync client outputs to the - user on a per-update basis. The format is a text string containing - embedded single-character escape sequences prefixed with a percent (%) - character. A default format of "%n%L" is assumed if either - [`--info=name`](#opt) or [`-v`](#opt) is specified (this tells you just the - name of the file and, if the item is a link, where it points). For a full - list of the possible escape characters, see the [`log - format`](rsyncd.conf.5#log_format) setting in the rsyncd.conf manpage. - - Specifying the `--out-format` option implies the [`--info=name`](#opt) - option, which will mention each file, directory, etc. that gets updated in a - significant way (a transferred file, a recreated symlink/device, or a - touched directory). In addition, if the itemize-changes escape (%i) is - included in the string (e.g. if the [`--itemize-changes`](#opt) option was - used), the logging of names increases to mention any item that is changed - in any way (as long as the receiving side is at least 2.6.4). See the - [`--itemize-changes`](#opt) option for a description of the output of "%i". - - Rsync will output the out-format string prior to a file's transfer unless - one of the transfer-statistic escapes is requested, in which case the - logging is done at the end of the file's transfer. When this late logging - is in effect and [`--progress`](#opt) is also specified, rsync will also - output the name of the file being transferred prior to its progress - information (followed, of course, by the out-format output). - -0. `--log-file=FILE` - - This option causes rsync to write the log of what it is doing to a file. This is - similar to the logging that a daemon does, but can be requested for the - client side and/or the server side of a non-daemon transfer. If specified - as a client option, transfer logging will be enabled with a default format - of "%i %n%L". See the [`--log-file-format`](#opt) option if you wish to - override this. - - The file uses the character encoding of the writing process's - `LC_CTYPE` locale. Rsync preserves valid characters and escapes - undecodable bytes using the byte notation described under - [`--8-bit-output`](#opt). In the `C` and `POSIX` locales or when the - codeset or its decoder is unavailable, all non-ASCII bytes are escaped. - Control characters other than tabs are escaped within each message. - Each message ends with a newline. The `--8-bit-output` option itself - does not affect log files. - - Rsync appends each complete message to a regular log file in one write. - Sharing such a log file between processes requires a filesystem that - supports atomic append. This does not apply to pipes or other devices. - - Here's an example command that requests the remote side to log what is - happening: - - > rsync -av --remote-option=--log-file=/tmp/rlog src/ dest/ - - This is very useful if you need to debug why a connection is closing - unexpectedly. - - See also [the daemon version of the `--log-file` option](#dopt--log-file). - -0. `--log-file-format=FORMAT` - - This allows you to specify exactly what per-update logging is put into the - file specified by the [`--log-file`](#opt) option (which must also be - specified for this option to have any effect). If you specify an empty - string, updated files will not be mentioned in the log file. For a list of - the possible escape characters, see the [`log format`](rsyncd.conf.5#log_format) - setting in the rsyncd.conf manpage. - - The default FORMAT used if [`--log-file`](#opt) is specified and this - option is not is '%i %n%L'. - - See also [the daemon version of the `--log-file-format` - option](#dopt--log-file-format). - -0. `--stats` - - This tells rsync to print a verbose set of statistics on the file transfer, - allowing you to tell how effective rsync's delta-transfer algorithm is for - your data. This option is equivalent to [`--info=stats2`](#opt) if - combined with 0 or 1 [`-v`](#opt) options, or [`--info=stats3`](#opt) if - combined with 2 or more [`-v`](#opt) options. - - The current statistics are as follows: - - - `Number of files` is the count of all "files" (in the generic sense), - which includes directories, symlinks, etc. The total count will be - followed by a list of counts by filetype (if the total is non-zero). For - example: "(reg: 5, dir: 3, link: 2, dev: 1, special: 1)" lists the totals - for regular files, directories, symlinks, devices, and special files. If - any value is 0, it is completely omitted from the list. - - `Number of created files` is the count of how many "files" (generic - sense) were created (as opposed to updated). The total count will be - followed by a list of counts by filetype (if the total is non-zero). - - `Number of deleted files` is the count of how many "files" (generic - sense) were deleted. The total count will be - followed by a list of counts by filetype (if the total is non-zero). - Note that this line is only output if deletions are in effect, and only - if the negotiated protocol is at least 31 (the default when both sides - are 3.1.0, September 2013, or newer). - - `Number of 4 KiB logical blocks touched` is the number of unique 4 KiB - logical file regions covered by rsync's own write operations. This metric - decouples network payload from the scope of local file modifications. - For example, a small amount of *Literal data* can result in a massive - number of touched blocks if the modifications are highly scattered - across a file, especially when using `--inplace`. - - `Number of regular files transferred` is the count of normal files that - were updated via rsync's delta-transfer algorithm, which does not include - directories, symlinks, etc. - - `Total file size` is the total sum of all file sizes in the transfer. - This does not count any size for directories or special files, but does - include the size of symlinks. - - `Total transferred file size` is the total sum of all files sizes for - just the transferred files. - - `Literal data` is how much unmatched file-update data the sender had to send to - the receiver for it to recreate the updated files. - - `Matched data` is how much data the receiver got locally when recreating - the updated files. - - `File list size` is how big the file-list data was when the sender sent - it to the receiver. This is smaller than the in-memory size for the file - list due to some compressing of duplicated data when rsync sends the - list. - - `File list generation time` is the number of seconds that the sender - spent creating the file list. This requires a modern rsync on the - sending side for this to be present. - - `File list transfer time` is the number of seconds that the sender spent - sending the file list to the receiver. - - `Total bytes sent` is the count of all the bytes that rsync sent from the - client side to the server side. - - `Total bytes received` is the count of all non-message bytes that rsync - received by the client side from the server side. "Non-message" bytes - means that we don't count the bytes for a verbose message that the server - sent to us, which makes the stats more consistent. - -0. `--8-bit-output`, `-8` - - This tells rsync to leave all high-bit characters unescaped in the output - (to standard output or standard error) - instead of trying to test them to see if they're valid in the current - locale and escaping the invalid ones. All control characters (but never - tabs) are always escaped, regardless of this option's setting. - - The escape idiom that started in 2.6.7 (March 2006) is to output a literal backslash - (`\`) and a hash (`#`), followed by exactly 3 octal digits. For example, a - newline would output as "`\#012`". A literal backslash that is in a - filename is not escaped unless it is followed by a hash and 3 digits (0-9). - -0. `--human-readable`, `-h` - - Output numbers in a more human-readable format. There are 3 possible levels: - - 1. output numbers with a separator between each set of 3 digits (either a - comma or a period, depending on if the decimal point is represented by a - period or a comma). - 2. output numbers in units of 1000 (with a character suffix for larger - units -- see below). - 3. output numbers in units of 1024. - - The default is human-readable level 1. Each `-h` option increases the - level by one. You can take the level down to 0 (to output numbers as pure - digits) by specifying the `--no-human-readable` (`--no-h`) option. Progress - rates are an exception: the default and `-h` use level 2, `--no-h` uses - level 0 and `-hh` uses level 3. - - The unit letters that are appended in levels 2 and 3 are: `K` (kilo), `M` - (mega), `G` (giga), `T` (tera), `P` (peta) or `E` (exa). For example, a - 1234567-byte file would output as 1.23M in level-2 (assuming that a - period is your local decimal point). Dynamic precision is applied, so the - three most-significant digits are shown (for example: 3.45M -> 46.7M -> - 523M -> 1.24G -> ...). - Additionally an `i` is appended in level-3 to indicate the binary base. - The same file would output as 1.17Mi in level-3. - Counts, such as the number of files, never get a unit suffix: in levels 2 - and 3 they are shown as in level 1 (for example: 523,297,101 files to - consider). - - Backward compatibility note: versions of rsync prior to 3.1.0 (September 2013) do not - support human-readable level 1, and they default to level 0. Thus, - specifying one or two `-h` options will behave in a comparable manner in - old and new versions as long as you didn't specify a `--no-h` option prior - to one or more `-h` options. See the [`--list-only`](#opt) option for one - difference. - -0. `--partial` - - By default, rsync will delete any partially transferred file if the - transfer is interrupted. In some circumstances it is more desirable to - keep partially transferred files. Using the `--partial` option tells rsync - to keep the partial file which should make a subsequent transfer of the - rest of the file much faster. - -0. `--partial-dir=DIR` - - This option modifies the behavior of the [`--partial`](#opt) option while - also implying that it be enabled. This enhanced partial-file method puts - any partially transferred files into the specified _DIR_ instead of writing - the partial file out to the destination file. On the next transfer, rsync - will use a file found in this directory as data to speed up the resumption of the - transfer and then delete it after it has served its purpose. - - Note that if [`--whole-file`](#opt) is specified (or implied), any - partial-dir files that are found for a file that is being updated will - simply be removed (since rsync is sending files without using rsync's - delta-transfer algorithm). - - Rsync will create the _DIR_ if it is missing, but just the last directory -- not - the whole path. This makes it easy to use a relative path (such as - "`--partial-dir=.rsync-partial`") to have rsync create the - partial-directory in the destination file's directory when it is needed, - and then remove it again when the partial file is deleted. Note that this - directory removal is only done for a relative pathname, as it is expected - that an absolute path is to a directory that is reserved for partial-dir - work. - - If the partial-dir value is not an absolute path, rsync will add an exclude - rule at the end of all your existing excludes. This will prevent the - sending of any partial-dir files that may exist on the sending side, and - will also prevent the untimely deletion of partial-dir items on the - receiving side. An example: the above `--partial-dir` option would add the - equivalent of this "perishable" exclude at the end of any other filter - rules: `-f '-p .rsync-partial/'` - - If you are supplying your own exclude rules, you may need to add your own - exclude/hide/protect rule for the partial-dir because: - - 1. the auto-added rule may be ineffective at the end of your other rules, or - 2. you may wish to override rsync's exclude choice. - - For instance, if you want to make rsync clean-up any left-over partial-directories - that may be lying around, you should specify [`--delete-after`](#opt) and - add a "risk" filter rule, e.g. `-f 'R .rsync-partial/'`. Avoid using - [`--delete-before`](#opt) or [`--delete-during`](#opt) unless you don't - need rsync to use any of the left-over partial-dir data during the current - run. - - IMPORTANT: the partial-dir directory should not be writable by other users or it - is a security risk! E.g. AVOID "/tmp"! - - You can also set the partial-dir value the [`RSYNC_PARTIAL_DIR`](#) - environment variable. Setting this in the environment does not force - [`--partial`](#opt) to be enabled, but rather it affects where partial - files go when [`--partial`](#opt) is specified. For instance, instead of - using `--partial-dir=.rsync-tmp` along with [`--progress`](#opt), you could - set [`RSYNC_PARTIAL_DIR=.rsync-tmp`](#) in your environment and then use - the [`-P`](#opt) option to turn on the use of the .rsync-tmp dir for - partial transfers. The only times that the [`--partial`](#opt) option does - not look for this environment value are: - - 1. when [`--inplace`](#opt) was specified (since [`--inplace`](#opt) - conflicts with `--partial-dir`), and - 2. when [`--delay-updates`](#opt) was specified (see below). - - When a modern rsync resumes the transfer of a file in the partial-dir, that - partial file is now updated in-place instead of creating yet another - tmp-file copy (so it maxes out at dest + tmp instead of dest + partial + - tmp). This requires both ends of the transfer to be at least version - 3.2.0 (June 2020). - - For the purposes of the daemon-config's "`refuse options`" setting, - `--partial-dir` does _not_ imply [`--partial`](#opt). This is so that a - refusal of the [`--partial`](#opt) option can be used to disallow the - overwriting of destination files with a partial transfer, while still - allowing the safer idiom provided by `--partial-dir`. - -0. `--delay-updates` - - This option puts the temporary file from each updated file into a holding - directory until the end of the transfer, at which time all the files are - renamed into place in rapid succession. This attempts to make the updating - of the files a little closer to atomic. By default the files are placed into a - directory named `.~tmp~` in each file's destination directory, but if - you've specified the [`--partial-dir`](#opt) option, that directory will be - used instead. See the comments in the [`--partial-dir`](#opt) section for - a discussion of how this `.~tmp~` dir will be excluded from the transfer, - and what you can do if you want rsync to cleanup old `.~tmp~` directories that - might be lying around. Conflicts with [`--inplace`](#opt) and - [`--append`](#opt). - - This option implies [`--no-inc-recursive`](#opt) since it needs the full - file list in memory in order to be able to iterate over it at the end. - - This option uses more memory on the receiving side (one bit per file - transferred) and also requires enough free disk space on the receiving side - to hold an additional copy of all the updated files. Note also that you - should not use an absolute path to [`--partial-dir`](#opt) unless: - - 1. there is no chance of any of the files in the transfer having the same - name (since all the updated files will be put into a single directory if - the path is absolute), and - 2. there are no mount points in the hierarchy (since the delayed updates - will fail if they can't be renamed into place). - - See also the "atomic-rsync" python script in the "support" subdirectory for an - update algorithm that is even closer to atomic (it uses [`--link-dest`](#opt) - and a parallel hierarchy of files). - -0. `--delay-symlinks` - - This option tells the receiving rsync to hold back the creation of new and - changed symlinks until every other file in the transfer has been put into - place, including the renames done by [`--delay-updates`](#opt). Without - it, a symlink is created as soon as rsync reaches it in the file list, so - for the rest of the transfer it can point at a file that hasn't arrived - yet. - - This narrows the window in which the destination is inconsistent; it does - not make the update atomic. A transfer that is interrupted before the end - leaves new symlinks missing and changed symlinks pointing at their old - targets. - - If a symlink is moved to a new target and the old target is deleted, also - use [`--delete-delay`](#opt) or [`--delete-after`](#opt), since - [`--delete-before`](#opt) and the default [`--delete-during`](#opt) can - remove the old target while the old symlink still points at it. - - This option implies [`--no-inc-recursive`](#opt) since it needs the full - file list in memory in order to be able to iterate over it at the end. - - Conflicts with [`--remove-source-files`](#opt), [`--hard-links`](#opt), - [`--compare-dest`](#opt), [`--copy-dest`](#opt), and [`--link-dest`](#opt). - This option is incompatible with rsync versions prior to 2.6.4 (March - 2005), and when the receiving side is remote, the remote rsync must also - support this option. - -0. `--prune-empty-dirs`, `-m` - - This option tells the receiving rsync to get rid of empty directories from - the file-list, including nested directories that have no non-directory - children. This is useful for avoiding the creation of a bunch of useless - directories when the sending rsync is recursively scanning a hierarchy of - files using include/exclude/filter rules. - - This option can still leave empty directories on the receiving side if you - make use of [TRANSFER_RULES](#). - - Because the file-list is actually being pruned, this option also affects - what directories get deleted when a delete is active. However, keep in - mind that excluded files and directories can prevent existing items from - being deleted due to an exclude both hiding source files and protecting - destination files. See the perishable filter-rule option for how to avoid - this. - - You can prevent the pruning of certain empty directories from the file-list - by using a global "protect" filter. For instance, this option would ensure - that the directory "emptydir" was kept in the file-list: - - > --filter 'protect emptydir/' - - Here's an example that copies all .pdf files in a hierarchy, only creating - the necessary destination directories to hold the .pdf files, and ensures - that any superfluous files and directories in the destination are removed - (note the hide filter of non-directories being used instead of an exclude): - - > rsync -avm --del --include='*.pdf' -f 'hide,! */' src/ dest - - If you didn't want to remove superfluous destination files, the more - time-honored options of `--include='*/' --exclude='*'` would work - fine in place of the hide-filter (if that is more natural to you). - -0. `--progress` - - This option tells rsync to print information showing the progress of the - transfer. This gives a bored user something to watch. With a modern rsync - this is the same as specifying [`--info=flist2,name,progress`](#opt), but - any user-supplied settings for those info flags takes precedence (e.g. - [`--info=flist0 --progress`](#opt)). - - While rsync is transferring a regular file, it updates a progress line that - looks like this: - - > 782,448B 63% 113KB/s 0:00:04 - - In this example, the receiver has reconstructed 782,448 bytes or 63% of the - sender's file, which is being reconstructed at a rate of 113 kilobytes - per second, and the transfer will finish in 4 seconds if the current rate - is maintained until the end. - - Progress rates are scaled in decimal units by default. `--no-h` keeps the - rate in bytes per second, while `-hh` uses binary units such as `KiB/s` and - `MiB/s`. - - These statistics can be misleading if rsync's delta-transfer algorithm is - in use. For example, if the sender's file consists of the basis file - followed by additional data, the reported rate will probably drop - dramatically when the receiver gets to the literal data, and the transfer - will probably take much longer to finish than the receiver estimated as it - was finishing the matched part of the file. - - When the file transfer finishes, rsync replaces the progress line with a - summary line that looks like this: - - > 1,238,099B 100% 150KB/s 0:00:08 (xfr#5, to-chk=169/396) - - In this example, the file was 1,238,099 bytes long in total, the average - rate of transfer for the whole file was 150 kilobytes per second over the - 8 seconds that it took to complete, it was the 5th transfer of a - regular file during the current rsync session, and there are 169 more files - for the receiver to check (to see if they are up-to-date or not) remaining - out of the 396 total files in the file-list. - - In an incremental recursion scan, rsync won't know the total number of - files in the file-list until it reaches the ends of the scan, but since it - starts to transfer files during the scan, it will display a line with the - text "ir-chk" (for incremental recursion check) instead of "to-chk" until - the point that it knows the full size of the list, at which point it will - switch to using "to-chk". Thus, seeing "ir-chk" lets you know that the - total count of files in the file list is still going to increase (and each - time it does, the count of files left to check will increase by the number - of the files added to the list). - -0. `-P` - - The `-P` option is equivalent to "[`--partial`](#opt) - [`--progress`](#opt)". Its purpose is to make it much easier to specify - these two options for a long transfer that may be interrupted. - - There is also a [`--info=progress2`](#opt) option that outputs statistics - based on the whole transfer, rather than individual files. Use this flag - without outputting a filename (e.g. avoid `-v` or specify - [`--info=name0`](#opt)) if you want to see how the transfer is doing - without scrolling the screen with a lot of names. (You don't need to - specify the [`--progress`](#opt) option in order to use - [`--info=progress2`](#opt).) - - The time field estimates time remaining during the transfer and shows - elapsed time in the final summary. - - Finally, you can get an instant progress report by sending rsync a signal - of either SIGINFO or SIGVTALRM. On BSD systems, a SIGINFO is generated by - typing a Ctrl+T (Linux doesn't currently support a SIGINFO signal). When - the client-side process receives one of those signals, it sets a flag to - output a single progress report which is output when the current file - transfer finishes (so it may take a little time if a big file is being - handled when the signal arrives). A filename is output (if needed) - followed by the [`--info=progress2`](#opt) format of progress info. If you - don't know which of the 3 rsync processes is the client process, it's OK to - signal all of them (since the non-client processes ignore the signal). - - CAUTION: sending SIGVTALRM to an older rsync (pre-3.2.0, June 2020) will kill it. - -0. `--password-file=FILE` - - This option allows you to provide a password for accessing an rsync daemon - via a file or via standard input if **FILE** is `-`. The file should - contain just the password on the first line (all other lines are ignored). - Rsync will exit with an error if **FILE** is world readable or if a - root-run rsync command finds a non-root-owned file. - - This option does not supply a password to a remote shell transport such as - ssh; to learn how to do that, consult the remote shell's documentation. - When accessing an rsync daemon using a remote shell as the transport, this - option only comes into effect after the remote shell finishes its - authentication (i.e. if you have also specified a password in the daemon's - config file). - -0. `--early-input=FILE` - - This option allows rsync to send up to 5K of data to the "early exec" - script on its stdin. One possible use of this data is to give the script a - secret that can be used to mount an encrypted filesystem (which you should - unmount in the the "post-xfer exec" script). - - The daemon must be at least version 3.2.1 (June 2020). - -0. `--list-only` - - This option will cause the source files to be listed instead of - transferred. This option is inferred if there is a single source argument and - no destination specified, so its main uses are: - - 1. to turn a copy command that includes a destination argument into a - file-listing command, or - 2. to be able to specify more than one source argument. Note: be sure to - include the destination. - - CAUTION: keep in mind that a source argument with a wild-card is expanded by the - shell into multiple arguments, so it is never safe to try to specify a single - wild-card argument to try to infer this option. A safe example is: - - > rsync -av --list-only foo* dest/ - - This option always uses an output format that looks similar to this: - - > drwxrwxr-x 4,096 2022/09/30 12:53:11 support - > -rw-rw-r-- 80 2005/01/11 10:37:37 support/Makefile - - The only option that affects this output style is the - [`--human-readable`](#opt) (`-h`) option. The default is to output sizes - as byte counts with digit separators (in a 14-character-width column). - Specifying at least one `-h` option makes the sizes output with unit - suffixes. If you want old-style bytecount sizes without digit separators - (and an 11-character-width column) use `--no-h`. - - Compatibility note: when requesting a remote listing of files from an rsync - that is version 2.6.3 or older (i.e., pre-2005), - you may encounter an error if you ask for a - non-recursive listing. This is because a file listing implies the - [`--dirs`](#opt) option without [`--recursive`](#opt), and older rsyncs don't - have that option. To avoid this problem, either specify the `--no-dirs` - option (if you don't need to expand a directory's content), or turn on - recursion and exclude the content of subdirectories: `-r --exclude='/*/*'`. - -0. `--bwlimit=RATE` - - This option allows you to specify the maximum transfer rate for the data - sent over the socket, specified in units per second. The RATE value can be - suffixed with a string to indicate a size multiplier, and may be a - fractional value (e.g. `--bwlimit=1.5m`). If no suffix is specified, the - value will be assumed to be in units of 1024 bytes (as if "K" or "KiB" had - been appended). See the [`--max-size`](#opt) option for a description of - all the available suffixes. A value of 0 specifies no limit. - - For backward-compatibility reasons, the rate limit will be rounded to the - nearest KiB unit, so no rate smaller than 1024 bytes per second is - possible. - - Rsync writes data over the socket in blocks, and this option both limits - the size of the blocks that rsync writes, and tries to keep the average - transfer rate at the requested limit. Some burstiness may be seen where - rsync writes out a block of data and then sleeps to bring the average rate - into compliance. - - Due to the internal buffering of data, the [`--progress`](#opt) option may - not be an accurate reflection on how fast the data is being sent. This is - because some files can show up as being rapidly sent when the data is - quickly buffered, while other can show up as very slow when the flushing of - the output buffer occurs. This may be fixed in a future version. - - See also [the daemon version of the `--bwlimit` option](#dopt--bwlimit). - -0. `--stop-after=MINS`, (`--time-limit=MINS`) - - This option tells rsync to stop copying when the specified number of - minutes has elapsed. - - For maximal flexibility, rsync does not communicate this option to the - remote rsync since it is usually enough that one side of the connection - quits as specified. This allows the option's use even when only one side - of the connection supports it. You can tell the remote side about the time - limit using [`--remote-option`](#opt) (`-M`), should the need arise. - - The `--time-limit` version of this option is deprecated. - -0. `--stop-at=y-m-dTh:m` - - This option tells rsync to stop copying when the specified point in time - has been reached. The date & time can be fully specified in a numeric - format of year-month-dayThour:minute (e.g. 2000-12-31T23:59) in the local - timezone. You may choose to separate the date numbers using slashes - instead of dashes. - - The value can also be abbreviated in a variety of ways, such as specifying - a 2-digit year and/or leaving off various values. In all cases, the value - will be taken to be the next possible point in time where the supplied - information matches. If the value specifies the current time or a past - time, rsync exits with an error. - - For example, "1-30" specifies the next January 30th (at midnight local - time), "14:00" specifies the next 2 P.M., "1" specifies the next 1st of the - month at midnight, "31" specifies the next month where we can stop on its - 31st day, and ":59" specifies the next 59th minute after the hour. - - For maximal flexibility, rsync does not communicate this option to the - remote rsync since it is usually enough that one side of the connection - quits as specified. This allows the option's use even when only one side - of the connection supports it. You can tell the remote side about the time - limit using [`--remote-option`](#opt) (`-M`), should the need arise. Do - keep in mind that the remote host may have a different default timezone - than your local host. - -0. `--fsync` - - Cause the receiving side to fsync each finished file. This may slow down - the transfer, but can help to provide peace of mind when updating critical - files. - -0. `--write-batch=FILE` - - Record a file that can later be applied to another identical destination - with [`--read-batch`](#opt). See the "BATCH MODE" section for details, and - also the [`--only-write-batch`](#opt) option. - - This option overrides the negotiated checksum & compress lists and always - negotiates a choice based on old-school md5/md4/zlib choices. This means - batch mode is not compatible with newer compression choices such as zstd or - lz4. - -0. `--only-write-batch=FILE` - - Works like [`--write-batch`](#opt), except that no updates are made on the - destination system when creating the batch. This lets you transport the - changes to the destination system via some other means and then apply the - changes via [`--read-batch`](#opt). - - Note that you can feel free to write the batch directly to some portable - media: if this media fills to capacity before the end of the transfer, you - can just apply that partial transfer to the destination and repeat the - whole process to get the rest of the changes (as long as you don't mind a - partially updated destination system while the multi-update cycle is - happening). - - Also note that you only save bandwidth when pushing changes to a remote - system because this allows the batched data to be diverted from the sender - into the batch file without having to flow over the wire to the receiver - (when pulling, the sender is remote, and thus can't write the batch). - -0. `--read-batch=FILE` - - Apply all of the changes stored in FILE, a file previously generated by - [`--write-batch`](#opt). If _FILE_ is `-`, the batch data will be read - from standard input. See the "BATCH MODE" section for details. - -0. `--protocol=NUM` - - Force an older protocol version to be used. This is useful for creating a - batch file that is compatible with an older version of rsync. For - instance, if rsync 2.6.4 is being used with the [`--write-batch`](#opt) - option, but rsync 2.6.3 is what will be used to run the - [`--read-batch`](#opt) option, you should use "--protocol=28" when creating - the batch file to force the older protocol version to be used in the batch - file (assuming you can't upgrade the rsync on the reading system). - -0. `--iconv=CONVERT_SPEC` - - Rsync can convert filenames between character sets using this option. - Using a CONVERT_SPEC of "." tells rsync to look up the default - character-set via the locale setting. Alternately, you can fully specify - what conversion to do by giving a local and a remote charset separated by a - comma in the order `--iconv=LOCAL,REMOTE`, e.g. `--iconv=utf8,iso88591`. - This order ensures that the option will stay the same whether you're - pushing or pulling files. Finally, you can specify either `--no-iconv` or - a CONVERT_SPEC of "-" to turn off any conversion. The default setting of - this option is site-specific, and can also be affected via the - [`RSYNC_ICONV`](#) environment variable. - - For a list of what charset names your local iconv library supports, you can - run "`iconv --list`". - - If you specify the [`--secluded-args`](#opt) (`-s`) option, rsync will - translate the filenames you specify on the command-line that are being sent - to the remote host. See also the [`--files-from`](#opt) option. - - Note that rsync does not do any conversion of names in filter files - (including include/exclude files). It is up to you to ensure that you're - specifying matching rules that can match on both sides of the transfer. - For instance, you can specify extra include/exclude rules if there are - filename differences on the two sides that need to be accounted for. - - When you pass an `--iconv` option to an rsync daemon that allows it, the - daemon uses the charset specified in its "charset" configuration parameter - regardless of the remote charset you actually pass. Thus, you may feel - free to specify just the local charset for a daemon transfer (e.g. - `--iconv=utf8`). - -0. `--ipv4`, `-4` or `--ipv6`, `-6` - - Tells rsync to prefer IPv4/IPv6 when creating sockets or running ssh. This - affects sockets that rsync has direct control over, such as the outgoing - socket when directly contacting an rsync daemon, as well as the forwarding - of the `-4` or `-6` option to ssh when rsync can deduce that ssh is being - used as the remote shell. For other remote shells you'll need to specify - the "`--rsh SHELL -4`" option directly (or whatever IPv4/IPv6 hint options - it uses). - - See also [the daemon version of these options](#dopt--ipv4). - - If rsync was compiled without support for IPv6, the `--ipv6` option will - have no effect. The `rsync --version` output will contain "`no IPv6`" if - is the case. - -0. `--checksum-seed=NUM` - - Set the checksum seed to the integer NUM. This 4 byte checksum seed is - included in each block and MD4 file checksum calculation (the more modern - file checksums don't use a seed). By default the checksum seed is - generated by the server and defaults to the current **time**(). This - option is used to set a specific checksum seed, which is useful for - applications that want repeatable block checksums, or in the case where the - user wants a more random checksum seed. Setting NUM to 0 causes rsync to - use the default of **time**() for checksum seed. - -0. `--nice=SETTINGS` - - Adjust the CPU and I/O scheduling priority of the local process, the remote - process or both. SETTINGS is a comma-separated list. Each setting is - `TARGET`, `PRIORITY` or `TARGET:PRIORITY`. `TARGET` is `local`, `remote` or - `all`. Omitting `TARGET` applies the priority to both processes. A - target-only setting uses `19/idle`. Target names and I/O values are - case-insensitive. - - `PRIORITY` is a CPU nice value from -20 to 19, an I/O value or both - separated by `/`. I/O values are `none`, `idle`, `rt_0` through `rt_7` and - `be_0` through `be_7`. `none` restores the kernel-derived I/O priority. - Higher nice values and higher `rt` or `be` suffixes mean lower priority. - Raising priority may require additional privilege. - - A setting that specifies only CPU or I/O priority leaves the other component - unchanged. For example, - `--nice=remote:5 --nice=remote:idle` requests remote CPU priority 5 and - remote idle I/O priority. Later settings replace earlier values for the - same component. `--no-nice` clears all earlier settings. - - Examples: - - --nice=19/idle - --nice=local:10,remote:idle - --nice=local:19/be_7,remote:5 - - The remote rsync must support this option before a remote setting can be - used. Daemon clients may request only CPU nice 19, idle I/O priority or - both. A daemon administrator can also refuse the option with - `refuse options = nice`. When starting a daemon, the local setting is - applied before it accepts client settings. A standalone listener passes - that priority to its workers. A daemon's remote setting has no meaning. - - If a priority change is unsupported or fails, rsync warns and continues the - transfer. +111. `--skip-compress=LIST` + + **NOTE:** no compression method currently supports per-file compression + changes, so this option has no effect. + + Override the list of file suffixes that will be compressed as little as + possible. Rsync can set the compression level on a per-file basis based on + the file's suffix. If the compression algorithm has an "off" level, then + no compression occurs for those files. Other algorithms that support + changing the streaming level on-the-fly will have the level minimized to + reduces the CPU usage as much as possible for a matching file. + + The **LIST** should be one or more file suffixes (without the dot) separated + by slashes (`/`). You may specify an empty string to indicate that no files + should be skipped. + + Simple character-class matching is supported: each must consist of a list + of letters inside the square brackets (e.g. no special classes, such as + "[:alpha:]", are supported, and '-' has no special meaning). + + The characters asterisk (`*`) and question-mark (`?`) have no special meaning. + + Here's an example that specifies 6 suffixes to skip (since 1 of the 5 rules + matches 2 suffixes): + + > ``` + > --skip-compress=gz/jpg/mp[34]/7z/bz2 + > ``` + + The default file suffixes in the skip-compress list in this version of + rsync are: + + > 3g2 + > 3gp + > 7z + > aac + > ace + > apk + > avi + > bz2 + > deb + > dmg + > ear + > f4v + > flac + > flv + > gpg + > gz + > iso + > jar + > jpeg + > jpg + > lrz + > lz + > lz4 + > lzma + > lzo + > m1a + > m1v + > m2a + > m2ts + > m2v + > m4a + > m4b + > m4p + > m4r + > m4v + > mka + > mkv + > mov + > mp1 + > mp2 + > mp3 + > mp4 + > mpa + > mpeg + > mpg + > mpv + > mts + > odb + > odf + > odg + > odi + > odm + > odp + > ods + > odt + > oga + > ogg + > ogm + > ogv + > ogx + > opus + > otg + > oth + > otp + > ots + > ott + > oxt + > png + > qt + > rar + > rpm + > rz + > rzip + > spx + > squashfs + > sxc + > sxd + > sxg + > sxm + > sxw + > sz + > tbz + > tbz2 + > tgz + > tlz + > ts + > txz + > tzo + > vob + > war + > webm + > webp + > xz + > z + > zip + > zst + + This list will be replaced by your `--skip-compress` list in all but one + situation: a copy from a daemon rsync will add your skipped suffixes to its + list of non-compressing files (and its list may be configured to a + different default). + +112. `--numeric-ids` + + With this option rsync will transfer numeric group and user IDs rather than + using user and group names and mapping them at both ends. + + By default rsync will use the username and groupname to determine what + ownership to give files. The special uid 0 and the special group 0 are + never mapped via user/group names even if the `--numeric-ids` option is not + specified. + + If a user or group has no name on the source system or it has no match on + the destination system, then the numeric ID from the source system is used + instead. See also the [`use chroot`](rsyncd.conf.5#use_chroot) setting + in the rsyncd.conf manpage for some comments on how the chroot setting + affects rsync's ability to look up the names of the users and groups and + what you can do about it. + +113. `--usermap=STRING`, `--groupmap=STRING` + + These options allow you to specify users and groups that should be mapped + to other values by the receiving side. The **STRING** is one or more + **FROM**:**TO** pairs of values separated by commas. Any matching **FROM** + value from the sender is replaced with a **TO** value from the receiver. + You may specify usernames or user IDs for the **FROM** and **TO** values, + and the **FROM** value may also be a wild-card string, which will be + matched against the sender's names (wild-cards do NOT match against ID + numbers, though see below for why a '`*`' matches everything). You may + instead specify a range of ID numbers via an inclusive range: LOW-HIGH. + For example: + + > ``` + > --usermap=0-99:nobody,wayne:admin,*:normal --groupmap=usr:1,1:usr + > ``` + + The first match in the list is the one that is used. You should specify + all your user mappings using a single `--usermap` option, and/or all your + group mappings using a single `--groupmap` option. + + Note that the sender's name for the 0 user and group are not transmitted to + the receiver, so you should either match these values using a 0, or use the + names in effect on the receiving side (typically "root"). All other + **FROM** names match those in use on the sending side. All **TO** names + match those in use on the receiving side. + + Any IDs that do not have a name on the sending side are treated as having + an empty name for the purpose of matching. This allows them to be matched + via a "`*`" or using an empty name. For instance: + + > ``` + > --usermap=:nobody --groupmap=*:nobody + > ``` + + An empty **FROM** value matches only sender-side IDs that have no name. It + is not a wildcard for named users or groups; use "`*`" when you want to map + every sender-side name. + + When the [`--numeric-ids`](#opt) option is used, the sender does not send any + names, so all the IDs are treated as having an empty name. This means that + you will need to specify numeric **FROM** values if you want to map these + nameless IDs to different values. + + For the `--usermap` option to work, the receiver will need to be running as + a super-user (see also the [`--super`](#opt) and [`--fake-super`](#opt) + options). For the `--groupmap` option to work, the receiver will need to + have permissions to set that group. + + The `--usermap` option implies the + [`--owner`](#opt) (`-o`) option, and the `--groupmap` option implies the + [`--group`](#opt) (`-g`) option (since rsync needs to have those options + enabled for the mapping options to work). + + An older rsync client may need to use [`-s`](#opt) to avoid a complaint + about wildcard characters, but a modern rsync handles this automatically. + +114. `--chown=USER:GROUP` + + This option forces all files to be owned by USER with group GROUP. This is + a simpler interface than using [`--usermap`](#opt) & [`--groupmap`](#opt) + directly, but it is implemented using those options internally, thus they + cannot be mixed. If either the USER or GROUP is empty, no mapping for the + omitted user/group will occur. If GROUP is empty, the trailing colon may + be omitted, but if USER is empty, a leading colon must be supplied. + + If you specify "`--chown=foo:bar`", this is exactly the same as specifying + "`--usermap=*:foo --groupmap=*:bar`", only easier (and with the same + implied [`--owner`](#opt) and/or [`--group`](#opt) options). + + An older rsync client may need to use [`-s`](#opt) to avoid a complaint + about wildcard characters, but a modern rsync handles this automatically. + +115. `--timeout=SECONDS` + + This option allows you to set a maximum I/O timeout in seconds. If no data + is transferred for the specified time then rsync will exit. The default is + 0, which means no timeout. + +116. `--contimeout=SECONDS` + + This option allows you to set the amount of time that rsync will wait for + its connection to an rsync daemon to succeed. If the timeout is reached, + rsync exits with an error. + +117. `--address=ADDRESS` + + By default rsync will bind to the wildcard address when connecting to an + rsync daemon. The `--address` option allows you to specify a specific IP + address (or hostname) to bind to. + + See also [the daemon version of the `--address` option](#dopt--address). + +118. `--port=PORT` + + This specifies an alternate TCP port number to use rather than the default + of 873. This is only needed if you are using the double-colon (::) syntax + to connect with an rsync daemon (since the URL syntax has a way to specify + the port as a part of the URL). + + See also [the daemon version of the `--port` option](#dopt--port). + +119. `--sockopts=OPTIONS` + + This option can provide endless fun for people who like to tune their + systems to the utmost degree. You can set all sorts of socket options + which may make transfers faster (or slower!). Read the manpage for the + `setsockopt()` system call for details on some of the options you may be + able to set. By default no special socket options are set. This only + affects direct socket connections to a remote rsync daemon. + + See also [the daemon version of the `--sockopts` option](#dopt--sockopts). + +120. `--blocking-io` + + This tells rsync to use blocking I/O when launching a remote shell + transport. If the remote shell is either rsh or remsh, rsync defaults to + using blocking I/O, otherwise it defaults to using non-blocking I/O. (Note + that ssh prefers non-blocking I/O.) + +121. `--outbuf=MODE` + + This sets the output buffering mode. The mode can be None (aka + Unbuffered), Line, or Block (aka Full). You may specify as little as a + single letter for the mode, and use upper or lower case. + + The main use of this option is to change Full buffering to Line buffering + when rsync's output is going to a file or pipe. + +122. `--itemize-changes`, `-i` + + Requests a simple itemized list of the changes that are being made to each + file, including attribute changes. This is exactly the same as specifying + [`--out-format='%i %n%L'`](#opt). If you repeat the option, unchanged + files will also be output, but only if the receiving rsync is at least + version 2.6.7 (March 2006). You can use `-vv` with older versions of rsync, + but 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 + of update being done, **X** is replaced by the file-type, and the other + letters represent attributes that may be output if they are being modified. + + The update types that replace the **Y** are as follows: + + - A `<` means that a file is being transferred to the remote host (sent). + - A `>` means that a file is being transferred to the local host + (received). + - A `c` means that a local change/creation is occurring for the item (such + as the creation of a directory or the changing of a symlink, etc.). + - A `h` means that the item is a hard link to another item (requires + [`--hard-links`](#opt)). + - A `.` means that the item is not being updated (though it might have + attributes that are being modified). + - A `*` means that the rest of the itemized-output area contains a message + (e.g. "deleting"). + + The file-types that replace the **X** are: `f` for a file, a `d` for a + directory, an `L` for a symlink, a `D` for a device, and a `S` for a + special file (e.g. named sockets and fifos). + + The other letters in the string indicate if some attributes of the file + have changed, as follows: + + - "`.`" - the attribute is unchanged. + - "`+`" - the file is newly created. + - "` `" - all the attributes are unchanged (all dots turn to spaces). + - "`?`" - the change is unknown (when the remote rsync is old). + - A letter indicates an attribute is being updated. + + The attribute that is associated with each letter is as follows: + + - A `c` means either that a regular file has a different checksum (requires + [`--checksum`](#opt)) or that a symlink, device, or special file has a + changed value. Note that if you are sending files to an rsync prior to + 3.0.1 (April 2008), this change flag will be present only for checksum-differing + regular files. + - A `s` means the size of a regular file is different and will be updated + by the file transfer. + - A `t` means the modification time is different and is being updated to + the sender's value (requires [`--times`](#opt)). An alternate value of + `T` means that the modification time will be set to the transfer time, + which happens when a file/symlink/device is updated without + [`--times`](#opt) and when a symlink is changed and the receiver can't + set its time. + - A `p` means the permissions are different and are being updated to the + sender's value (requires [`--perms`](#opt)). + - An `o` means the owner is different and is being updated to the sender's + value (requires [`--owner`](#opt) and super-user privileges). + - A `g` means the group is different and is being updated to the sender's + value (requires [`--group`](#opt) and the authority to set the group). + - A `u`|`n`|`b` indicates the following information: + - `u` means the access (use) time is different and is being updated to + the sender's value (requires [`--atimes`](#opt)) + - `n` means the create time (newness) is different and is being updated + to the sender's value (requires [`--crtimes`](#opt)) + - `b` means that both the access and create times are being updated + - An `a` means that the ACL information is being changed. + - An `x` means that the extended attribute information is being changed. + + One other output is possible: when deleting files, the "%i" will output the + string "`*deleting`" for each item that is being removed (assuming that you + are talking to a recent enough rsync that it logs deletions instead of + outputting them as a verbose message). + +123. `--out-format=FORMAT` + + This allows you to specify exactly what the rsync client outputs to the + user on a per-update basis. The format is a text string containing + embedded single-character escape sequences prefixed with a percent (%) + character. A default format of "%n%L" is assumed if either + [`--info=name`](#opt) or [`-v`](#opt) is specified (this tells you just the + name of the file and, if the item is a link, where it points). For a full + list of the possible escape characters, see the [`log format`](rsyncd.conf.5#log_format) setting in the rsyncd.conf manpage. + + Specifying the `--out-format` option implies the [`--info=name`](#opt) + option, which will mention each file, directory, etc. that gets updated in a + significant way (a transferred file, a recreated symlink/device, or a + touched directory). In addition, if the itemize-changes escape (%i) is + included in the string (e.g. if the [`--itemize-changes`](#opt) option was + used), the logging of names increases to mention any item that is changed + in any way (as long as the receiving side is at least 2.6.4). See the + [`--itemize-changes`](#opt) option for a description of the output of "%i". + + Rsync will output the out-format string prior to a file's transfer unless + one of the transfer-statistic escapes is requested, in which case the + logging is done at the end of the file's transfer. When this late logging + is in effect and [`--progress`](#opt) is also specified, rsync will also + output the name of the file being transferred prior to its progress + information (followed, of course, by the out-format output). + +124. `--log-file=FILE` + + This option causes rsync to write the log of what it is doing to a file. This is + similar to the logging that a daemon does, but can be requested for the + client side and/or the server side of a non-daemon transfer. If specified + as a client option, transfer logging will be enabled with a default format + of "%i %n%L". See the [`--log-file-format`](#opt) option if you wish to + override this. + + The file uses the character encoding of the writing process's + `LC_CTYPE` locale. Rsync preserves valid characters and escapes + undecodable bytes using the byte notation described under + [`--8-bit-output`](#opt). In the `C` and `POSIX` locales or when the + codeset or its decoder is unavailable, all non-ASCII bytes are escaped. + Control characters other than tabs are escaped within each message. + Each message ends with a newline. The `--8-bit-output` option itself + does not affect log files. + + Rsync appends each complete message to a regular log file in one write. + Sharing such a log file between processes requires a filesystem that + supports atomic append. This does not apply to pipes or other devices. + + Here's an example command that requests the remote side to log what is + happening: + + > ``` + > rsync -av --remote-option=--log-file=/tmp/rlog src/ dest/ + > ``` + + This is very useful if you need to debug why a connection is closing + unexpectedly. + + See also [the daemon version of the `--log-file` option](#dopt--log-file). + +125. `--log-file-format=FORMAT` + + This allows you to specify exactly what per-update logging is put into the + file specified by the [`--log-file`](#opt) option (which must also be + specified for this option to have any effect). If you specify an empty + string, updated files will not be mentioned in the log file. For a list of + the possible escape characters, see the [`log format`](rsyncd.conf.5#log_format) + setting in the rsyncd.conf manpage. + + The default FORMAT used if [`--log-file`](#opt) is specified and this + option is not is '%i %n%L'. + + See also [the daemon version of the `--log-file-format` + option](#dopt--log-file-format). + +126. `--stats` + + This tells rsync to print a verbose set of statistics on the file transfer, + allowing you to tell how effective rsync's delta-transfer algorithm is for + your data. This option is equivalent to [`--info=stats2`](#opt) if + combined with 0 or 1 [`-v`](#opt) options, or [`--info=stats3`](#opt) if + combined with 2 or more [`-v`](#opt) options. + + The current statistics are as follows: + + - `Number of files` is the count of all "files" (in the generic sense), + which includes directories, symlinks, etc. The total count will be + followed by a list of counts by filetype (if the total is non-zero). For + example: "(reg: 5, dir: 3, link: 2, dev: 1, special: 1)" lists the totals + for regular files, directories, symlinks, devices, and special files. If + any value is 0, it is completely omitted from the list. + - `Number of created files` is the count of how many "files" (generic + sense) were created (as opposed to updated). The total count will be + followed by a list of counts by filetype (if the total is non-zero). + - `Number of deleted files` is the count of how many "files" (generic + sense) were deleted. The total count will be + followed by a list of counts by filetype (if the total is non-zero). + Note that this line is only output if deletions are in effect, and only + if the negotiated protocol is at least 31 (the default when both sides + are 3.1.0, September 2013, or newer). + - `Number of 4 KiB logical blocks touched` is the number of unique 4 KiB + logical file regions covered by rsync's own write operations. This metric + decouples network payload from the scope of local file modifications. + For example, a small amount of *Literal data* can result in a massive + number of touched blocks if the modifications are highly scattered + across a file, especially when using `--inplace`. + - `Number of regular files transferred` is the count of normal files that + were updated via rsync's delta-transfer algorithm, which does not include + directories, symlinks, etc. + - `Total file size` is the total sum of all file sizes in the transfer. + This does not count any size for directories or special files, but does + include the size of symlinks. + - `Total transferred file size` is the total sum of all files sizes for + just the transferred files. + - `Literal data` is how much unmatched file-update data the sender had to send to + the receiver for it to recreate the updated files. + - `Matched data` is how much data the receiver got locally when recreating + the updated files. + - `File list size` is how big the file-list data was when the sender sent + it to the receiver. This is smaller than the in-memory size for the file + list due to some compressing of duplicated data when rsync sends the + list. + - `File list generation time` is the number of seconds that the sender + spent creating the file list. This requires a modern rsync on the + sending side for this to be present. + - `File list transfer time` is the number of seconds that the sender spent + sending the file list to the receiver. + - `Total bytes sent` is the count of all the bytes that rsync sent from the + client side to the server side. + - `Total bytes received` is the count of all non-message bytes that rsync + received by the client side from the server side. "Non-message" bytes + means that we don't count the bytes for a verbose message that the server + sent to us, which makes the stats more consistent. + +127. `--8-bit-output`, `-8` + + This tells rsync to leave all high-bit characters unescaped in the output + (to standard output or standard error) + instead of trying to test them to see if they're valid in the current + locale and escaping the invalid ones. All control characters (but never + tabs) are always escaped, regardless of this option's setting. + + The escape idiom that started in 2.6.7 (March 2006) is to output a literal backslash + (`\`) and a hash (`#`), followed by exactly 3 octal digits. For example, a + newline would output as "`\#012`". A literal backslash that is in a + filename is not escaped unless it is followed by a hash and 3 digits (0-9). + +128. `--human-readable`, `-h` + + Output numbers in a more human-readable format. There are 3 possible levels: + + 1. output numbers with a separator between each set of 3 digits (either a + comma or a period, depending on if the decimal point is represented by a + period or a comma). + 2. output numbers in units of 1000 (with a character suffix for larger + units -- see below). + 3. output numbers in units of 1024. + + The default is human-readable level 1. Each `-h` option increases the + level by one. You can take the level down to 0 (to output numbers as pure + digits) by specifying the `--no-human-readable` (`--no-h`) option. Progress + rates are an exception: the default and `-h` use level 2, `--no-h` uses + level 0 and `-hh` uses level 3. + + The unit letters that are appended in levels 2 and 3 are: `K` (kilo), `M` + (mega), `G` (giga), `T` (tera), `P` (peta) or `E` (exa). For example, a + 1234567-byte file would output as 1.23M in level-2 (assuming that a + period is your local decimal point). Dynamic precision is applied, so the + three most-significant digits are shown (for example: 3.45M -> 46.7M -> + 523M -> 1.24G -> ...). + Additionally an `i` is appended in level-3 to indicate the binary base. + The same file would output as 1.17Mi in level-3. + Counts, such as the number of files, never get a unit suffix: in levels 2 + and 3 they are shown as in level 1 (for example: 523,297,101 files to + consider). + + Backward compatibility note: versions of rsync prior to 3.1.0 (September 2013) do not + support human-readable level 1, and they default to level 0. Thus, + specifying one or two `-h` options will behave in a comparable manner in + old and new versions as long as you didn't specify a `--no-h` option prior + to one or more `-h` options. See the [`--list-only`](#opt) option for one + difference. + +129. `--partial` + + By default, rsync will delete any partially transferred file if the + transfer is interrupted. In some circumstances it is more desirable to + keep partially transferred files. Using the `--partial` option tells rsync + to keep the partial file which should make a subsequent transfer of the + rest of the file much faster. + +130. `--partial-dir=DIR` + + This option modifies the behavior of the [`--partial`](#opt) option while + also implying that it be enabled. This enhanced partial-file method puts + any partially transferred files into the specified _DIR_ instead of writing + the partial file out to the destination file. On the next transfer, rsync + will use a file found in this directory as data to speed up the resumption of the + transfer and then delete it after it has served its purpose. + + Note that if [`--whole-file`](#opt) is specified (or implied), any + partial-dir files that are found for a file that is being updated will + simply be removed (since rsync is sending files without using rsync's + delta-transfer algorithm). + + Rsync will create the _DIR_ if it is missing, but just the last directory -- not + the whole path. This makes it easy to use a relative path (such as + "`--partial-dir=.rsync-partial`") to have rsync create the + partial-directory in the destination file's directory when it is needed, + and then remove it again when the partial file is deleted. Note that this + directory removal is only done for a relative pathname, as it is expected + that an absolute path is to a directory that is reserved for partial-dir + work. + + If the partial-dir value is not an absolute path, rsync will add an exclude + rule at the end of all your existing excludes. This will prevent the + sending of any partial-dir files that may exist on the sending side, and + will also prevent the untimely deletion of partial-dir items on the + receiving side. An example: the above `--partial-dir` option would add the + equivalent of this "perishable" exclude at the end of any other filter + rules: `-f '-p .rsync-partial/'` + + If you are supplying your own exclude rules, you may need to add your own + exclude/hide/protect rule for the partial-dir because: + + 1. the auto-added rule may be ineffective at the end of your other rules, or + 2. you may wish to override rsync's exclude choice. + + For instance, if you want to make rsync clean-up any left-over partial-directories + that may be lying around, you should specify [`--delete-after`](#opt) and + add a "risk" filter rule, e.g. `-f 'R .rsync-partial/'`. Avoid using + [`--delete-before`](#opt) or [`--delete-during`](#opt) unless you don't + need rsync to use any of the left-over partial-dir data during the current + run. + + IMPORTANT: the partial-dir directory should not be writable by other users or it + is a security risk! E.g. AVOID "/tmp"! + + You can also set the partial-dir value the [`RSYNC_PARTIAL_DIR`](#) + environment variable. Setting this in the environment does not force + [`--partial`](#opt) to be enabled, but rather it affects where partial + files go when [`--partial`](#opt) is specified. For instance, instead of + using `--partial-dir=.rsync-tmp` along with [`--progress`](#opt), you could + set [`RSYNC_PARTIAL_DIR=.rsync-tmp`](#) in your environment and then use + the [`-P`](#opt) option to turn on the use of the .rsync-tmp dir for + partial transfers. The only times that the [`--partial`](#opt) option does + not look for this environment value are: + + 1. when [`--inplace`](#opt) was specified (since [`--inplace`](#opt) + conflicts with `--partial-dir`), and + 2. when [`--delay-updates`](#opt) was specified (see below). + + When a modern rsync resumes the transfer of a file in the partial-dir, that + partial file is now updated in-place instead of creating yet another + tmp-file copy (so it maxes out at dest + tmp instead of dest + partial + + tmp). This requires both ends of the transfer to be at least version + 3.2.0 (June 2020). + + For the purposes of the daemon-config's "`refuse options`" setting, + `--partial-dir` does _not_ imply [`--partial`](#opt). This is so that a + refusal of the [`--partial`](#opt) option can be used to disallow the + overwriting of destination files with a partial transfer, while still + allowing the safer idiom provided by `--partial-dir`. + +131. `--delay-updates` + + This option puts the temporary file from each updated file into a holding + directory until the end of the transfer, at which time all the files are + renamed into place in rapid succession. This attempts to make the updating + of the files a little closer to atomic. By default the files are placed into a + directory named `.~tmp~` in each file's destination directory, but if + you've specified the [`--partial-dir`](#opt) option, that directory will be + used instead. See the comments in the [`--partial-dir`](#opt) section for + a discussion of how this `.~tmp~` dir will be excluded from the transfer, + and what you can do if you want rsync to cleanup old `.~tmp~` directories that + might be lying around. Conflicts with [`--inplace`](#opt) and + [`--append`](#opt). + + This option implies [`--no-inc-recursive`](#opt) since it needs the full + file list in memory in order to be able to iterate over it at the end. + + This option uses more memory on the receiving side (one bit per file + transferred) and also requires enough free disk space on the receiving side + to hold an additional copy of all the updated files. Note also that you + should not use an absolute path to [`--partial-dir`](#opt) unless: + + 1. there is no chance of any of the files in the transfer having the same + name (since all the updated files will be put into a single directory if + the path is absolute), and + 2. there are no mount points in the hierarchy (since the delayed updates + will fail if they can't be renamed into place). + + See also the "atomic-rsync" python script in the "support" subdirectory for an + update algorithm that is even closer to atomic (it uses [`--link-dest`](#opt) + and a parallel hierarchy of files). + +132. `--delay-symlinks` + + This option tells the receiving rsync to hold back the creation of new and + changed symlinks until every other file in the transfer has been put into + place, including the renames done by [`--delay-updates`](#opt). Without + it, a symlink is created as soon as rsync reaches it in the file list, so + for the rest of the transfer it can point at a file that hasn't arrived + yet. + + This narrows the window in which the destination is inconsistent; it does + not make the update atomic. A transfer that is interrupted before the end + leaves new symlinks missing and changed symlinks pointing at their old + targets. + + If a symlink is moved to a new target and the old target is deleted, also + use [`--delete-delay`](#opt) or [`--delete-after`](#opt), since + [`--delete-before`](#opt) and the default [`--delete-during`](#opt) can + remove the old target while the old symlink still points at it. + + This option implies [`--no-inc-recursive`](#opt) since it needs the full + file list in memory in order to be able to iterate over it at the end. + + Conflicts with [`--remove-source-files`](#opt), [`--hard-links`](#opt), + [`--compare-dest`](#opt), [`--copy-dest`](#opt), and [`--link-dest`](#opt). + This option is incompatible with rsync versions prior to 2.6.4 (March + 2005), and when the receiving side is remote, the remote rsync must also + support this option. + +133. `--prune-empty-dirs`, `-m` + + This option tells the receiving rsync to get rid of empty directories from + the file-list, including nested directories that have no non-directory + children. This is useful for avoiding the creation of a bunch of useless + directories when the sending rsync is recursively scanning a hierarchy of + files using include/exclude/filter rules. + + This option can still leave empty directories on the receiving side if you + make use of [TRANSFER_RULES](#). + + Because the file-list is actually being pruned, this option also affects + what directories get deleted when a delete is active. However, keep in + mind that excluded files and directories can prevent existing items from + being deleted due to an exclude both hiding source files and protecting + destination files. See the perishable filter-rule option for how to avoid + this. + + You can prevent the pruning of certain empty directories from the file-list + by using a global "protect" filter. For instance, this option would ensure + that the directory "emptydir" was kept in the file-list: + + > ``` + > --filter 'protect emptydir/' + > ``` + + Here's an example that copies all .pdf files in a hierarchy, only creating + the necessary destination directories to hold the .pdf files, and ensures + that any superfluous files and directories in the destination are removed + (note the hide filter of non-directories being used instead of an exclude): + + > ``` + > rsync -avm --del --include='*.pdf' -f 'hide,! */' src/ dest + > ``` + + If you didn't want to remove superfluous destination files, the more + time-honored options of `--include='*/' --exclude='*'` would work + fine in place of the hide-filter (if that is more natural to you). + +134. `--progress` + + This option tells rsync to print information showing the progress of the + transfer. This gives a bored user something to watch. With a modern rsync + this is the same as specifying [`--info=flist2,name,progress`](#opt), but + any user-supplied settings for those info flags takes precedence (e.g. + [`--info=flist0 --progress`](#opt)). + + While rsync is transferring a regular file, it updates a progress line that + looks like this: + + > ``` + > 782,448B 63% 113KB/s 0:00:04 + > ``` + + In this example, the receiver has reconstructed 782,448 bytes or 63% of the + sender's file, which is being reconstructed at a rate of 113 kilobytes + per second, and the transfer will finish in 4 seconds if the current rate + is maintained until the end. + + Progress rates are scaled in decimal units by default. `--no-h` keeps the + rate in bytes per second, while `-hh` uses binary units such as `KiB/s` and + `MiB/s`. + + These statistics can be misleading if rsync's delta-transfer algorithm is + in use. For example, if the sender's file consists of the basis file + followed by additional data, the reported rate will probably drop + dramatically when the receiver gets to the literal data, and the transfer + will probably take much longer to finish than the receiver estimated as it + was finishing the matched part of the file. + + When the file transfer finishes, rsync replaces the progress line with a + summary line that looks like this: + + > ``` + > 1,238,099B 100% 150KB/s 0:00:08 (xfr#5, to-chk=169/396) + > ``` + + In this example, the file was 1,238,099 bytes long in total, the average + rate of transfer for the whole file was 150 kilobytes per second over the + 8 seconds that it took to complete, it was the 5th transfer of a + regular file during the current rsync session, and there are 169 more files + for the receiver to check (to see if they are up-to-date or not) remaining + out of the 396 total files in the file-list. + + In an incremental recursion scan, rsync won't know the total number of + files in the file-list until it reaches the ends of the scan, but since it + starts to transfer files during the scan, it will display a line with the + text "ir-chk" (for incremental recursion check) instead of "to-chk" until + the point that it knows the full size of the list, at which point it will + switch to using "to-chk". Thus, seeing "ir-chk" lets you know that the + total count of files in the file list is still going to increase (and each + time it does, the count of files left to check will increase by the number + of the files added to the list). + +135. `-P` + + The `-P` option is equivalent to "[`--partial`](#opt) + [`--progress`](#opt)". Its purpose is to make it much easier to specify + these two options for a long transfer that may be interrupted. + + There is also a [`--info=progress2`](#opt) option that outputs statistics + based on the whole transfer, rather than individual files. Use this flag + without outputting a filename (e.g. avoid `-v` or specify + [`--info=name0`](#opt)) if you want to see how the transfer is doing + without scrolling the screen with a lot of names. (You don't need to + specify the [`--progress`](#opt) option in order to use + [`--info=progress2`](#opt).) + + The time field estimates time remaining during the transfer and shows + elapsed time in the final summary. + + Finally, you can get an instant progress report by sending rsync a signal + of either SIGINFO or SIGVTALRM. On BSD systems, a SIGINFO is generated by + typing a Ctrl+T (Linux doesn't currently support a SIGINFO signal). When + the client-side process receives one of those signals, it sets a flag to + output a single progress report which is output when the current file + transfer finishes (so it may take a little time if a big file is being + handled when the signal arrives). A filename is output (if needed) + followed by the [`--info=progress2`](#opt) format of progress info. If you + don't know which of the 3 rsync processes is the client process, it's OK to + signal all of them (since the non-client processes ignore the signal). + + CAUTION: sending SIGVTALRM to an older rsync (pre-3.2.0, June 2020) will kill it. + +136. `--password-file=FILE` + + This option allows you to provide a password for accessing an rsync daemon + via a file or via standard input if **FILE** is `-`. The file should + contain just the password on the first line (all other lines are ignored). + Rsync will exit with an error if **FILE** is world readable or if a + root-run rsync command finds a non-root-owned file. + + This option does not supply a password to a remote shell transport such as + ssh; to learn how to do that, consult the remote shell's documentation. + When accessing an rsync daemon using a remote shell as the transport, this + option only comes into effect after the remote shell finishes its + authentication (i.e. if you have also specified a password in the daemon's + config file). + +137. `--early-input=FILE` + + This option allows rsync to send up to 5K of data to the "early exec" + script on its stdin. One possible use of this data is to give the script a + secret that can be used to mount an encrypted filesystem (which you should + unmount in the the "post-xfer exec" script). + + The daemon must be at least version 3.2.1 (June 2020). + +138. `--list-only` + + This option will cause the source files to be listed instead of + transferred. This option is inferred if there is a single source argument and + no destination specified, so its main uses are: + + 1. to turn a copy command that includes a destination argument into a + file-listing command, or + 2. to be able to specify more than one source argument. Note: be sure to + include the destination. + + CAUTION: keep in mind that a source argument with a wild-card is expanded by the + shell into multiple arguments, so it is never safe to try to specify a single + wild-card argument to try to infer this option. A safe example is: + + > ``` + > rsync -av --list-only foo* dest/ + > ``` + + This option always uses an output format that looks similar to this: + + > ``` + > drwxrwxr-x 4,096 2022/09/30 12:53:11 support + > -rw-rw-r-- 80 2005/01/11 10:37:37 support/Makefile + > ``` + + The only option that affects this output style is the + [`--human-readable`](#opt) (`-h`) option. The default is to output sizes + as byte counts with digit separators (in a 14-character-width column). + Specifying at least one `-h` option makes the sizes output with unit + suffixes. If you want old-style bytecount sizes without digit separators + (and an 11-character-width column) use `--no-h`. + + Compatibility note: when requesting a remote listing of files from an rsync + that is version 2.6.3 or older (i.e., pre-2005), + you may encounter an error if you ask for a + non-recursive listing. This is because a file listing implies the + [`--dirs`](#opt) option without [`--recursive`](#opt), and older rsyncs don't + have that option. To avoid this problem, either specify the `--no-dirs` + option (if you don't need to expand a directory's content), or turn on + recursion and exclude the content of subdirectories: `-r --exclude='/*/*'`. + +139. `--bwlimit=RATE` + + This option allows you to specify the maximum transfer rate for the data + sent over the socket, specified in units per second. The RATE value can be + suffixed with a string to indicate a size multiplier, and may be a + fractional value (e.g. `--bwlimit=1.5m`). If no suffix is specified, the + value will be assumed to be in units of 1024 bytes (as if "K" or "KiB" had + been appended). See the [`--max-size`](#opt) option for a description of + all the available suffixes. A value of 0 specifies no limit. + + For backward-compatibility reasons, the rate limit will be rounded to the + nearest KiB unit, so no rate smaller than 1024 bytes per second is + possible. + + Rsync writes data over the socket in blocks, and this option both limits + the size of the blocks that rsync writes, and tries to keep the average + transfer rate at the requested limit. Some burstiness may be seen where + rsync writes out a block of data and then sleeps to bring the average rate + into compliance. + + Due to the internal buffering of data, the [`--progress`](#opt) option may + not be an accurate reflection on how fast the data is being sent. This is + because some files can show up as being rapidly sent when the data is + quickly buffered, while other can show up as very slow when the flushing of + the output buffer occurs. This may be fixed in a future version. + + See also [the daemon version of the `--bwlimit` option](#dopt--bwlimit). + +140. `--stop-after=MINS`, (`--time-limit=MINS`) + + This option tells rsync to stop copying when the specified number of + minutes has elapsed. + + For maximal flexibility, rsync does not communicate this option to the + remote rsync since it is usually enough that one side of the connection + quits as specified. This allows the option's use even when only one side + of the connection supports it. You can tell the remote side about the time + limit using [`--remote-option`](#opt) (`-M`), should the need arise. + + The `--time-limit` version of this option is deprecated. + +141. `--stop-at=y-m-dTh:m` + + This option tells rsync to stop copying when the specified point in time + has been reached. The date & time can be fully specified in a numeric + format of year-month-dayThour:minute (e.g. 2000-12-31T23:59) in the local + timezone. You may choose to separate the date numbers using slashes + instead of dashes. + + The value can also be abbreviated in a variety of ways, such as specifying + a 2-digit year and/or leaving off various values. In all cases, the value + will be taken to be the next possible point in time where the supplied + information matches. If the value specifies the current time or a past + time, rsync exits with an error. + + For example, "1-30" specifies the next January 30th (at midnight local + time), "14:00" specifies the next 2 P.M., "1" specifies the next 1st of the + month at midnight, "31" specifies the next month where we can stop on its + 31st day, and ":59" specifies the next 59th minute after the hour. + + For maximal flexibility, rsync does not communicate this option to the + remote rsync since it is usually enough that one side of the connection + quits as specified. This allows the option's use even when only one side + of the connection supports it. You can tell the remote side about the time + limit using [`--remote-option`](#opt) (`-M`), should the need arise. Do + keep in mind that the remote host may have a different default timezone + than your local host. + +142. `--fsync` + + Cause the receiving side to fsync each finished file. This may slow down + the transfer, but can help to provide peace of mind when updating critical + files. + +143. `--write-batch=FILE` + + Record a file that can later be applied to another identical destination + with [`--read-batch`](#opt). See the "BATCH MODE" section for details, and + also the [`--only-write-batch`](#opt) option. + + This option overrides the negotiated checksum & compress lists and always + negotiates a choice based on old-school md5/md4/zlib choices. This means + batch mode is not compatible with newer compression choices such as zstd or + lz4. + +144. `--only-write-batch=FILE` + + Works like [`--write-batch`](#opt), except that no updates are made on the + destination system when creating the batch. This lets you transport the + changes to the destination system via some other means and then apply the + changes via [`--read-batch`](#opt). + + Note that you can feel free to write the batch directly to some portable + media: if this media fills to capacity before the end of the transfer, you + can just apply that partial transfer to the destination and repeat the + whole process to get the rest of the changes (as long as you don't mind a + partially updated destination system while the multi-update cycle is + happening). + + Also note that you only save bandwidth when pushing changes to a remote + system because this allows the batched data to be diverted from the sender + into the batch file without having to flow over the wire to the receiver + (when pulling, the sender is remote, and thus can't write the batch). + +145. `--read-batch=FILE` + + Apply all of the changes stored in FILE, a file previously generated by + [`--write-batch`](#opt). If _FILE_ is `-`, the batch data will be read + from standard input. See the "BATCH MODE" section for details. + +146. `--protocol=NUM` + + Force an older protocol version to be used. This is useful for creating a + batch file that is compatible with an older version of rsync. For + instance, if rsync 2.6.4 is being used with the [`--write-batch`](#opt) + option, but rsync 2.6.3 is what will be used to run the + [`--read-batch`](#opt) option, you should use "--protocol=28" when creating + the batch file to force the older protocol version to be used in the batch + file (assuming you can't upgrade the rsync on the reading system). + +147. `--iconv=CONVERT_SPEC` + + Rsync can convert filenames between character sets using this option. + Using a CONVERT_SPEC of "." tells rsync to look up the default + character-set via the locale setting. Alternately, you can fully specify + what conversion to do by giving a local and a remote charset separated by a + comma in the order `--iconv=LOCAL,REMOTE`, e.g. `--iconv=utf8,iso88591`. + This order ensures that the option will stay the same whether you're + pushing or pulling files. Finally, you can specify either `--no-iconv` or + a CONVERT_SPEC of "-" to turn off any conversion. The default setting of + this option is site-specific, and can also be affected via the + [`RSYNC_ICONV`](#) environment variable. + + For a list of what charset names your local iconv library supports, you can + run "`iconv --list`". + + If you specify the [`--secluded-args`](#opt) (`-s`) option, rsync will + translate the filenames you specify on the command-line that are being sent + to the remote host. See also the [`--files-from`](#opt) option. + + Note that rsync does not do any conversion of names in filter files + (including include/exclude files). It is up to you to ensure that you're + specifying matching rules that can match on both sides of the transfer. + For instance, you can specify extra include/exclude rules if there are + filename differences on the two sides that need to be accounted for. + + When you pass an `--iconv` option to an rsync daemon that allows it, the + daemon uses the charset specified in its "charset" configuration parameter + regardless of the remote charset you actually pass. Thus, you may feel + free to specify just the local charset for a daemon transfer (e.g. + `--iconv=utf8`). + +148. `--ipv4`, `-4` or `--ipv6`, `-6` + + Tells rsync to prefer IPv4/IPv6 when creating sockets or running ssh. This + affects sockets that rsync has direct control over, such as the outgoing + socket when directly contacting an rsync daemon, as well as the forwarding + of the `-4` or `-6` option to ssh when rsync can deduce that ssh is being + used as the remote shell. For other remote shells you'll need to specify + the "`--rsh SHELL -4`" option directly (or whatever IPv4/IPv6 hint options + it uses). + + See also [the daemon version of these options](#dopt--ipv4). + + If rsync was compiled without support for IPv6, the `--ipv6` option will + have no effect. The `rsync --version` output will contain "`no IPv6`" if + is the case. + +149. `--checksum-seed=NUM` + + Set the checksum seed to the integer NUM. This 4 byte checksum seed is + included in each block and MD4 file checksum calculation (the more modern + file checksums don't use a seed). By default the checksum seed is + generated by the server and defaults to the current **time**(). This + option is used to set a specific checksum seed, which is useful for + applications that want repeatable block checksums, or in the case where the + user wants a more random checksum seed. Setting NUM to 0 causes rsync to + use the default of **time**() for checksum seed. + +150. `--nice=SETTINGS` + + Adjust the CPU and I/O scheduling priority of the local process, the remote + process or both. SETTINGS is a comma-separated list. Each setting is + `TARGET`, `PRIORITY` or `TARGET:PRIORITY`. `TARGET` is `local`, `remote` or + `all`. Omitting `TARGET` applies the priority to both processes. A + target-only setting uses `19/idle`. Target names and I/O values are + case-insensitive. + + `PRIORITY` is a CPU nice value from -20 to 19, an I/O value or both + separated by `/`. I/O values are `none`, `idle`, `rt_0` through `rt_7` and + `be_0` through `be_7`. `none` restores the kernel-derived I/O priority. + Higher nice values and higher `rt` or `be` suffixes mean lower priority. + Raising priority may require additional privilege. + + A setting that specifies only CPU or I/O priority leaves the other component + unchanged. For example, + `--nice=remote:5 --nice=remote:idle` requests remote CPU priority 5 and + remote idle I/O priority. Later settings replace earlier values for the + same component. `--no-nice` clears all earlier settings. + + Examples: + + ``` + --nice=19/idle + --nice=local:10,remote:idle + --nice=local:19/be_7,remote:5 + ``` + + The remote rsync must support this option before a remote setting can be + used. Daemon clients may request only CPU nice 19, idle I/O priority or + both. A daemon administrator can also refuse the option with + `refuse options = nice`. When starting a daemon, the local setting is + applied before it accepts client settings. A standalone listener passes + that priority to its workers. A daemon's remote setting has no meaning. + + If a priority change is unsupported or fails, rsync warns and continues the + transfer. ## DAEMON OPTIONS The options allowed when starting an rsync daemon are as follows: -0. `--daemon` +00. `--daemon` - This tells rsync that it is to run as a daemon. The daemon you start + This tells rsync that it is to run as a daemon. The daemon you start running may be accessed using an rsync client using the `host::module` or `rsync://host/module/` syntax. If standard input is a socket then rsync will assume that it is being run via inetd, otherwise it will detach from the current terminal and become a - background daemon. The daemon will read the config file (rsyncd.conf) on + background daemon. The daemon will read the config file (rsyncd.conf) on each connect made by a client and respond to requests accordingly. See the [**rsyncd.conf**(5)](rsyncd.conf.5) manpage for more details. -0. `--address=ADDRESS` +01. `--address=ADDRESS` By default rsync will bind to the wildcard address when run as a daemon - with the `--daemon` option. The `--address` option allows you to specify a - specific IP address (or hostname) to bind to. This makes virtual hosting + with the `--daemon` option. The `--address` option allows you to specify a + specific IP address (or hostname) to bind to. This makes virtual hosting possible in conjunction with the `--config` option. See also the [address](rsyncd.conf.5#address) global option in the rsyncd.conf manpage and the [client version of the `--address` option](#opt--address). -0. `--bwlimit=RATE` +02. `--bwlimit=RATE` This option allows you to specify the maximum transfer rate for the data - the daemon sends over the socket. The client can still specify a smaller + the daemon sends over the socket. The client can still specify a smaller `--bwlimit` value, but no larger value will be allowed. See the [client version of the `--bwlimit` option](#opt--bwlimit) for some extra details. -0. `--config=FILE` +03. `--config=FILE` - This specifies an alternate config file than the default. This is only - relevant when [`--daemon`](#dopt) is specified. The default is + This specifies an alternate config file than the default. This is only + relevant when [`--daemon`](#dopt) is specified. The default is /etc/rsyncd.conf unless the daemon is running over a remote shell program and the remote user is not the super-user; in that case the default is rsyncd.conf in the current directory (typically $HOME). @@ -4286,26 +4399,28 @@ The options allowed when starting an rsync daemon are as follows: each client connection. Use a file that remains readable rather than a pipe or pipe-backed process substitution. -0. `--dparam=OVERRIDE`, `-M` +04. `--dparam=OVERRIDE`, `-M` This option can be used to set a daemon-config parameter when starting up - rsync in daemon mode. It is equivalent to adding the parameter at the end - of the global settings prior to the first module's definition. The - parameter names can be specified without spaces, if you so desire. For + rsync in daemon mode. It is equivalent to adding the parameter at the end + of the global settings prior to the first module's definition. The + parameter names can be specified without spaces, if you so desire. For instance: - > rsync --daemon -M pidfile=/path/rsync.pid + > ``` + > rsync --daemon -M pidfile=/path/rsync.pid + > ``` -0. `--no-detach` +05. `--no-detach` When running as a daemon, this option instructs rsync to not detach itself - and become a background process. This option is required when running as a + and become a background process. This option is required when running as a service on Cygwin, and may also be useful when rsync is supervised by a program such as `daemontools` or AIX's `System Resource Controller`. - `--no-detach` is also recommended when rsync is run under a debugger. This + `--no-detach` is also recommended when rsync is run under a debugger. This option has no effect if rsync is run from inetd or sshd. -0. `--port=PORT` +06. `--port=PORT` This specifies an alternate TCP port number for the daemon to listen on rather than the default of 873. @@ -4313,43 +4428,43 @@ The options allowed when starting an rsync daemon are as follows: See also [the client version of the `--port` option](#opt--port) and the [port](rsyncd.conf.5#port) global setting in the rsyncd.conf manpage. -0. `--log-file=FILE` +07. `--log-file=FILE` This option tells the rsync daemon to use the given log-file name instead of using the "`log file`" setting in the config file. See also [the client version of the `--log-file` option](#opt--log-file). -0. `--log-file-format=FORMAT` +08. `--log-file-format=FORMAT` This option tells the rsync daemon to use the given FORMAT string instead - of using the "`log format`" setting in the config file. It also enables + of using the "`log format`" setting in the config file. It also enables "`transfer logging`" unless the string is empty, in which case transfer logging is turned off. See also [the client version of the `--log-file-format` option](#opt--log-file-format). -0. `--sockopts` +09. `--sockopts` This overrides the [`socket options`](rsyncd.conf.5#socket_options) setting in the rsyncd.conf file and has the same syntax. See also [the client version of the `--sockopts` option](#opt--sockopts). -0. `--verbose`, `-v` +10. `--verbose`, `-v` This option increases the amount of information the daemon logs during its - startup phase. After the client connects, the daemon's verbosity level + startup phase. After the client connects, the daemon's verbosity level will be controlled by the options that the client used and the "`max verbosity`" setting in the module's config section. See also [the client version of the `--verbose` option](#opt--verbose). -0. `--ipv4`, `-4` or `--ipv6`, `-6` +11. `--ipv4`, `-4` or `--ipv6`, `-6` Tells rsync to prefer IPv4/IPv6 when creating the incoming sockets that the - rsync daemon will use to listen for connections. One of these options may + rsync daemon will use to listen for connections. One of these options may be required in older versions of Linux to work around an IPv6 bug in the kernel (if you see an "address already in use" error when nothing else is using the port, try specifying `--ipv6` or `--ipv4` when starting the @@ -4358,10 +4473,10 @@ The options allowed when starting an rsync daemon are as follows: See also [the client version of these options](#opt--ipv4). If rsync was compiled without support for IPv6, the `--ipv6` option will - have no effect. The `rsync --version` output will contain "`no IPv6`" if + have no effect. The `rsync --version` output will contain "`no IPv6`" if is the case. -0. `--help`, `-h` +12. `--help`, `-h` When specified after `--daemon`, print a short help page describing the options available for starting an rsync daemon. @@ -4378,30 +4493,30 @@ handled: - Control which extended attribute names are skipped when copying xattrs The rules are either directly specified via option arguments or they can be -read in from one or more files. The filter-rule files can even be a part of +read in from one or more files. The filter-rule files can even be a part of the hierarchy of files being copied, affecting different parts of the tree in different ways. ### SIMPLE INCLUDE/EXCLUDE RULES We will first cover the basics of how include & exclude rules affect what files -are transferred, ignoring any deletion side-effects. Filter rules mainly +are transferred, ignoring any deletion side-effects. Filter rules mainly affect the contents of directories that rsync is "recursing" into, but they can also affect a top-level item in the transfer that was specified as a argument. The default for any unmatched file/directory is for it to be included in the -transfer, which puts the file/directory into the sender's file list. The use of an +transfer, which puts the file/directory into the sender's file list. The use of an exclude rule causes one or more matching files/directories to be left out of the -sender's file list. An include rule can be used to limit the effect of an +sender's file list. An include rule can be used to limit the effect of an exclude rule that is matching too many files. The order of the rules is important because the first rule that matches is the -one that takes effect. Thus, if an early rule excludes a file, no include rule +one that takes effect. Thus, if an early rule excludes a file, no include rule that comes after it can have any effect. This means that you must place any include overrides somewhere prior to the exclude that it is intended to limit. When a directory is excluded, all its contents and sub-contents are also -excluded. The sender doesn't scan through any of it at all, which can save a +excluded. The sender doesn't scan through any of it at all, which can save a lot of time when skipping large unneeded sub-trees. It is also important to understand that the include/exclude rules are applied @@ -4416,10 +4531,10 @@ transfer, then the sender must not exclude the directories "`a/path`", the file tree. When you are working on the rules, it can be helpful to ask rsync to tell you -what is being excluded/included and why. Specifying `--debug=FILTER` or (when +what is being excluded/included and why. Specifying `--debug=FILTER` or (when pulling files) `-M--debug=FILTER` turns on level 1 of the FILTER debug information that will output a message any time that a file or directory is -included or excluded and which rule it matched. Beginning in 3.2.4 it will +included or excluded and which rule it matched. Beginning in 3.2.4 it will also warn if a filter rule has trailing whitespace, since an exclude of "foo " (with a trailing space) will not exclude a file named "foo". @@ -4434,43 +4549,53 @@ onto the filename. With the following file tree created on the sending side: -> mkdir x/ -> touch x/file.txt -> mkdir x/y/ -> touch x/y/file.txt -> touch x/y/zzz.txt -> mkdir x/z/ -> touch x/z/file.txt +> ``` +> mkdir x/ +> touch x/file.txt +> mkdir x/y/ +> touch x/y/file.txt +> touch x/y/zzz.txt +> mkdir x/z/ +> touch x/z/file.txt +> ``` Then the following rsync command will transfer the file "`x/y/file.txt`" and the directories needed to hold it, resulting in the path "`/tmp/x/y/file.txt`" existing on the remote host: -> rsync -ai -f'+ x/' -f'+ x/y/' -f'+ x/y/file.txt' -f'- *' x host:/tmp/ +> ``` +> rsync -ai -f'+ x/' -f'+ x/y/' -f'+ x/y/file.txt' -f'- *' x host:/tmp/ +> ``` Aside: this copy could also have been accomplished using the [`-R`](#opt) option (though the 2 commands behave differently if deletions are enabled): -> rsync -aiR x/y/file.txt host:/tmp/ +> ``` +> rsync -aiR x/y/file.txt host:/tmp/ +> ``` The following command does not need an include of the "x" directory because it -is not a part of the transfer (note the trailing slash). Running this command +is not a part of the transfer (note the trailing slash). Running this command would copy just "`/tmp/x/file.txt`" because the "y" and "z" directories get excluded: -> rsync -ai -f'+ file.txt' -f'- *' x/ host:/tmp/x/ +> ``` +> rsync -ai -f'+ file.txt' -f'- *' x/ host:/tmp/x/ +> ``` This command would omit the zzz.txt file while copying "x" and everything else it contains: -> rsync -ai -f'- zzz.txt' x host:/tmp/ +> ``` +> rsync -ai -f'- zzz.txt' x host:/tmp/ +> ``` ### FILTER RULES WHEN DELETING By default the include & exclude filter rules affect both the sender (as it creates its file list) -and the receiver (as it creates its file lists for calculating deletions). If +and the receiver (as it creates its file lists for calculating deletions). If no delete option is in effect, the receiver skips creating the delete-related -file lists. This two-sided default can be manually overridden so that you are +file lists. This two-sided default can be manually overridden so that you are only specifying sender rules or receiver rules, as described in the [FILTER RULES IN DEPTH](#) section. @@ -4480,74 +4605,76 @@ deletion). The default is for a file to be at risk -- its safety depends on it matching a corresponding file from the sender. An example of the two-sided exclude effect can be illustrated by the copying of -a C development directory between 2 systems. When doing a touch-up copy, you +a C development directory between 2 systems. When doing a touch-up copy, you might want to skip copying the built executable and the `.o` files (sender hide) so that the receiving side can build their own and not lose any object -files that are already correct (receiver protect). For instance: +files that are already correct (receiver protect). For instance: -> rsync -ai --del -f'- *.o' -f'- cmd' src host:/dest/ +> ``` +> rsync -ai --del -f'- *.o' -f'- cmd' src host:/dest/ +> ``` Note that using `-f'-p *.o'` is even better than `-f'- *.o'` if there is a -chance that the directory structure may have changed. The "p" modifier is +chance that the directory structure may have changed. The "p" modifier is discussed in [FILTER RULE MODIFIERS](#). One final note, if your shell doesn't mind unexpanded wildcards, you could simplify the typing of the filter options by using an underscore in place of -the space and leaving off the quotes. For instance, `-f -_*.o -f -_cmd` (and +the space and leaving off the quotes. For instance, `-f -_*.o -f -_cmd` (and similar) could be used instead of the filter options above. ### FILTER RULES IN DEPTH -Rsync supports old-style include/exclude rules and new-style filter rules. The +Rsync supports old-style include/exclude rules and new-style filter rules. The older rules are specified using [`--include`](#opt) and [`--exclude`](#opt) as well as the [`--include-from`](#opt) and [`--exclude-from`](#opt). These are -limited in behavior but they don't require a "-" or "+" prefix. An old-style +limited in behavior but they don't require a "-" or "+" prefix. An old-style exclude rule is turned into a "`- name`" filter rule (with no modifiers) and an old-style include rule is turned into a "`+ name`" filter rule (with no modifiers). Rsync builds an ordered list of filter rules as specified on the command-line -and/or read-in from files. New style filter rules have the following syntax: +and/or read-in from files. New style filter rules have the following syntax: -> RULE [PATTERN_OR_FILENAME] -> RULE,MODIFIERS [PATTERN_OR_FILENAME] +> ``` +> RULE [PATTERN_OR_FILENAME] +> RULE,MODIFIERS [PATTERN_OR_FILENAME] +> ``` You have your choice of using either short or long RULE names, as described -below. If you use a short-named rule, the ',' separating the RULE from the -MODIFIERS is optional. The PATTERN or FILENAME that follows (when present) +below. If you use a short-named rule, the ',' separating the RULE from the +MODIFIERS is optional. The PATTERN or FILENAME that follows (when present) must come after either a single space or an underscore (\_). Any additional spaces and/or underscores are considered to be a part of the pattern name. Here are the available rule prefixes: -0. `exclude, '-'` specifies an exclude pattern that (by default) is both a - `hide` and a `protect`. -0. `include, '+'` specifies an include pattern that (by default) is both a - `show` and a `risk`. -0. `merge, '.'` specifies a merge-file on the client side to read for more - rules. -0. `dir-merge, ':'` specifies a per-directory merge-file. Using this kind of - filter rule requires that you trust the sending side's filter checking, so - it has the side-effect mentioned under the [`--trust-sender`](#opt) option. -0. `hide, 'H'` specifies a pattern for hiding files from the transfer. - Equivalent to a sender-only exclude, so `-f'H foo'` could also be specified - as `-f'-s foo'`. -0. `show, 'S'` files that match the pattern are not hidden. Equivalent to a - sender-only include, so `-f'S foo'` could also be specified as `-f'+s - foo'`. -0. `protect, 'P'` specifies a pattern for protecting files from deletion. - Equivalent to a receiver-only exclude, so `-f'P foo'` could also be - specified as `-f'-r foo'`. -0. `risk, 'R'` files that match the pattern are not protected. Equivalent to a - receiver-only include, so `-f'R foo'` could also be specified as `-f'+r - foo'`. -0. `clear, '!'` clears the current include/exclude list (takes no argument) +0. `exclude, '-'` specifies an exclude pattern that (by default) is both a + `hide` and a `protect`. +1. `include, '+'` specifies an include pattern that (by default) is both a + `show` and a `risk`. +2. `merge, '.'` specifies a merge-file on the client side to read for more + rules. +3. `dir-merge, ':'` specifies a per-directory merge-file. Using this kind of + filter rule requires that you trust the sending side's filter checking, so + it has the side-effect mentioned under the [`--trust-sender`](#opt) option. +4. `hide, 'H'` specifies a pattern for hiding files from the transfer. + Equivalent to a sender-only exclude, so `-f'H foo'` could also be specified + as `-f'-s foo'`. +5. `show, 'S'` files that match the pattern are not hidden. Equivalent to a + sender-only include, so `-f'S foo'` could also be specified as `-f'+s foo'`. +6. `protect, 'P'` specifies a pattern for protecting files from deletion. + Equivalent to a receiver-only exclude, so `-f'P foo'` could also be + specified as `-f'-r foo'`. +7. `risk, 'R'` files that match the pattern are not protected. Equivalent to a + receiver-only include, so `-f'R foo'` could also be specified as `-f'+r foo'`. +8. `clear, '!'` clears the current include/exclude list (takes no argument) When rules are being read from a file (using merge or dir-merge), empty lines are ignored, as are whole-line comments that start with a '`#`' (filename rules that contain a hash character are unaffected). Note also that the [`--filter`](#opt), [`--include`](#opt), and -[`--exclude`](#opt) options take one rule/pattern each. To add multiple ones, +[`--exclude`](#opt) options take one rule/pattern each. To add multiple ones, you can repeat the options on the command-line, use the merge-file syntax of the [`--filter`](#opt) option, or the [`--include-from`](#opt) / [`--exclude-from`](#opt) options. @@ -4555,7 +4682,7 @@ the [`--filter`](#opt) option, or the [`--include-from`](#opt) / ### PATTERN MATCHING RULES Most of the rules mentioned above take an argument that specifies what the rule -should match. If rsync is recursing through a directory hierarchy, keep in +should match. If rsync is recursing through a directory hierarchy, keep in mind that each pattern is matched against the name of every directory in the descent path as rsync finds the filenames to send. @@ -4563,7 +4690,7 @@ The matching rules for the pattern argument take several forms: - If a pattern contains a `/` (not counting a trailing slash) or a "`**`" (which can match a slash), then the pattern is matched against the full - pathname, including any leading directories within the transfer. If the + pathname, including any leading directories within the transfer. If the pattern doesn't contain a (non-trailing) `/` or a "`**`", then it is matched only against the final component of the filename or pathname. For example, `foo` means that the final path component must be "foo" while `foo/bar` would @@ -4572,10 +4699,10 @@ The matching rules for the pattern argument take several forms: - A pattern that ends with a `/` only matches a directory, not a regular file, symlink, or device. - A pattern that starts with a `/` is anchored to the start of the transfer - path instead of the end. For example, `/foo/**` or `/foo/bar/**` match only - leading elements in the path. If the rule is read from a per-directory + path instead of the end. For example, `/foo/**` or `/foo/bar/**` match only + leading elements in the path. If the rule is read from a per-directory filter file, the transfer path being matched will begin at the level of the - filter file instead of the top of the transfer. See the section on + filter file instead of the top of the transfer. See the section on [ANCHORING INCLUDE/EXCLUDE PATTERNS](#) for a full discussion of how to specify a pattern that matches at the root of the transfer. @@ -4589,7 +4716,7 @@ checking if the pattern contains one of these three wildcard characters: '`*`', - a '`[`' introduces a character class, such as `[a-z]` or `[[:alpha:]]`, that must match one character. - a trailing `***` in the pattern is a shorthand that allows you to match a - directory and all its contents using a single rule. For example, specifying + directory and all its contents using a single rule. For example, specifying "`dir_name/***`" will match both the "dir_name" directory (as if "`dir_name/`" had been specified) and everything in the directory (as if "`dir_name/**`" had been specified). @@ -4621,33 +4748,33 @@ Here are some examples of exclude/include matching: The following modifiers are accepted after an include (+) or exclude (-) rule: - A `/` specifies that the include/exclude rule should be matched against the - absolute pathname of the current item. For example, `-f'-/ /etc/passwd'` + absolute pathname of the current item. For example, `-f'-/ /etc/passwd'` would exclude the passwd file any time the transfer was sending files from the "/etc" directory, and "-/ subdir/foo" would always exclude "foo" when it is in a directory named "subdir", even if "foo" is at the root of the current transfer. - A `!` specifies that the include/exclude should take effect if the pattern - fails to match. For instance, `-f'-! */'` would exclude all non-directories. + fails to match. For instance, `-f'-! */'` would exclude all non-directories. - A `C` is used to indicate that all the global CVS-exclude rules should be - inserted as excludes in place of the "-C". No argument should follow. -- An `s` is used to indicate that the rule applies to the sending side. When a + inserted as excludes in place of the "-C". No argument should follow. +- An `s` is used to indicate that the rule applies to the sending side. When a rule affects the sending side, it affects what files are put into the - sender's file list. The default is for a rule to affect both sides unless + sender's file list. The default is for a rule to affect both sides unless [`--delete-excluded`](#opt) was specified, in which case default rules become - sender-side only. See also the hide (H) and show (S) rules, which are an + sender-side only. See also the hide (H) and show (S) rules, which are an alternate way to specify sending-side includes/excludes. -- An `r` is used to indicate that the rule applies to the receiving side. When - a rule affects the receiving side, it prevents files from being deleted. See - the `s` modifier for more info. See also the protect (P) and risk (R) rules, +- An `r` is used to indicate that the rule applies to the receiving side. When + a rule affects the receiving side, it prevents files from being deleted. See + the `s` modifier for more info. See also the protect (P) and risk (R) rules, which are an alternate way to specify receiver-side includes/excludes. - A `p` indicates that a rule is perishable, meaning that it is ignored in - directories that are being deleted. For instance, the + directories that are being deleted. For instance, the [`--cvs-exclude`](#opt) (`-C`) option's default 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 `x` indicates that a rule affects xattr names in xattr copy/delete - operations (and is thus ignored when matching file/directory names). If no + operations (and is thus ignored when matching file/directory names). If no xattr-matching rules are specified, a default xattr filtering rule is used (see the [`--xattrs`](#opt) option). @@ -4658,23 +4785,25 @@ You can merge whole files into your filter rules by specifying either a merge section above). There are two kinds of merged files -- single-instance ('.') and per-directory -(':'). A single-instance merge file is read one time, and its rules are -incorporated into the filter list in the place of the "." rule. For +(':'). A single-instance merge file is read one time, and its rules are +incorporated into the filter list in the place of the "." rule. For per-directory merge files, rsync will scan every directory that it traverses for the named file, merging its contents when the file exists into the current -list of inherited rules. These per-directory rule files must be created on the +list of inherited rules. These per-directory rule files must be created on the sending side because it is the sending side that is being scanned for the -available files to transfer. These rule files may also need to be transferred +available files to transfer. These rule files may also need to be transferred to the receiving side if you want them to affect what files don't get deleted (see [PER-DIRECTORY RULES AND DELETE](#) below). Some examples: -> merge /etc/rsync/default.rules -> . /etc/rsync/default.rules -> dir-merge .per-dir-filter -> dir-merge,n- .non-inherited-per-dir-excludes -> :n- .non-inherited-per-dir-excludes +> ``` +> merge /etc/rsync/default.rules +> . /etc/rsync/default.rules +> dir-merge .per-dir-filter +> dir-merge,n- .non-inherited-per-dir-excludes +> :n- .non-inherited-per-dir-excludes +> ``` The following modifiers are accepted after a merge or dir-merge rule: @@ -4683,63 +4812,67 @@ The following modifiers are accepted after a merge or dir-merge rule: - A `+` specifies that the file should consist of only include patterns, with no other rule-parsing except for in-file comments. - A `C` is a way to specify that the file should be read in a CVS-compatible - manner. This turns on 'n', 'w', and '-', but also allows the list-clearing - token (!) to be specified. If no filename is provided, ".cvsignore" is + manner. This turns on 'n', 'w', and '-', but also allows the list-clearing + token (!) to be specified. If no filename is provided, ".cvsignore" is assumed. -- A `e` will exclude the merge-file name from the transfer; e.g. "dir-merge,e +- A `e` will exclude the merge-file name from the transfer; e.g. "dir-merge,e .rules" is like "dir-merge .rules" and "- .rules". - An `n` specifies that the rules are not inherited by subdirectories. - A `w` specifies that the rules are word-split on whitespace instead of the - normal line-splitting. This also turns off comments. Note: the space that + normal line-splitting. This also turns off comments. Note: the space that separates the prefix from the rule is treated specially, so "- foo + bar" is parsed as two rules (assuming that prefix-parsing wasn't also disabled). - You may also specify any of the modifiers for the "+" or "-" rules (above) in order to have the rules that are read in from the file default to having that - modifier set (except for the `!` modifier, which would not be useful). For + modifier set (except for the `!` modifier, which would not be useful). For instance, "merge,-/ .excl" would treat the contents of .excl as absolute-path excludes, while "dir-merge,s .filt" and ":sC" would each make all their - per-directory rules apply only on the sending side. If the merge rule + per-directory rules apply only on the sending side. If the merge rule specifies sides to affect (via the `s` or `r` modifier or both), then the rules in the file must not specify sides (via a modifier or a rule prefix such as `hide`). Per-directory rules are inherited in all subdirectories of the directory where -the merge-file was found unless the 'n' modifier was used. Each subdirectory's +the merge-file was found unless the 'n' modifier was used. Each subdirectory's rules are prefixed to the inherited per-directory rules from its parents, which -gives the newest rules a higher priority than the inherited rules. The entire +gives the newest rules a higher priority than the inherited rules. The entire set of dir-merge rules are grouped together in the spot where the merge-file was specified, so it is possible to override dir-merge rules via a rule that -got specified earlier in the list of global rules. When the list-clearing rule +got specified earlier in the list of global rules. When the list-clearing rule ("!") is read from a per-directory file, it only clears the inherited rules for the current merge file. Another way to prevent a single rule from a dir-merge file from being inherited -is to anchor it with a leading slash. Anchored rules in a per-directory +is to anchor it with a leading slash. Anchored rules in a per-directory merge-file are relative to the merge-file's directory, so a pattern "/foo" would only match the file "foo" in the directory where the dir-merge filter file was found. Here's an example filter file which you'd specify via `--filter=". file":` -> merge /home/user/.global-filter -> - *.gz -> dir-merge .rules -> + *.[ch] -> - *.o -> - foo* +> ``` +> merge /home/user/.global-filter +> - *.gz +> dir-merge .rules +> + *.[ch] +> - *.o +> - foo* +> ``` This will merge the contents of the /home/user/.global-filter file at the start of the list and also turns the ".rules" filename into a per-directory filter -file. All rules read in prior to the start of the directory scan follow the +file. All rules read in prior to the start of the directory scan follow the global anchoring rules (i.e. a leading slash matches at the root of the transfer). If a per-directory merge-file is specified with a path that is a parent directory of the first transfer directory, rsync will scan all the parent directories from that starting point to the transfer directory for the indicated -per-directory file. For instance, here is a common filter (see [`-F`](#opt)): +per-directory file. For instance, here is a common filter (see [`-F`](#opt)): -> --filter=': /.rsync-filter' +> ``` +> --filter=': /.rsync-filter' +> ``` That rule tells rsync to scan for the file .rsync-filter in all directories from the root down through the parent directory of the transfer prior to the @@ -4749,23 +4882,25 @@ same as the module's "path".) Some examples of this pre-scanning for per-directory files: -> rsync -avF /src/path/ /dest/dir -> rsync -av --filter=': ../../.rsync-filter' /src/path/ /dest/dir -> rsync -av --filter=': .rsync-filter' /src/path/ /dest/dir +> ``` +> rsync -avF /src/path/ /dest/dir +> rsync -av --filter=': ../../.rsync-filter' /src/path/ /dest/dir +> rsync -av --filter=': .rsync-filter' /src/path/ /dest/dir +> ``` The first two commands above will look for ".rsync-filter" in "/" and "/src" before the normal scan begins looking for the file in "/src/path" and its -subdirectories. The last command avoids the parent-directory scan and only looks for +subdirectories. The last command avoids the parent-directory scan and only looks for the ".rsync-filter" files in each directory that is a part of the transfer. If you want to include the contents of a ".cvsignore" in your patterns, you should use the rule ":C", which creates a dir-merge of the .cvsignore file, but -parsed in a CVS-compatible manner. You can use this to affect where the +parsed in a CVS-compatible manner. You can use this to affect where the [`--cvs-exclude`](#opt) (`-C`) option's inclusion of the per-directory .cvsignore file gets placed into your rules by putting the ":C" wherever you -like in your filter rules. Without this, rsync would add the dir-merge rule +like in your filter rules. Without this, rsync would add the dir-merge rule for the .cvsignore file at the end of all your other rules (giving it a lower -priority than your command-line rules). For example: +priority than your command-line rules). For example: > ```bash > cat < rsync -avC --include=foo.o -f :C --exclude='*.old' a/ b > ``` -Both of the above rsync commands are identical. Each one will merge all the +Both of the above rsync commands are identical. Each one will merge all the per-directory .cvsignore rules in the middle of the list rather than at the -end. This allows their directory-specific rules to supersede the rules that follow -the :C instead of being subservient to all your rules. To affect the other CVS +end. This allows their directory-specific rules to supersede the rules that follow +the :C instead of being subservient to all your rules. To affect the other CVS exclude rules (i.e. the default list of exclusions, the contents of $HOME/.cvsignore, and the value of $CVSIGNORE) you should omit the `-C` command-line option and instead insert a "-C" rule into your filter rules; e.g. @@ -4788,7 +4923,7 @@ command-line option and instead insert a "-C" rule into your filter rules; e.g. ### LIST-CLEARING FILTER RULE You can clear the current include/exclude list by using the "!" filter rule (as -introduced in the [FILTER RULES](#) section above). The "current" list is either +introduced in the [FILTER RULES](#) section above). The "current" list is either the global list of rules (if the rule is encountered while parsing the filter options) or a set of per-directory rules (which are inherited in their own sub-list, so a subdirectory can use this to clear out the parent's rules). @@ -4797,15 +4932,15 @@ sub-list, so a subdirectory can use this to clear out the parent's rules). As mentioned earlier, global include/exclude patterns are anchored at the "root of the transfer" (as opposed to per-directory patterns, which are anchored at -the merge-file's directory). If you think of the transfer as a subtree of +the merge-file's directory). If you think of the transfer as a subtree of names that are being sent from sender to receiver, the transfer-root is where -the tree starts to be duplicated in the destination directory. This root +the tree starts to be duplicated in the destination directory. This root governs where patterns that start with a / match. Because the matching is relative to the transfer-root, changing the trailing slash on a source path or changing your use of the [`--relative`](#opt) option affects the path you need to use in your matching (in addition to changing how -much of the file tree is duplicated on the destination host). The following +much of the file tree is duplicated on the destination host). The following examples demonstrate this. Let's say that we want to match two source files, one with an absolute @@ -4852,29 +4987,35 @@ output when using [`--verbose`](#opt) and put a / in front of the name (use the Without a delete option, per-directory rules are only relevant on the sending side, so you can feel free to exclude the merge files themselves without -affecting the transfer. To make this easy, the 'e' modifier adds this exclude +affecting the transfer. To make this easy, the 'e' modifier adds this exclude for you, as seen in these two equivalent commands: -> rsync -av --filter=': .excl' --exclude=.excl host:src/dir /dest -> rsync -av --filter=':e .excl' host:src/dir /dest +> ``` +> rsync -av --filter=': .excl' --exclude=.excl host:src/dir /dest +> rsync -av --filter=':e .excl' host:src/dir /dest +> ``` However, if you want to do a delete on the receiving side AND you want some files to be excluded from being deleted, you'll need to be sure that the -receiving side knows what files to exclude. The easiest way is to include the +receiving side knows what files to exclude. The easiest way is to include the per-directory merge files in the transfer and use [`--delete-after`](#opt), because this ensures that the receiving side gets all the same exclude rules as the sending side before it tries to delete anything: -> rsync -avF --delete-after host:src/dir /dest +> ``` +> rsync -avF --delete-after host:src/dir /dest +> ``` However, if the merge files are not a part of the transfer, you'll need to either specify some global exclude rules (i.e. specified on the command line), or you'll need to maintain your own per-directory merge files on the receiving -side. An example of the first is this (assume that the remote .rules files +side. An example of the first is this (assume that the remote .rules files exclude themselves): -> rsync -av --filter=': .rules' --filter='. /my/extra.rules' -> --delete host:src/dir /dest +> ``` +> rsync -av --filter=': .rules' --filter='. /my/extra.rules' +> --delete host:src/dir /dest +> ``` In the above example the extra.rules file can affect both sides of the transfer, but (on the sending side) the rules are subservient to the rules @@ -4883,9 +5024,9 @@ per-directory merge rule. In one final example, the remote side is excluding the .rsync-filter files from the transfer, but we want to use our own .rsync-filter files to control what -gets deleted on the receiving side. To do this we must specifically exclude +gets deleted on the receiving side. To do this we must specifically exclude the per-directory merge files (so that they don't get deleted) and then put -rules into the local files to control what else should not get deleted. Like +rules into the local files to control what else should not get deleted. Like one of these commands: > ```bash @@ -4904,11 +5045,11 @@ Transfer rules affect only files and never directories. Because a transfer rule does not affect what goes into the sender's (and receiver's) file list, it cannot have any effect on which files get deleted on -the receiving side. For example, if the file "foo" is present in the sender's +the receiving side. For example, if the file "foo" is present in the sender's list but its size is such that it is omitted due to a transfer rule, the -receiving side does not request the file. However, its presence in the file +receiving side does not request the file. However, its presence in the file list means that a delete pass will not remove a matching file named "foo" on -the receiving side. On the other hand, a server-side exclude (hide) of the +the receiving side. On the other hand, a server-side exclude (hide) of the file "foo" leaves the file out of the server's file list, and absent a receiver-side exclude (protect) the receiver will remove a matching file named "foo" if deletions are requested. @@ -4929,47 +5070,51 @@ few others. ## BATCH MODE Batch mode can be used to apply the same set of updates to many identical -systems. Suppose one has a tree which is replicated on a number of hosts. Now +systems. Suppose one has a tree which is replicated on a number of hosts. Now suppose some changes have been made to this source tree and those changes need -to be propagated to the other hosts. In order to do this using batch mode, +to be propagated to the other hosts. In order to do this using batch mode, rsync is run with the write-batch option to apply the changes made to the -source tree to one of the destination trees. The write-batch option causes the +source tree to one of the destination trees. The write-batch option causes the rsync client to store in a "batch file" all the information needed to repeat this operation against other, identical destination trees. Generating the batch file once saves having to perform the file status, checksum, and data block generation more than once when updating multiple -destination trees. Multicast transport protocols can be used to transfer the +destination trees. Multicast transport protocols can be used to transfer the batch update files in parallel to many hosts at once, instead of sending the same data to every host individually. To apply the recorded changes to another destination tree, run rsync with the read-batch option, specifying the name of the same batch file, and the -destination tree. Rsync updates the destination tree using the information +destination tree. Rsync updates the destination tree using the information stored in the batch file. For your convenience, a script file is also created when the write-batch option -is used: it will be named the same as the batch file with ".sh" appended. This +is used: it will be named the same as the batch file with ".sh" appended. This script file contains a command line suitable for updating a destination tree -using the associated batch file. It can be executed using a Bourne (or +using the associated batch file. It can be executed using a Bourne (or Bourne-like) shell, optionally passing in an alternate destination tree -pathname which is then used instead of the original destination path. This is +pathname which is then used instead of the original destination path. This is useful when the destination tree path on the current host differs from the one used to create the batch file. Examples: -> $ rsync --write-batch=foo -a host:/source/dir/ /adest/dir/ -> $ scp foo* remote: -> $ ssh remote ./foo.sh /bdest/dir/ +> ``` +> $ rsync --write-batch=foo -a host:/source/dir/ /adest/dir/ +> $ scp foo* remote: +> $ ssh remote ./foo.sh /bdest/dir/ +> ``` -> $ rsync --write-batch=foo -a /source/dir/ /adest/dir/ -> $ ssh remote rsync --read-batch=- -a /bdest/dir/ ``` +> $ rsync --write-batch=foo -a /source/dir/ /adest/dir/ +> $ ssh remote rsync --read-batch=- -a /bdest/dir/ ``` In these examples, rsync is used to update /adest/dir/ from /source/dir/ and -the information to repeat this operation is stored in "foo" and "foo.sh". The +the information to repeat this operation is stored in "foo" and "foo.sh". The host "remote" is then updated with the batched data going into the directory -/bdest/dir. The differences between the two examples reveals some of the +/bdest/dir. The differences between the two examples reveals some of the flexibility you have in how you deal with batches: - The first example shows that the initial copy doesn't have to be local -- you @@ -4978,7 +5123,7 @@ flexibility you have in how you deal with batches: - The first example uses the created "foo.sh" file to get the right rsync options when running the read-batch command on the remote host. - The second example reads the batch data via standard input so that the batch - file doesn't need to be copied to the remote machine first. This example + file doesn't need to be copied to the remote machine first. This example avoids the foo.sh script because it needed to use a modified [`--read-batch`](#opt) option, but you could edit the script file if you wished to make use of it (just be sure that no other option is trying to use @@ -4988,28 +5133,28 @@ Caveats: The read-batch option expects the destination tree that it is updating to be identical to the destination tree that was used to create the batch update -fileset. When a difference between the destination trees is encountered the +fileset. When a difference between the destination trees is encountered the update might be discarded with a warning (if the file appears to be up-to-date already) or the file-update may be attempted and then, if the file fails to -verify, the update discarded with an error. This means that it should be safe -to re-run a read-batch operation if the command got interrupted. If you wish +verify, the update discarded with an error. This means that it should be safe +to re-run a read-batch operation if the command got interrupted. If you wish to force the batched-update to always be attempted regardless of the file's -size and date, use the [`-I`](#opt) option (when reading the batch). If an +size and date, use the [`-I`](#opt) option (when reading the batch). If an error occurs, the destination tree will probably be in a partially updated -state. In that case, rsync can be used in its regular (non-batch) mode of +state. In that case, rsync can be used in its regular (non-batch) mode of operation to fix up the destination tree. The rsync version used on all destinations must be at least as new as the one -used to generate the batch file. Rsync will die with an error if the protocol +used to generate the batch file. Rsync will die with an error if the protocol version in the batch file is too new for the batch-reading rsync to handle. See also the [`--protocol`](#opt) option for a way to have the creating rsync -generate a batch file that an older rsync can understand. (Note that batch +generate a batch file that an older rsync can understand. (Note that batch files changed format in version 2.6.3 (September 2004), so mixing versions older than that with newer versions will not work.) When reading a batch file, rsync will force the value of certain options to match the data in the batch file if you didn't set them to the same as the -batch-writing command. Other options can (and should) be changed. For +batch-writing command. Other options can (and should) be changed. For instance [`--write-batch`](#opt) changes to [`--read-batch`](#opt), [`--files-from`](#opt) is dropped, and the [`--filter`](#opt) / [`--include`](#opt) / [`--exclude`](#opt) options are not needed unless one of @@ -5017,8 +5162,8 @@ the [`--delete`](#opt) options is specified. The code that creates the BATCH.sh file transforms any filter/include/exclude options into a single list that is appended as a "here" document to the shell -script file. An advanced user can use this to modify the exclude list if a -change in what gets deleted by [`--delete`](#opt) is desired. A normal user +script file. An advanced user can use this to modify the exclude list if a +change in what gets deleted by [`--delete`](#opt) is desired. A normal user can ignore this detail and just use the shell script as an easy way to run the appropriate [`--read-batch`](#opt) command for the batched data. @@ -5030,22 +5175,22 @@ operator-supplied paths are handled separately; see [`--insecure-links`](#opt). Three basic behaviors are possible when rsync encounters a symbolic link in the source directory. -By default, symbolic links are not transferred at all. A message "skipping +By default, symbolic links are not transferred at all. A message "skipping non-regular" file is emitted for any symlinks that exist. If [`--links`](#opt) is specified, then symlinks are added to the transfer (instead of being noisily ignored), and the default handling is to recreate -them with the same target on the destination. Note that [`--archive`](#opt) +them with the same target on the destination. Note that [`--archive`](#opt) implies [`--links`](#opt). If [`--copy-links`](#opt) is specified, then symlinks are "collapsed" by copying their referent, rather than the symlink. -Rsync can also distinguish "safe" and "unsafe" symbolic links. An example +Rsync can also distinguish "safe" and "unsafe" symbolic links. An example where this might be used is a web site mirror that wishes to ensure that the rsync module that is copied does not include symbolic links to `/etc/passwd` in -the public section of the site. Using [`--copy-unsafe-links`](#opt) will cause -any links to be copied as the file they point to on the destination. Using +the public section of the site. Using [`--copy-unsafe-links`](#opt) will cause +any links to be copied as the file they point to on the destination. Using [`--safe-links`](#opt) will cause unsafe links to be omitted by the receiver. (Note that you must specify or imply [`--links`](#opt) for [`--safe-links`](#opt) to have any effect.) @@ -5054,32 +5199,32 @@ Symbolic links are considered unsafe if they are absolute symlinks (start with `/`), empty, or if they contain enough ".." components to ascend from the top of the transfer. -Here's a summary of how the symlink options are interpreted. The list is in +Here's a summary of how the symlink options are interpreted. The list is in order of precedence, so if your combination of options isn't mentioned, use the first line that is a complete subset of your options: -0. `--copy-links` Turn all symlinks into normal files and directories - (leaving no symlinks in the transfer for any other options to affect). -0. `--copy-dirlinks` Turn just symlinks to directories into real - directories, leaving all other symlinks to be handled as described below. -0. `--links --copy-unsafe-links` Turn all unsafe symlinks - into files and create all safe symlinks. -0. `--copy-unsafe-links` Turn all unsafe symlinks into files, noisily - skip all safe symlinks. -0. `--links --safe-links` The receiver skips creating - unsafe symlinks found in the transfer and creates the safe ones. -0. `--links` Create all symlinks. +0. `--copy-links` Turn all symlinks into normal files and directories + (leaving no symlinks in the transfer for any other options to affect). +1. `--copy-dirlinks` Turn just symlinks to directories into real + directories, leaving all other symlinks to be handled as described below. +2. `--links --copy-unsafe-links` Turn all unsafe symlinks + into files and create all safe symlinks. +3. `--copy-unsafe-links` Turn all unsafe symlinks into files, noisily + skip all safe symlinks. +4. `--links --safe-links` The receiver skips creating + unsafe symlinks found in the transfer and creates the safe ones. +5. `--links` Create all symlinks. For the effect of [`--munge-links`](#opt), see the discussion in that option's section. Note that the [`--keep-dirlinks`](#opt) option does not affect symlinks in the transfer but instead affects how rsync treats a symlink to a directory that -already exists on the receiving side. See that option's section for a warning. +already exists on the receiving side. See that option's section for a warning. ## DIAGNOSTICS -Rsync occasionally produces error messages that may seem a little cryptic. The +Rsync occasionally produces error messages that may seem a little cryptic. The one that seems to cause the most confusion is "protocol version mismatch -- is your shell clean?". @@ -5087,17 +5232,19 @@ This message is usually caused by your startup scripts or remote shell facility producing unwanted garbage on the stream that rsync is using for its transport. The way to diagnose this problem is to run your remote shell like this: -> ssh remotehost /bin/true > out.dat +> ``` +> ssh remotehost /bin/true > out.dat +> ``` -then look at out.dat. If everything is working correctly then out.dat should -be a zero length file. If you are getting the above error from rsync then you -will probably find that out.dat contains some text or data. Look at the -contents and try to work out what is producing it. The most common cause is +then look at out.dat. If everything is working correctly then out.dat should +be a zero length file. If you are getting the above error from rsync then you +will probably find that out.dat contains some text or data. Look at the +contents and try to work out what is producing it. The most common cause is incorrectly configured shell startup scripts (such as .cshrc or .profile) that contain output statements for non-interactive logins. If you are having trouble debugging filter patterns, then try specifying the -`-vv` option. At this level of verbosity rsync will show why each individual +`-vv` option. At this level of verbosity rsync will show why each individual file is included or excluded. ## EXIT VALUES @@ -5129,17 +5276,17 @@ file is included or excluded. ## ENVIRONMENT VARIABLES -0. `CVSIGNORE` +00. `CVSIGNORE` The CVSIGNORE environment variable supplements any ignore patterns in - .cvsignore files. See the [`--cvs-exclude`](#opt) option for more details. + .cvsignore files. See the [`--cvs-exclude`](#opt) option for more details. -0. `RSYNC_ICONV` +01. `RSYNC_ICONV` Specify a default [`--iconv`](#opt) setting using this environment variable. -0. `RSYNC_OLD_ARGS` +02. `RSYNC_OLD_ARGS` Specify a "1" if you want the [`--old-args`](#opt) option to be enabled by default, a "2" (or more) if you want it to be enabled in the @@ -5152,7 +5299,7 @@ file is included or excluded. First supported in 3.2.4 (April 2022). -0. `RSYNC_PROTECT_ARGS` +03. `RSYNC_PROTECT_ARGS` Specify a non-zero numeric value if you want the [`--secluded-args`](#opt) option to be enabled by default, or a zero value to make sure that it is @@ -5164,79 +5311,79 @@ file is included or excluded. Starting in 3.2.4 (April 2022), this variable is ignored if [`RSYNC_OLD_ARGS`](#) is set to a non-zero value. -0. `RSYNC_RSH` +04. `RSYNC_RSH` This environment variable allows you to override the default shell used as - the transport for rsync. Command line options are permitted after the + the transport for rsync. Command line options are permitted after the command name, just as in the [`--rsh`](#opt) (`-e`) option. -0. `RSYNC_PROXY` +05. `RSYNC_PROXY` This environment variable allows you to redirect your rsync - client to use a web proxy when connecting to an rsync daemon. You should + client to use a web proxy when connecting to an rsync daemon. You should set `RSYNC_PROXY` to a hostname:port pair. -0. `RSYNC_PASSWORD` +06. `RSYNC_PASSWORD` This environment variable allows you to set the password for an rsync - **daemon** connection, which avoids the password prompt. Note that this + **daemon** connection, which avoids the password prompt. Note that this does **not** supply a password to a remote shell transport such as ssh (consult its documentation for how to do that). -0. `USER` or `LOGNAME` +07. `USER` or `LOGNAME` The USER or LOGNAME environment variables are used to determine the default - username sent to an rsync daemon. If neither is set, the username defaults - to "nobody". If both are set, `USER` takes precedence. + username sent to an rsync daemon. If neither is set, the username defaults + to "nobody". If both are set, `USER` takes precedence. -0. `RSYNC_PARTIAL_DIR` +08. `RSYNC_PARTIAL_DIR` This environment variable specifies the directory to use for a [`--partial`](#opt) transfer without implying that partial transfers be - enabled. See the [`--partial-dir`](#opt) option for full details. + enabled. See the [`--partial-dir`](#opt) option for full details. -0. `RSYNC_COMPRESS_LIST` +09. `RSYNC_COMPRESS_LIST` This environment variable allows you to customize the negotiation of the compression algorithm by specifying an alternate order or a reduced list of - names. Use the command `rsync --version` to see the available compression - names. See the [`--compress`](#opt) option for full details. + names. Use the command `rsync --version` to see the available compression + names. See the [`--compress`](#opt) option for full details. -0. `RSYNC_CHECKSUM_LIST` +10. `RSYNC_CHECKSUM_LIST` This environment variable allows you to customize the negotiation of the checksum algorithm by specifying an alternate order or a reduced list of - names. Use the command `rsync --version` to see the available checksum - names. See the [`--checksum-choice`](#opt) option for full details. + names. Use the command `rsync --version` to see the available checksum + names. See the [`--checksum-choice`](#opt) option for full details. -0. `RSYNC_MAX_ALLOC` +11. `RSYNC_MAX_ALLOC` This environment variable sets an allocation maximum as if you had used the [`--max-alloc`](#opt) option. -0. `RSYNC_PORT` +12. `RSYNC_PORT` This environment variable is not read by rsync, but is instead set in its sub-environment when rsync is running the remote shell in combination - with a daemon connection. This allows a script such as + with a daemon connection. This allows a script such as [`rsync-ssl`](rsync-ssl.1) to be able to know the port number that the user specified on the command line. -0. `HOME` +13. `HOME` This environment variable is used to find the user's default .cvsignore file. -0. `RSYNC_CONNECT_PROG` +14. `RSYNC_CONNECT_PROG` This environment variable is mainly used in debug setups to set the program - to use when making a daemon connection. See [CONNECTING TO AN RSYNC + to use when making a daemon connection. See [CONNECTING TO AN RSYNC DAEMON](#) for full details. -0. `RSYNC_SHELL` +15. `RSYNC_SHELL` This environment variable is mainly used in debug setups to set the program - to use to run the program specified by [`RSYNC_CONNECT_PROG`](#). See + to use to run the program specified by [`RSYNC_CONNECT_PROG`](#). See [CONNECTING TO AN RSYNC DAEMON](#) for full details. ## FILES @@ -5250,7 +5397,7 @@ file is included or excluded. ## BUGS - Times are transferred as \*nix time_t values. -- When transferring to FAT filesystems rsync may re-sync unmodified files. See +- When transferring to FAT filesystems rsync may re-sync unmodified files. See the comments on the [`--modify-window`](#opt) option. - File permissions, devices, etc. are transferred as native numerical values. - See also the comments on the [`--delete`](#opt) option. @@ -5264,24 +5411,24 @@ This manpage is current for version @VERSION@ of rsync. ## INTERNAL OPTIONS The options `--server` and `--sender` are used internally by rsync, and should -never be typed by a user under normal circumstances. Some awareness of these +never be typed by a user under normal circumstances. Some awareness of these options may be needed in certain scenarios, such as when setting up a login -that can only run an rsync command. For instance, the support directory of the +that can only run an rsync command. For instance, the support directory of the rsync distribution has an example script named rrsync (for restricted rsync) that can be used with a restricted ssh login. ## CREDITS -Rsync is distributed under the GNU General Public License. See the file +Rsync is distributed under the GNU General Public License. See the file [COPYING](COPYING) for details. -An rsync web site is available at . The site +An rsync web site is available at . The site includes an FAQ-O-Matic which may cover questions unanswered by this manual page. The rsync github project is . -We would be delighted to hear from you if you like this program. Please +We would be delighted to hear from you if you like this program. Please contact the mailing-list at . This program uses the excellent zlib compression library written by Jean-loup @@ -5294,11 +5441,11 @@ David Dykstra, Jos Backus, Sebastian Krahmer, Martin Pool, and our gone-but-not-forgotten compadre, J.W. Schultz. Thanks also to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell and -David Bell. I've probably missed some people, my apologies if I have. +David Bell. I've probably missed some people, my apologies if I have. ## AUTHOR -Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many +Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many people from around the world have helped to maintain and improve it. Special thanks go to Wayne Davison, who maintained rsync from 2004 to 2024. diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md index f2905affe..b0854e477 100644 --- a/rsyncd.conf.5.md +++ b/rsyncd.conf.5.md @@ -56,13 +56,13 @@ Otherwise, it must just have permission to read and write the appropriate data, log, and lock files. You can launch it either via inetd, as a stand-alone daemon, or from an rsync -client via a remote shell. If run as a stand-alone daemon then just run the +client via a remote shell. If run as a stand-alone daemon then just run the command "`rsync --daemon`" from a suitable startup script. Systems using systemd can use the example unit files in the source tree's -`packaging/systemd` directory. The `rsync.service` file runs a stand-alone +`packaging/systemd` directory. The `rsync.service` file runs a stand-alone daemon using `rsync --daemon --no-detach`, while `rsync.socket` and -`rsync@.service` show a socket-activated setup for incoming connections. These +`rsync@.service` show a socket-activated setup for incoming connections. These files may need local adjustment to match your installed rsync path, packaging layout, and module policy. @@ -79,14 +79,18 @@ the modules and hooks used by the installation before enabling it. When run via inetd you should add a line like this to /etc/services: -> rsync 873/tcp +> ``` +> rsync 873/tcp +> ``` and a single line something like this to /etc/inetd.conf: -> rsync stream tcp nowait root @BINDIR@/rsync rsyncd --daemon +> ``` +> rsync stream tcp nowait root @BINDIR@/rsync rsyncd --daemon +> ``` Replace "@BINDIR@/rsync" with the path to where you have rsync installed on -your system. You will then need to send inetd a HUP signal to tell it to +your system. You will then need to send inetd a HUP signal to tell it to reread its config file. A standalone rsync daemon reads global settings at startup and opens the @@ -102,49 +106,47 @@ inetd or a remote shell reads the configuration for its single connection. The first parameters in the file (before a [module] header) are the global parameters: -[comment]: # (An OL starting at 0 is converted into a DL by the parser.) +0. `motd file` -0. `motd file` + This parameter allows you to specify a "message of the day" (MOTD) to display + to clients on each connect. This usually contains site information and any + legal notices. The default is no MOTD file. This can be overridden by the + `--dparam=motdfile=FILE` command-line option when starting the daemon. - This parameter allows you to specify a "message of the day" (MOTD) to display - to clients on each connect. This usually contains site information and any - legal notices. The default is no MOTD file. This can be overridden by the - `--dparam=motdfile=FILE` command-line option when starting the daemon. +1. `pid file` -0. `pid file` + This parameter tells the rsync daemon to write its process ID to that file. + The rsync keeps the file locked so that it can know when it is safe to + overwrite an existing file. - This parameter tells the rsync daemon to write its process ID to that file. - The rsync keeps the file locked so that it can know when it is safe to - overwrite an existing file. + The filename can be overridden by the `--dparam=pidfile=FILE` command-line + option when starting the daemon. - The filename can be overridden by the `--dparam=pidfile=FILE` command-line - option when starting the daemon. +2. `port` -0. `port` + You can override the default port the daemon will listen on by specifying + this value (defaults to 873). This is ignored if the daemon is being run + by inetd, and is superseded by the `--port` command-line option. - You can override the default port the daemon will listen on by specifying - this value (defaults to 873). This is ignored if the daemon is being run - by inetd, and is superseded by the `--port` command-line option. +3. `address` -0. `address` + You can override the default IP address the daemon will listen on by + specifying this value. This is ignored if the daemon is being run by + inetd, and is superseded by the `--address` command-line option. - You can override the default IP address the daemon will listen on by - specifying this value. This is ignored if the daemon is being run by - inetd, and is superseded by the `--address` command-line option. +4. `socket options` -0. `socket options` + This parameter can provide endless fun for people who like to tune their + systems to the utmost degree. You can set all sorts of socket options which + may make transfers faster (or slower!). Read the manpage for the + **setsockopt()** system call for details on some of the options you may be + able to set. By default no special socket options are set. These settings + can also be specified via the `--sockopts` command-line option. - This parameter can provide endless fun for people who like to tune their - systems to the utmost degree. You can set all sorts of socket options which - may make transfers faster (or slower!). Read the manpage for the - **setsockopt()** system call for details on some of the options you may be - able to set. By default no special socket options are set. These settings - can also be specified via the `--sockopts` command-line option. +5. `listen backlog` -0. `listen backlog` - - You can override the default backlog value when the daemon listens for - connections. It defaults to 5. + You can override the default backlog value when the daemon listens for + connections. It defaults to 5. You may also include any [MODULE PARAMETERS](#) in the global part of the config file, in which case the supplied value will override the default for @@ -153,13 +155,13 @@ that parameter. You may use references to environment variables in the values of parameters. String parameters will have %VAR% references expanded as late as possible (when the string is first used in the program), allowing for the use of variables -that rsync sets at connection time, such as RSYNC_USER_NAME. Non-string +that rsync sets at connection time, such as RSYNC_USER_NAME. Non-string parameters (such as true/false settings) are expanded when read from the config -file. If a variable does not exist in the environment, or if a sequence of +file. If a variable does not exist in the environment, or if a sequence of characters is not a valid reference (such as an un-paired percent sign), the -raw characters are passed through unchanged. This helps with backward +raw characters are passed through unchanged. This helps with backward compatibility and safety (e.g. expanding a non-existent %VAR% to an empty -string in a path could result in a very unsafe path). The safest way to insert +string in a path could result in a very unsafe path). The safest way to insert a literal % into a value is to use %%. ## MODULE PARAMETERS @@ -167,60 +169,64 @@ a literal % into a value is to use %%. After the global parameters you should define a number of modules, each module exports a directory tree as a symbolic name. Modules are exported by specifying a module name in square brackets [module] followed by the parameters for that -module. The module name cannot contain a slash or a closing square bracket. +module. The module name cannot contain a slash or a closing square bracket. If the name contains whitespace, each internal sequence of whitespace will be changed into a single space, while leading or trailing whitespace will be discarded. There is also a special module name of "[global]" that does not define a module but instead switches back to the global settings context where default -parameters can be specified. Because each defined module gets its full set of +parameters can be specified. Because each defined module gets its full set of parameters as a combination of the default values that are set at that position in the config file plus its own parameter list, the use of a "[global]" section can help to maintain shared config values for multiple modules. As with [GLOBAL PARAMETERS](#), you may use references to environment variables -in the values of parameters. See that section for details. +in the values of parameters. See that section for details. -0. `comment` +00. `comment` This parameter specifies a description string that is displayed next to the module name when clients obtain a list of available modules. The default is no comment. -0. `path` +01. `path` This parameter specifies the directory in the daemon's filesystem to make - available in this module. You must specify this parameter for each module + available in this module. You must specify this parameter for each module in `rsyncd.conf`. If the value contains a "/./" element then the path will be divided at that - point into a chroot dir and an inner-chroot subdir. If [`use chroot`](#) + point into a chroot dir and an inner-chroot subdir. If [`use chroot`](#) is set to false, though, the extraneous dot dir is just cleaned out of the - path. An example of this idiom is: + path. An example of this idiom is: - > path = /var/rsync/./module1 + > ``` + > path = /var/rsync/./module1 + > ``` This will (when chrooting) chroot to "/var/rsync" and set the inside-chroot path to "/module1". You may base the path's value off of an environment variable by surrounding - the variable name with percent signs. You can even reference a variable - that is set by rsync when the user connects. For example, this would use + the variable name with percent signs. You can even reference a variable + that is set by rsync when the user connects. For example, this would use the authorizing user's name in the path: - > path = /home/%RSYNC_USER_NAME% + > ``` + > path = /home/%RSYNC_USER_NAME% + > ``` It is fine if the path includes internal spaces -- they will be retained - verbatim (which means that you shouldn't try to escape them). If your + verbatim (which means that you shouldn't try to escape them). If your final directory has a trailing space (and this is somehow not something you wish to fix), append a trailing slash to the path to avoid losing the trailing whitespace. -0. `use chroot` +02. `use chroot` If "use chroot" is true, the rsync daemon will chroot to the "[path](#)" before - starting the file transfer with the client. This has the advantage of + starting the file transfer with the client. This has the advantage of extra protection against possible implementation security holes, but it has the disadvantages of requiring super-user privileges, of not being able to follow symbolic links that are either absolute or outside of the new root @@ -233,20 +239,20 @@ in the values of parameters. See that section for details. divider in it -- this causes an unset value to be treated as true for that module. - Prior to rsync 3.2.7, the default value was "true". The new "unset" + Prior to rsync 3.2.7, the default value was "true". The new "unset" default makes it easier to setup an rsync daemon as a non-root user or to - run a daemon on a system where chroot fails. Explicitly setting the value + run a daemon on a system where chroot fails. Explicitly setting the value to "true" in rsyncd.conf will always require the chroot to succeed. It is also possible to specify a dot-dir in the module's "[path](#)" to indicate that you want to chdir to the earlier part of the path and then serve files from inside the latter part of the path (with sanitizing and - default symlink munging). This can be useful if you need some library dirs + default symlink munging). This can be useful if you need some library dirs inside the chroot (typically for uid & gid lookups) but don't want to put the lib dir into the top of the served path (even though they can be hidden - with an [`exclude`](#) directive). However, a better choice for a modern + with an [`exclude`](#) directive). However, a better choice for a modern rsync setup is to use a [`name converter`](#)" and try to avoid inner lib - dirs altogether. See also the [`daemon chroot`](#) parameter, which causes + dirs altogether. See also the [`daemon chroot`](#) parameter, which causes rsync to chroot into its own chroot area before doing any path-related chrooting. @@ -256,13 +262,13 @@ in the values of parameters. See that section for details. When it has to limit access to a particular subdir (either due to chroot being disabled or having an inside-chroot path set), rsync will munge - symlinks (by default) and sanitize paths. Those that dislike munged + symlinks (by default) and sanitize paths. Those that dislike munged symlinks can disable the symlink munging via the "[munge symlinks](#)" parameter; incoming symlink values are then sanitized instead (see that parameter). When rsync is sanitizing paths, it resolves away the ".." path elements that - would take an arg above the module hierarchy. For an operator-supplied + would take an arg above the module hierarchy. For an operator-supplied option path such as `--backup-dir` & `--compare-dest`, a leading slash is also substituted with the module's path (so an absolute path is interpreted as rooted in the module's "[path](#)" dir); for the transfer's own source @@ -270,7 +276,7 @@ in the values of parameters. See that section for details. When a chroot is in effect *and* the "[name converter](#)" parameter is *not* set, the "[numeric ids](#)" parameter will default to being enabled - (disabling name lookups). This means that if you manually setup + (disabling name lookups). This means that if you manually setup name-lookup libraries in your chroot (instead of using a name converter) that you need to explicitly set `numeric ids = false` for rsync to do name lookups. @@ -279,56 +285,56 @@ in the values of parameters. See that section for details. protect them through your OS's normal user/group or ACL settings (to prevent the rsync module's user from being able to change them), and then hide them from the user's view via "[exclude](#)" (see how in the discussion of - that parameter). However, it's easier and safer to setup a name converter. + that parameter). However, it's easier and safer to setup a name converter. -0. `daemon chroot` +03. `daemon chroot` This parameter specifies a path to which the daemon will chroot before beginning communication with clients. Module paths (and any "[use chroot](#)" settings) will then be related to this one. This lets you choose if you want the whole daemon to be chrooted (with this setting), just the - transfers to be chrooted (with "[use chroot](#)"), or both. Keep in mind that + transfers to be chrooted (with "[use chroot](#)"), or both. Keep in mind that the "daemon chroot" area may need various OS/lib/etc files installed to - allow the daemon to function. By default the daemon runs without any + allow the daemon to function. By default the daemon runs without any chrooting. -0. `proxy protocol` +04. `proxy protocol` When this parameter is enabled, all incoming connections must start with a - V1 or V2 proxy protocol header. If the header is not found, the connection + V1 or V2 proxy protocol header. If the header is not found, the connection is closed. Setting this to `true` requires a proxy server to forward source IP information to rsync, allowing you to log proper IP/host info and make use - of client-oriented IP restrictions. The default of `false` means that the - IP information comes directly from the socket's metadata. If rsync is not + of client-oriented IP restrictions. The default of `false` means that the + IP information comes directly from the socket's metadata. If rsync is not behind a proxy, this should be disabled. _CAUTION_: using this option can be dangerous if you do not ensure that - only the proxy is allowed to connect to the rsync port. If any non-proxied + only the proxy is allowed to connect to the rsync port. If any non-proxied connections are allowed through, the client will be able to use a modified - rsync to spoof any remote IP address that they desire. You can lock this + rsync to spoof any remote IP address that they desire. You can lock this down using something like iptables `-uid-owner root` rules (for strict localhost access), various firewall rules, or you can require password authorization so that any spoofing by users will not grant extra access. - This setting is global. If you need some modules to require this and not + This setting is global. If you need some modules to require this and not others, then you will need to setup multiple rsync daemon processes on different ports. -0. `proxy protocol hosts` +05. `proxy protocol hosts` This global parameter lists the socket peer IP addresses that are allowed - to supply a `proxy protocol` header. The syntax is the same token format - used by `hosts allow`. When `proxy protocol = true`, this list must match + to supply a `proxy protocol` header. The syntax is the same token format + used by `hosts allow`. When `proxy protocol = true`, this list must match the direct peer before rsync trusts the forwarded client address. -0. `name converter` +06. `name converter` This parameter lets you specify a program that will be run by the rsync - daemon to do user & group conversions between names & ids. This script + daemon to do user & group conversions between names & ids. This script is started prior to any chroot being setup, and runs as the daemon user - (not the transfer user). You can specify a fully qualified pathname or + (not the transfer user). You can specify a fully qualified pathname or a program name that is on the $PATH. The program can be used to do normal user & group lookups without having to @@ -336,22 +342,22 @@ in the values of parameters. See that section for details. customized conversions. The nameconvert program has access to all of the environment variables that - are described in the section on `pre-xfer exec`. This is useful if you + are described in the section on `pre-xfer exec`. This is useful if you want to customize the conversion using information about the module and/or the copy request. There is a sample python script in the support dir named "nameconvert" that - implements the normal user & group lookups. Feel free to customize it or + implements the normal user & group lookups. Feel free to customize it or just use it as documentation to implement your own. -0. `numeric ids` +07. `numeric ids` Enabling this parameter disables the mapping of users and groups by name - for the current daemon module. This prevents the daemon from trying to - load any user/group-related files or libraries. This enabling makes the + for the current daemon module. This prevents the daemon from trying to + load any user/group-related files or libraries. This enabling makes the transfer behave as if the client had passed the `--numeric-ids` - command-line option. By default, this parameter is enabled for chroot - modules and disabled for non-chroot modules. Also keep in mind that + command-line option. By default, this parameter is enabled for chroot + modules and disabled for non-chroot modules. Also keep in mind that uid/gid preservation requires the module to be running as root (see "[uid](#)") or for "[fake super](#)" to be configured. @@ -360,21 +366,21 @@ in the values of parameters. See that section for details. that the module has the necessary resources it needs to translate names and that it is not possible for a user to change those resources. -0. `munge symlinks` +08. `munge symlinks` This parameter tells rsync to modify all incoming symlinks the same way as the (non-daemon-affecting) `--munge-links` command-line option: it prefixes - each stored symlink's value with the string "/rsyncd-munged/". Because that + each stored symlink's value with the string "/rsyncd-munged/". Because that directory does not normally exist, a munged symlink cannot be followed, so - an uploaded symlink cannot be used to read or write a file through it. On + an uploaded symlink cannot be used to read or write a file through it. On the way back out the prefix is stripped, so clients see the original symlink - values. When this parameter is enabled, rsync refuses to run a module if + values. When this parameter is enabled, rsync refuses to run a module if "/rsyncd-munged/" already exists in it as a directory or a symlink to a - directory. The default depends on chroot. For a plain chrooted module -- + directory. The default depends on chroot. For a plain chrooted module -- "[use chroot](#)" on and "[path](#)" with no "/./" split, so the daemon chroots straight into the module and serves it as the chroot root -- munging is disabled by default, since the chroot itself already stops a symlink from - escaping. In every other case it is enabled: any non-chroot module, or a + escaping. In every other case it is enabled: any non-chroot module, or a chroot module whose "[path](#)" uses a "/./" split to serve an inner subdir below the chroot root. @@ -386,7 +392,7 @@ in the values of parameters. See that section for details. cannot name a path outside the module (it can still point to another name inside the module). - Munging changes only the symlink VALUES that are stored. Whether the daemon + Munging changes only the symlink VALUES that are stored. Whether the daemon follows a *pre-existing* in-module symlink when it resolves a transfer path is a separate matter, governed by the secure path resolver that is on by default; see the "[insecure links](#)" parameter for the exact rule and how @@ -400,7 +406,7 @@ in the values of parameters. See that section for details. instance on links you create locally inside a module), there is a python script in the support directory of the source code named "munge-symlinks". -0. `insecure links` +09. `insecure links` This parameter (defaulting to "false") controls whether the daemon resolves its symlink-bearing paths with the normal symlink-race defences or with the @@ -410,8 +416,8 @@ in the values of parameters. See that section for details. create -- the directory enumeration and file-content opens of the served module, and the operator-supplied paths (`--backup-dir`, `--temp-dir`, `--partial-dir`, the alt-dest basis dirs, and so on) are all resolved with a - walk that follows a symlink component only when it is owned by uid 0 or - by the uid the module runs as, refusing one planted by any other user. A + walk that follows a symlink component only when it is owned by uid 0 or + by the uid the module runs as, refusing one planted by any other user. A client can never relax this: a client that sends `--insecure-links` to the daemon has its request refused. @@ -422,42 +428,42 @@ in the values of parameters. See that section for details. > TOCTOU vulnerabilities that the default closes (including CVE-2026-53797 > and CVE-2026-53801): an attacker who can create a symlink inside the module > -- or who shares the host with the served tree -- can redirect the daemon's - > reads and writes to files **outside** the module. Enable it **only** on a + > reads and writes to files **outside** the module. Enable it **only** on a > single-tenant, fully-isolated, or otherwise trusted host where no untrusted - > local user can plant a symlink in the served tree. It is the daemon + > local user can plant a symlink in the served tree. It is the daemon > analogue of the client's `--insecure-links` and exists for the same narrow > "I accept the risk in my isolated environment" case. -0. `charset` +10. `charset` This specifies the name of the character set in which the module's - filenames are stored. If the client uses an `--iconv` option, the daemon + filenames are stored. If the client uses an `--iconv` option, the daemon will use the value of the "charset" parameter regardless of the character - set the client actually passed. This allows the daemon to support charset + set the client actually passed. This allows the daemon to support charset conversion in a chroot module without extra files in the chroot area, and - also ensures that name-translation is done in a consistent manner. If the + also ensures that name-translation is done in a consistent manner. If the "charset" parameter is not set, the `--iconv` option is refused, just as if "iconv" had been specified via "[refuse options](#)". If you wish to force users to always use `--iconv` for a particular module, - add "no-iconv" to the "[refuse options](#)" parameter. Keep in mind that this + add "no-iconv" to the "[refuse options](#)" parameter. Keep in mind that this will restrict access to your module to very new rsync clients. -0. `max connections` +11. `max connections` This parameter allows you to specify the maximum number of simultaneous - connections you will allow. Any clients connecting when the maximum has - been reached will receive a message telling them to try later. The default - is 0, which means no limit. A negative value disables the module. See + connections you will allow. Any clients connecting when the maximum has + been reached will receive a message telling them to try later. The default + is 0, which means no limit. A negative value disables the module. See also the "[lock file](#)" parameter. -0. `log file` +12. `log file` When the "log file" parameter is set to a non-empty string, the rsync daemon will log messages to the indicated file rather than using syslog. This is particularly useful on systems (such as AIX) where **syslog()** - doesn't work for chrooted programs. The file is opened before **chroot()** - is called, allowing it to be placed outside the transfer. If this value is + doesn't work for chrooted programs. The file is opened before **chroot()** + is called, allowing it to be placed outside the transfer. If this value is set on a per-module basis instead of globally, the global log will still contain any authorization failures or config-file error messages. @@ -466,39 +472,41 @@ in the values of parameters. See that section for details. These rules do not change what the daemon sends to syslog. If the daemon fails to open the specified file, it will fall back to using - syslog and output an error about the failure. (Note that the failure to + syslog and output an error about the failure. (Note that the failure to open the specified log file used to be a fatal error.) This setting can be overridden by using the `--log-file=FILE` or - `--dparam=logfile=FILE` command-line options. The former overrides all the - log-file parameters of the daemon and all module settings. The latter sets + `--dparam=logfile=FILE` command-line options. The former overrides all the + log-file parameters of the daemon and all module settings. The latter sets the daemon's log file and the default for all the modules, which still allows modules to override the default setting. -0. `syslog facility` +13. `syslog facility` This parameter allows you to specify the syslog facility name to use when logging messages from the rsync daemon. You may use any standard syslog facility name which is defined on your system. Common names are auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6 and local7. - The default is daemon. This setting has no effect if the "[log file](#)" + The default is daemon. This setting has no effect if the "[log file](#)" setting is a non-empty string (either set in the per-modules settings, or inherited from the global settings). -0. `syslog tag` +14. `syslog tag` This parameter allows you to specify the syslog tag to use when logging - messages from the rsync daemon. The default is "rsyncd". This setting has + messages from the rsync daemon. The default is "rsyncd". This setting has no effect if the "[log file](#)" setting is a non-empty string (either set in the per-modules settings, or inherited from the global settings). For example, if you wanted each authenticated user's name to be included in the syslog tag, you could do something like this: - > syslog tag = rsyncd.%RSYNC_USER_NAME% + > ``` + > syslog tag = rsyncd.%RSYNC_USER_NAME% + > ``` -0. `max verbosity` +15. `max verbosity` This parameter allows you to control the maximum amount of verbose information that you'll allow the daemon to generate (since the information @@ -506,21 +514,21 @@ in the values of parameters. See that section for details. request one level of verbosity. This also affects the user's ability to request higher levels of `--info` - and `--debug` logging. If the max value is 2, then no info and/or debug + and `--debug` logging. If the max value is 2, then no info and/or debug value that is higher than what would be set by `-vv` will be honored by the - daemon in its logging. To see how high of a verbosity level you need to + daemon in its logging. To see how high of a verbosity level you need to accept for a particular info/debug level, refer to `rsync --info=help` and - `rsync --debug=help`. For instance, it takes max-verbosity 4 to be able to + `rsync --debug=help`. For instance, it takes max-verbosity 4 to be able to output debug TIME2 and FLIST3. -0. `lock file` +16. `lock file` This parameter specifies the file to use to support the "[max connections](#)" parameter. The rsync daemon uses record locking on this file to ensure that the max connections limit is not exceeded for the modules sharing the lock - file. The default is `/var/run/rsyncd.lock`. + file. The default is `/var/run/rsyncd.lock`. -0. `read only` +17. `read only` This parameter determines whether clients will be able to upload files or not. If "read only" is true then any attempted uploads will fail. If @@ -529,24 +537,24 @@ in the values of parameters. See that section for details. Note that "[auth users](#)" can override this setting on a per-user basis. -0. `write only` +18. `write only` This parameter determines whether clients will be able to download files or not. If "write only" is true then any attempted downloads will fail. If "write only" is false then downloads will be possible if file permissions - on the daemon side allow them. The default is for this parameter to be + on the daemon side allow them. The default is for this parameter to be disabled. Helpful hint: you probably want to specify "refuse options = delete" for a write-only module. -0. `open noatime` +19. `open noatime` When set to True, this parameter tells the rsync daemon to open files with the O_NOATIME flag (on systems that support it) to avoid changing the access time of the files - that are being transferred. If your OS does not support the O_NOATIME flag - then rsync will silently ignore this option. Note also that some + that are being transferred. If your OS does not support the O_NOATIME flag + then rsync will silently ignore this option. Note also that some filesystems are mounted to avoid updating the atime on read access even without the O_NOATIME flag being set. @@ -556,165 +564,167 @@ in the values of parameters. See that section for details. When set to Unset (the default) the user controls the setting via `--open-noatime`. -0. `list` +20. `list` This parameter determines whether this module is listed when the client - asks for a listing of available modules. In addition, if this is false, + asks for a listing of available modules. In addition, if this is false, the daemon will pretend the module does not exist when a client denied by - "[hosts allow](#)" or "[hosts deny](#)" attempts to access it. Realize that if + "[hosts allow](#)" or "[hosts deny](#)" attempts to access it. Realize that if "[reverse lookup](#)" is disabled globally but enabled for the module, the resulting reverse lookup to a potentially client-controlled DNS server may - still reveal to the client that it hit an existing module. The default is + still reveal to the client that it hit an existing module. The default is for modules to be listable. -0. `uid` +21. `uid` This parameter specifies the user name or user ID that file transfers to and from that module should take place as when the daemon was run as root. In combination with the "[gid](#)" parameter this determines what file permissions are available. The default when run by a super-user is to - switch to the system's "nobody" user. The default for a non-super-user is - to not try to change the user. See also the "[gid](#)" parameter. + switch to the system's "nobody" user. The default for a non-super-user is + to not try to change the user. See also the "[gid](#)" parameter. The RSYNC_USER_NAME environment variable may be used to request that rsync - run as the authorizing user. For example, if you want a rsync to run as + run as the authorizing user. For example, if you want a rsync to run as the same user that was received for the rsync authentication, this setup is useful: - > uid = %RSYNC_USER_NAME% - > gid = * + > ``` + > uid = %RSYNC_USER_NAME% + > gid = * + > ``` -0. `gid` +22. `gid` This parameter specifies one or more group names/IDs that will be used when - accessing the module. The first one will be the default group, and any - extra ones be set as supplemental groups. You may also specify a "`*`" as + accessing the module. The first one will be the default group, and any + extra ones be set as supplemental groups. You may also specify a "`*`" as the first gid in the list, which will be replaced by all the normal groups - for the transfer's user (see "[uid](#)"). The default when run by a super-user + for the transfer's user (see "[uid](#)"). The default when run by a super-user is to switch to your OS's "nobody" (or perhaps "nogroup") group with no - other supplementary groups. The default for a non-super-user is to not + other supplementary groups. The default for a non-super-user is to not change any group attributes (and indeed, your OS may not allow a non-super-user to try to change their group settings). The specified list is normally split into tokens based on spaces and - commas. However, if the list starts with a comma, then the list is only - split on commas, which allows a group name to contain a space. In either + commas. However, if the list starts with a comma, then the list is only + split on commas, which allows a group name to contain a space. In either case any leading and/or trailing whitespace is removed from the tokens and empty tokens are ignored. -0. `daemon uid` +23. `daemon uid` This parameter specifies a uid under which the daemon will run. The daemon usually runs as user root, and when this is left unset the user is left unchanged. See also the "[uid](#)" parameter. -0. `daemon gid` +24. `daemon gid` This parameter specifies a gid under which the daemon will run. The daemon usually runs as group root, and when this is left unset, the group is left unchanged. See also the "[gid](#)" parameter. -0. `fake super` +25. `fake super` Setting "fake super = yes" for a module causes the daemon side to behave as - if the `--fake-super` command-line option had been specified. This allows + if the `--fake-super` command-line option had been specified. This allows the full attributes of a file to be stored without having to have the daemon actually running as root. -0. `filter` +26. `filter` The daemon has its own filter chain that determines what files it will let - the client access. This chain is not sent to the client and is independent - of any filters the client may have specified. Files excluded by the daemon + the client access. This chain is not sent to the client and is independent + of any filters the client may have specified. Files excluded by the daemon filter chain (`daemon-excluded` files) are treated as non-existent if the client tries to pull them, are skipped with an error message if the client tries to push them (triggering exit code 23), and are never deleted from - the module. You can use daemon filters to prevent clients from downloading + the module. You can use daemon filters to prevent clients from downloading or tampering with private administrative files, such as files you may add to support uid/gid name translations. The daemon filter chain is built from the "filter", "[include from](#)", "[include](#)", "[exclude from](#)", and "[exclude](#)" parameters, in that order of - priority. Anchored patterns are anchored at the root of the module. To + priority. Anchored patterns are anchored at the root of the module. To prevent access to an entire subtree, for example, "`/secret`", you **must** exclude everything in the subtree; the easiest way to do this is with a triple-star pattern like "`/secret/***`". The filter chain matches the **logical name** of each item relative to the - module root, not the physical file it resolves to. It is a visibility and + module root, not the physical file it resolves to. It is a visibility and tamper filter, **not** a security boundary against symlinks: a symlink inside the module whose own name is not excluded can still be followed to an excluded target (the name the filter sees -- e.g. "`link`" -- is not the excluded name - -- e.g. "`secret`"). What protects a writable module from symlink trickery is + -- e.g. "`secret`"). What protects a writable module from symlink trickery is the "[munge symlinks](#)" parameter (enabled by default for a writable, non-chrooted module), **not** this filter; do not rely on `exclude`/`filter` to confine a peer who can introduce or traverse a symlink. The "filter" parameter takes a space-separated list of daemon filter rules, though it is smart enough to know not to split a token at an internal space - in a rule (e.g. "`- /foo - /bar`" is parsed as two rules). You may specify - one or more merge-file rules using the normal syntax. Only one "filter" + in a rule (e.g. "`- /foo - /bar`" is parsed as two rules). You may specify + one or more merge-file rules using the normal syntax. Only one "filter" parameter can apply to a given module in the config file, so put all the - rules you want in a single parameter. Note that per-directory merge-file + rules you want in a single parameter. Note that per-directory merge-file rules do not provide as much protection as global rules, but they can be used to make `--delete` work better during a client download operation if the per-dir merge files are included in the transfer and the client requests that they be used. -0. `exclude` +27. `exclude` - This parameter takes a space-separated list of daemon exclude patterns. As + This parameter takes a space-separated list of daemon exclude patterns. As with the client `--exclude` option, patterns can be qualified with "`- `" or - "`+ `" to explicitly indicate exclude/include. Only one "exclude" parameter - can apply to a given module. See the "filter" parameter for a description + "`+ `" to explicitly indicate exclude/include. Only one "exclude" parameter + can apply to a given module. See the "filter" parameter for a description of how excluded files affect the daemon. -0. `include` +28. `include` - Use an "include" to override the effects of the "[exclude](#)" parameter. Only - one "include" parameter can apply to a given module. See the "[filter](#)" + Use an "include" to override the effects of the "[exclude](#)" parameter. Only + one "include" parameter can apply to a given module. See the "[filter](#)" parameter for a description of how excluded files affect the daemon. -0. `exclude from` +29. `exclude from` This parameter specifies the name of a file on the daemon that contains - daemon exclude patterns, one per line. Only one "exclude from" parameter + daemon exclude patterns, one per line. Only one "exclude from" parameter can apply to a given module; if you have multiple exclude-from files, you - can specify them as a merge file in the "[filter](#)" parameter. See the + can specify them as a merge file in the "[filter](#)" parameter. See the "[filter](#)" parameter for a description of how excluded files affect the daemon. -0. `include from` +30. `include from` - Analogue of "[exclude from](#)" for a file of daemon include patterns. Only one - "include from" parameter can apply to a given module. See the "[filter](#)" + Analogue of "[exclude from](#)" for a file of daemon include patterns. Only one + "include from" parameter can apply to a given module. See the "[filter](#)" parameter for a description of how excluded files affect the daemon. -0. `incoming chmod` +31. `incoming chmod` This parameter allows you to specify a set of comma-separated chmod strings that will affect the permissions of all incoming files (files that are - being received by the daemon). These changes happen after all other + being received by the daemon). These changes happen after all other permission calculations, and this will even override destination-default and/or existing permissions when the client does not specify `--perms`. See the description of the `--chmod` rsync option and the **chmod**(1) manpage for information on the format of this string. -0. `outgoing chmod` +32. `outgoing chmod` This parameter allows you to specify a set of comma-separated chmod strings that will affect the permissions of all outgoing files (files that are - being sent out from the daemon). These changes happen first, making the + being sent out from the daemon). These changes happen first, making the sent permissions appear to be different than those stored in the filesystem - itself. For instance, you could disable group write permissions on the - server while having it appear to be on to the clients. See the description + itself. For instance, you could disable group write permissions on the + server while having it appear to be on to the clients. See the description of the `--chmod` rsync option and the **chmod**(1) manpage for information on the format of this string. -0. `auth users` +33. `auth users` This parameter specifies a comma and/or space-separated list of - authorization rules. In its simplest form, you list the usernames that + authorization rules. In its simplest form, you list the usernames that will be allowed to connect to this module. The usernames do not need to exist on the local system. The rules may contain shell wildcard characters that will be matched against the username provided by the client for @@ -726,40 +736,44 @@ in the values of parameters. See that section for details. connect without a password (this is called "anonymous rsync"). In addition to username matching, you can specify groupname matching via a - '@' prefix. When using groupname matching, the authenticating username + '@' prefix. When using groupname matching, the authenticating username must be a real user on the system, or it will be assumed to be a member of - no groups. For example, specifying "@rsync" will match the authenticating + no groups. For example, specifying "@rsync" will match the authenticating user if the named user is a member of the rsync group. - Finally, options may be specified after a colon (:). The options allow you + Finally, options may be specified after a colon (:). The options allow you to "deny" a user or a group, set the access to "ro" (read-only), or set the - access to "rw" (read/write). Setting an auth-rule-specific ro/rw setting + access to "rw" (read/write). Setting an auth-rule-specific ro/rw setting overrides the module's "[read only](#)" setting. Be sure to put the rules in the order you want them to be matched, because the checking stops at the first matching user or group, and that is the - only auth that is checked. For example: + only auth that is checked. For example: - > auth users = joe:deny @guest:deny admin:rw @rsync:ro susan joe sam + > ``` + > auth users = joe:deny @guest:deny admin:rw @rsync:ro susan joe sam + > ``` - In the above rule, user joe will be denied access no matter what. Any user - that is in the group "guest" is also denied access. The user "admin" gets + In the above rule, user joe will be denied access no matter what. Any user + that is in the group "guest" is also denied access. The user "admin" gets access in read/write mode, but only if the admin user is not in group "guest" (because the admin user-matching rule would never be reached if the - user is in group "guest"). Any other user who is in group "rsync" will get - read-only access. Finally, users susan, joe, and sam get the ro/rw setting + user is in group "guest"). Any other user who is in group "rsync" will get + read-only access. Finally, users susan, joe, and sam get the ro/rw setting of the module, but only if the user didn't match an earlier group-matching rule. If you need to specify a user or group name with a space in it, start your list with a comma to indicate that the list should only be split on commas (though leading and trailing whitespace will also be removed, and empty - entries are just ignored). For example: + entries are just ignored). For example: - > auth users = , joe:deny, @Some Group:deny, admin:rw, @RO Group:ro + > ``` + > auth users = , joe:deny, @Some Group:deny, admin:rw, @RO Group:ro + > ``` See the description of the secrets file for how you can have per-user - passwords as well as per-group passwords. It also explains how a user can + passwords as well as per-group passwords. It also explains how a user can authenticate using their user password or (when applicable) a group password, depending on what rule is being authenticated. @@ -768,89 +782,91 @@ in the values of parameters. See that section for details. rsyncd.conf-level username that differs from the remote-shell-level username when using a remote shell to connect to an rsync daemon. -0. `secrets file` +34. `secrets file` This parameter specifies the name of a file that contains the username:password and/or @groupname:password pairs used for authenticating this module. This file is only consulted if the "[auth users](#)" parameter is - specified. The file is line-based and contains one name:password pair per - line. Any line has a hash (#) as the very first character on the line is - considered a comment and is skipped. The passwords can contain any + specified. The file is line-based and contains one name:password pair per + line. Any line has a hash (#) as the very first character on the line is + considered a comment and is skipped. The passwords can contain any characters but be warned that many operating systems limit the length of passwords that can be typed at the client end, so you may find that passwords longer than 8 characters don't work. The use of group-specific lines are only relevant when the module is being - authorized using a matching "@groupname" rule. When that happens, the user + authorized using a matching "@groupname" rule. When that happens, the user can be authorized via either their "username:password" line or the "@groupname:password" line for the group that triggered the authentication. It is up to you what kind of password entries you want to include, either - users, groups, or both. The use of group rules in "[auth users](#)" does not + users, groups, or both. The use of group rules in "[auth users](#)" does not require that you specify a group password if you do not want to use shared passwords. There is no default for the "secrets file" parameter, you must choose a - name (such as `/etc/rsyncd.secrets`). Unless "[strict modes](#)" is + name (such as `/etc/rsyncd.secrets`). Unless "[strict modes](#)" is disabled, the file must not be readable or writable by "other", and (when the daemon runs as root) must be owned by root; see "[strict modes](#)" for - the exact check. If the file is not found or is rejected, no logins for an + the exact check. If the file is not found or is rejected, no logins for an "[auth users](#)" module will be possible. -0. `auth digest` +35. `auth digest` This parameter sets the *minimum* message digest that the daemon will accept for the challenge-response authentication of an "[auth users](#)" module. The available digests, strongest first, are `sha512`, `sha256`, `sha1`, - `md5`, `md4`. The daemon selects its own most-preferred digest that also + `md5`, `md4`. The daemon selects its own most-preferred digest that also appears in the connecting client's advertised list (and falls back to `md5`, or `md4` below protocol 30, for a client that advertises none), so a client that advertises only weak digests can still force a weak negotiated digest. If it is weaker than the configured - name, the connection is refused before the challenge is sent. The value is a + name, the connection is refused before the challenge is sent. The value is a single digest name, for example: - > auth digest = sha256 + > ``` + > auth digest = sha256 + > ``` which requires `sha256` or `sha512` and refuses an `md5` or `md4` exchange. - This guards against an *auth-digest downgrade*. A peer that sends no digest + This guards against an *auth-digest downgrade*. A peer that sends no digest list (any rsync before 3.2.0, including the openrsync that ships with macOS) makes the daemon fall back to `md5` (or `md4` below protocol 30), and an on-path attacker can rewrite the unauthenticated negotiation to force the same - weak choice. A captured challenge-response is far cheaper to brute-force + weak choice. A captured challenge-response is far cheaper to brute-force offline against a weak digest, so a site whose clients are all modern can - require a strong one. See the rsync `SECURITY.md` document for the full + require a strong one. See the rsync `SECURITY.md` document for the full threat model. There is **no default** -- the floor is off and the daemon accepts whatever - digest is negotiated, preserving compatibility with older clients. Enabling a + digest is negotiated, preserving compatibility with older clients. Enabling a floor refuses every client that cannot offer at least that digest, notably any rsync older than 3.2.0 (when the SHA digests were added) and the - macOS-bundled openrsync, which authenticate only with `md4`/`md5`. The SHA + macOS-bundled openrsync, which authenticate only with `md4`/`md5`. The SHA digests require an rsync built with openssl at both ends; naming a digest this build does not provide refuses all logins to the module (fail-closed). Like the other auth parameters, this may be set per module or, for a default that applies to every module, in the global part of the config file. -0. `strict modes` +36. `strict modes` This parameter determines whether or not the permissions on the secrets - file will be checked. If "strict modes" is true (the default), the secrets + file will be checked. If "strict modes" is true (the default), the secrets file is rejected if it is readable or writable by "other" (i.e. if any of the other-read or other-write permission bits is set), and, when the daemon - is running as root, if the file is not owned by root. Group permissions and + is running as root, if the file is not owned by root. Group permissions and the other-execute bit are not consulted, so modes such as 600 or 640 are - accepted while 644 (or any other-readable/-writable mode) is rejected. If - "strict modes" is false, no permission check is performed. This parameter + accepted while 644 (or any other-readable/-writable mode) is rejected. If + "strict modes" is false, no permission check is performed. This parameter was added to accommodate rsync running on the Windows operating system. -0. `hosts allow` +37. `hosts allow` This parameter allows you to specify a list of comma- and/or whitespace-separated patterns that are matched against a connecting - client's hostname and IP address. If none of the patterns match, then the + client's hostname and IP address. If none of the patterns match, then the connection is rejected. Each pattern can be in one of six forms: @@ -859,7 +875,7 @@ in the values of parameters. See that section for details. the form a:b:c::d:e:f. In this case the incoming machine's IP address must match exactly. - an address/mask in the form ipaddr/n where ipaddr is the IP address and n - is the number of one bits in the netmask. All IP addresses which match + is the number of one bits in the netmask. All IP addresses which match the masked IP address will be allowed in. - an address/mask in the form ipaddr/maskaddr where ipaddr is the IP address and maskaddr is the netmask in dotted decimal notation for IPv4, @@ -868,11 +884,11 @@ in the values of parameters. See that section for details. - a hostname pattern using wildcards. If the hostname of the connecting IP (as determined by a reverse lookup) matches the wildcarded name (using the same rules as normal Unix filename matching), the client is allowed - in. This only works if "[reverse lookup](#)" is enabled (the default). + in. This only works if "[reverse lookup](#)" is enabled (the default). - a hostname. A plain hostname is matched against the reverse DNS of the connecting IP (if "[reverse lookup](#)" is enabled), and/or the IP of the given hostname is matched against the connecting IP (if "[forward lookup](#)" - is enabled, as it is by default). Any match will be allowed in. + is enabled, as it is by default). Any match will be allowed in. - an '@' followed by a netgroup name, which will match if the reverse DNS of the connecting IP is in the specified netgroup. @@ -880,34 +896,36 @@ in the values of parameters. See that section for details. a hostname pattern may contain non-ASCII characters: this file is read as UTF-8, and each non-ASCII label is converted to its IDNA A-label ("Punycode") form before matching, since the name the daemon has for a - client always reaches it from DNS as ASCII. A pattern written with + client always reaches it from DNS as ASCII. A pattern written with combining characters is normalized on the way, so it matches the same as - its precomposed spelling. Only those labels change, so an address, a + its precomposed spelling. Only those labels change, so an address, a mask, an already-punycoded name, and the wildcard characters are all - matched exactly as written. A pattern that cannot be converted that way - is matched as it stands, and thus matches nothing. That includes a + matched exactly as written. A pattern that cannot be converted that way + is matched as it stands, and thus matches nothing. That includes a pattern whose conversion would have introduced a character it was not written with, such as the U+FF0A FULLWIDTH ASTERISK that the IDNA mapping - turns into a "*". + turns into a "\*". Note IPv6 link-local addresses can have a scope in the address specification: - > fe80::1%link1 - > fe80::%link1/64 - > fe80::%link1/ffff:ffff:ffff:ffff:: + > ``` + > fe80::1%link1 + > fe80::%link1/64 + > fe80::%link1/ffff:ffff:ffff:ffff:: + > ``` You can also combine "hosts allow" with "[hosts deny](#)" as a way to add - exceptions to your deny list. When both parameters are specified, the + exceptions to your deny list. When both parameters are specified, the "hosts allow" parameter is checked first and a match results in the client - being able to connect. A non-allowed host is then matched against the - "[hosts deny](#)" list to see if it should be rejected. A host that does not + being able to connect. A non-allowed host is then matched against the + "[hosts deny](#)" list to see if it should be rejected. A host that does not match either list is allowed to connect. The default is no "hosts allow" parameter, which means all hosts can connect. -0. `hosts deny` +38. `hosts deny` This parameter allows you to specify a list of comma- and/or whitespace-separated patterns that are matched against a connecting clients @@ -917,28 +935,28 @@ in the values of parameters. See that section for details. The default is no "hosts deny" parameter, which means all hosts can connect. -0. `reverse lookup` +39. `reverse lookup` Controls whether the daemon performs a reverse lookup on the client's IP address to determine its hostname, which is used for "[hosts allow](#)" & - "[hosts deny](#)" checks and the "%h" log escape. This is enabled by default, + "[hosts deny](#)" checks and the "%h" log escape. This is enabled by default, but you may wish to disable it to save time if you know the lookup will not return a useful result, in which case the daemon will use the name "UNDETERMINED" instead. If this parameter is enabled globally (even by default), rsync performs the lookup as soon as a client connects, so disabling it for a module will not - avoid the lookup. Thus, you probably want to disable it globally and then + avoid the lookup. Thus, you probably want to disable it globally and then enable it for modules that need the information. -0. `forward lookup` +40. `forward lookup` Controls whether the daemon performs a forward lookup on any hostname - specified in an hosts allow/deny setting. By default this is enabled, + specified in an hosts allow/deny setting. By default this is enabled, allowing the use of an explicit hostname that would not be returned by reverse DNS of the connecting IP. -0. `ignore errors` +41. `ignore errors` This parameter tells rsyncd to ignore I/O errors on the daemon when deciding whether to run the delete phase of the transfer. Normally rsync @@ -947,38 +965,38 @@ in the values of parameters. See that section for details. I/O error. In some cases this test is counter productive so you can use this parameter to turn off this behavior. -0. `ignore nonreadable` +42. `ignore nonreadable` This tells the rsync daemon to completely ignore files that are not readable by the user. This is useful for public archives that may have some non-readable files among the directories, and the sysadmin doesn't want those files to be seen at all. -0. `transfer logging` +43. `transfer logging` This parameter enables per-file logging of downloads and uploads in a - format somewhat similar to that used by ftp daemons. The daemon always + format somewhat similar to that used by ftp daemons. The daemon always logs the transfer at the end, so if a transfer is aborted, no mention will be made in the log file. If you want to customize the log lines, see the "[log format](#)" parameter. -0. `log format` +44. `log format` This parameter allows you to specify the format used for logging file - transfers when transfer logging is enabled. The format is a text string + transfers when transfer logging is enabled. The format is a text string containing embedded single-character escape sequences prefixed with a - percent (%) character. An optional numeric field width may also be + percent (%) character. An optional numeric field width may also be specified between the percent and the escape letter (e.g. - "`%-50n %8l %07p`"). In addition, one or more apostrophes may be specified + "`%-50n %8l %07p`"). In addition, one or more apostrophes may be specified prior to a numerical escape to indicate that the numerical value should be - made more human-readable. The 3 supported levels are the same as for the + made more human-readable. The 3 supported levels are the same as for the `--human-readable` command-line option, though the default is for - human-readability to be off. Each added apostrophe increases the level + human-readability to be off. Each added apostrophe increases the level (e.g. "`%''l %'b %f`"). The default log format is "`%o %h [%a] %m (%u) %f %l`", and a "`%t [%p] `" - is always prefixed when using the "[log file](#)" parameter. (A perl script + is always prefixed when using the "[log file](#)" parameter. (A perl script that will summarize this default log format is included in the rsync source code distribution in the "support" subdirectory: rsyncstats.) @@ -1017,10 +1035,10 @@ in the values of parameters. See that section for details. `--itemize-changes` option in the rsync manpage. Note that some of the logged output changes when talking with older rsync - versions. For instance, deleted files were only output as verbose messages + versions. For instance, deleted files were only output as verbose messages prior to rsync 2.6.4. -0. `timeout` +45. `timeout` This parameter allows you to override the clients choice for I/O timeout for this module. Using this parameter you can ensure that rsync won't wait @@ -1028,10 +1046,10 @@ in the values of parameters. See that section for details. zero means no timeout and is the default. A good choice for anonymous rsync daemons may be 600 (giving a 10 minute timeout). -0. `refuse options` +46. `refuse options` This parameter allows you to specify a space-separated list of rsync - command-line options that will be refused by your rsync daemon. You may + command-line options that will be refused by your rsync daemon. You may specify the full option name, its one-letter abbreviation, or a wild-card string that matches multiple options. Beginning in 3.2.0, you can also negate a match term by starting it with a "!". @@ -1041,7 +1059,9 @@ in the values of parameters. See that section for details. For example, this would refuse `--checksum` (`-c`) and all the various delete options: - > refuse options = c delete + > ``` + > refuse options = c delete + > ``` The reason the above refuses all delete options is that the options imply `--delete`, and implied options are refused just like explicit options. @@ -1049,26 +1069,32 @@ in the values of parameters. See that section for details. The use of a negated match allows you to fine-tune your refusals after a wild-card, such as this: - > refuse options = delete-* !delete-during + > ``` + > refuse options = delete-* !delete-during + > ``` Negated matching can also turn your list of refused options into a list of accepted options. To do this, begin the list with a "`*`" (to refuse all - options) and then specify one or more negated matches to accept. For + options) and then specify one or more negated matches to accept. For example: - > refuse options = * !a !v !compress* + > ``` + > refuse options = * !a !v !compress* + > ``` Don't worry that the "`*`" will refuse certain vital options such as `--dry-run`, `--server`, `--no-iconv`, `--seclude-args`, etc. These important options are not matched by wild-card, so they must be overridden - by their exact name. For instance, if you're forcing iconv transfers you + by their exact name. For instance, if you're forcing iconv transfers you could use something like this: - > refuse options = * no-iconv !a !v + > ``` + > refuse options = * no-iconv !a !v + > ``` As an additional aid (beginning in 3.2.0), refusing (or "`!refusing`") the - "a" or "archive" option also affects all the options that the `--archive` - option implies (`-rdlptgoD`), but only if the option is matched explicitly + "a" or "archive" option also affects all the options that the `--archive` + option implies (`-rdlptgoD`), but only if the option is matched explicitly (not using a wildcard). If you want to do something tricky, you can use "`archive*`" to avoid this side-effect, but keep in mind that no normal rsync client ever sends the actual archive option to the server. @@ -1083,11 +1109,15 @@ in the values of parameters. See that section for details. accept all delete options) or specify a limited set that includes "delete", such as: - > refuse options = * !a !delete !delete-during + > ``` + > refuse options = * !a !delete !delete-during + > ``` ... whereas this accepts any delete option except `--delete-after`: - > refuse options = * !a !delete* delete-after + > ``` + > refuse options = * !a !delete* delete-after + > ``` A note on refusing "compress": it may be better to set the "[dont compress](#)" daemon parameter to "`*`" and ensure that `RSYNC_COMPRESS_LIST=zlib` is set @@ -1100,7 +1130,7 @@ in the values of parameters. See that section for details. Note that the "copy-devices" & "write-devices" options are refused by default, but they can be explicitly accepted with "`!copy-devices`" and/or - "`!write-devices`". The options "log-file" and "log-file-format" are + "`!write-devices`". The options "log-file" and "log-file-format" are forcibly refused and cannot be accepted. Here are all the options that are not matched by wild-cards: @@ -1108,7 +1138,7 @@ in the values of parameters. See that section for details. - `--server`: Required for rsync to even work. - `--rsh`, `-e`: Required to convey compatibility flags to the server. - `--out-format`: This is required to convey output behavior to a remote - receiver. While rsync passes the older alias `--log-format` for + receiver. While rsync passes the older alias `--log-format` for compatibility reasons, this options should not be confused with `--log-file-format`. - `--sender`: Use "[write only](#)" parameter instead of refusing this. @@ -1121,7 +1151,7 @@ in the values of parameters. See that section for details. - `--checksum-seed`: Is a fairly rare, safe option. - `--write-devices`: Is non-wild but also auto-disabled. -0. `dont compress` +47. `dont compress` **NOTE:** This parameter currently has no effect except in one instance: if it is set to "`*`" then it minimizes or disables compression for all files @@ -1136,9 +1166,9 @@ in the values of parameters. See that section for details. The "dont compress" parameter takes a space-separated list of case-insensitive wildcard patterns. Any source filename matching one of the - patterns will be compressed as little as possible during the transfer. If + patterns will be compressed as little as possible during the transfer. If the compression algorithm has an "off" level, then no compression occurs - for those files. If an algorithms has the ability to change the level in + for those files. If an algorithms has the ability to change the level in mid-stream, it will be minimized to reduce the CPU usage as much as possible. @@ -1146,25 +1176,25 @@ in the values of parameters. See that section for details. list of file suffixes that are skipped by default if this parameter is not set. -0. `early exec`, `pre-xfer exec`, `post-xfer exec` +48. `early exec`, `pre-xfer exec`, `post-xfer exec` You may specify a command to be run in the early stages of the connection, - or right before and/or after the transfer. If the `early exec` or + or right before and/or after the transfer. If the `early exec` or `pre-xfer exec` command returns an error code, the transfer is aborted - before it begins. Any output from the `pre-xfer exec` command on stdout + before it begins. Any output from the `pre-xfer exec` command on stdout (up to several KB) will be displayed to the user when aborting, but is - _not_ displayed if the script returns success. The other programs cannot - send any text to the user. All output except for the `pre-xfer exec` + _not_ displayed if the script returns success. The other programs cannot + send any text to the user. All output except for the `pre-xfer exec` stdout goes to the corresponding daemon's stdout/stderr, which is typically - discarded. See the `--no-detach` option for a way to see the daemon's + discarded. See the `--no-detach` option for a way to see the daemon's output, which can assist with debugging. Note that the `early exec` command runs before any part of the transfer - request is known except for the module name. This helper script can be + request is known except for the module name. This helper script can be used to setup a disk mount or decrypt some data into a module dir, but you may need to use `lock file` and `max connections` to avoid concurrency - issues. If the client rsync specified the `--early-input=FILE` option, it - can send up to about 5K of data to the stdin of the early script. The + issues. If the client rsync specified the `--early-input=FILE` option, it + can send up to about 5K of data to the stdin of the early script. The stdin will otherwise be empty. Note that the `post-xfer exec` command is still run even if one of the @@ -1181,17 +1211,17 @@ in the values of parameters. See that section for details. - `RSYNC_USER_NAME`: The accessing user's name (empty if no user). - `RSYNC_PID`: A unique number for this transfer. - `RSYNC_REQUEST`: (pre-xfer only) The module/path info specified by the - user. Note that the user can specify multiple source files, so the + user. Note that the user can specify multiple source files, so the request can be something like "mod/path1 mod/path2", etc. - `RSYNC_ARG#`: (pre-xfer only) The pre-request arguments are set in these numbered values. RSYNC_ARG0 is always "rsyncd", followed by the options - that were used in RSYNC_ARG1, and so on. There will be a value of "." + that were used in RSYNC_ARG1, and so on. There will be a value of "." indicating that the options are done and the path args are beginning -- these contain similar information to RSYNC_REQUEST, but with values separated and the module name stripped off. - - `RSYNC_EXIT_STATUS`: (post-xfer only) the server side's exit value. This + - `RSYNC_EXIT_STATUS`: (post-xfer only) the server side's exit value. This will be 0 for a successful run, a positive value for an error that the - server generated, or a -1 if rsync failed to exit properly. Note that an + server generated, or a -1 if rsync failed to exit properly. Note that an error that occurs on the client side does not currently get sent to the server side, so this is not the final exit status for the whole transfer. - `RSYNC_RAW_STATUS`: (post-xfer only) the raw exit value from @@ -1199,9 +1229,9 @@ in the values of parameters. See that section for details. A `%VAR%` reference expanded into one of these commands is escaped for the quoting context it appears in, which is correct for the single shell that - runs the command. It is not correct for a command that starts a SECOND + runs the command. It is not correct for a command that starts a SECOND shell, such as `sh -c '... %RSYNC_USER_NAME% ...'`: the outer shell consumes - the escaping, and the inner one sees the value bare. A value of `touc?` + the escaping, and the inner one sees the value bare. A value of `touc?` would then be glob-expanded against `/usr/bin/`, so the substitution is not data any more -- it chooses the command. @@ -1209,21 +1239,23 @@ in the values of parameters. See that section for details. carrying any character that a shell could act on is refused outright, and the transfer is aborted with - > refusing to run shell hook: %VAR% holds a shell metacharacter + > ``` + > refusing to run shell hook: %VAR% holds a shell metacharacter + > ``` The refused characters are whitespace, the quoting and expansion characters `'` `"` `` ` `` `$` `\`, the separators `;` `&` `|`, redirections `<` `>`, parentheses, the pattern characters `*` `?` `[` `]`, `#`, `!`, `~`, `{` `}`, - and any control character. Some of those are harmless on their own and are + and any control character. Some of those are harmless on their own and are refused for what a *second* shell would do with them -- `!` negates in command position, so a hook written as an access check can be turned from a denial into an approval, and `~` is tilde-expanded. This applies to EVERY `%RSYNC_*%` value, including ones you supplied - yourself. In particular a module whose `path` contains any of them cannot + yourself. In particular a module whose `path` contains any of them cannot be interpolated into one of these commands: `path = /srv/My Backups` with a command mentioning `%RSYNC_MODULE_PATH%` will refuse every transfer of that module, not just a - hostile one. The restriction is deliberate -- rsync cannot tell your space + hostile one. The restriction is deliberate -- rsync cannot tell your space from an attacker's once both are inside the same string, and `path` itself may be built from a peer value such as `path = /home/%RSYNC_USER_NAME%`. @@ -1242,7 +1274,7 @@ in the values of parameters. See that section for details. **system()** call's default shell), and use RSYNC_NO_XFER_EXEC to disable both options completely. -0. `temp dir` +49. `temp dir` Specifies a directory that rsync should use for temporary files created during the transfer of updated files. If that directory is on a different @@ -1251,12 +1283,11 @@ in the values of parameters. See that section for details. This parameter equals with `--temp-dir` option, so please consult rsync manpage for further information. - ## CONFIG DIRECTIVES There are currently two config directives available that allow a config file to -incorporate the contents of other files: `&include` and `&merge`. Both allow -a reference to either a file or a directory. They differ in how segregated the +incorporate the contents of other files: `&include` and `&merge`. Both allow +a reference to either a file or a directory. They differ in how segregated the file's contents are considered to be. The `&include` directive treats each file as more distinct, with each one @@ -1272,16 +1303,20 @@ etc. When an `&include` or `&merge` directive refers to a directory, it will read in all the `*.conf` or `*.inc` files (respectively) that are contained inside that directory (without any recursive scanning), with the files sorted into alpha -order. So, if you have a directory named "rsyncd.d" with the files "foo.conf", +order. So, if you have a directory named "rsyncd.d" with the files "foo.conf", "bar.conf", and "baz.conf" inside it, this directive: -> &include /path/rsyncd.d +> ``` +> &include /path/rsyncd.d +> ``` would be the same as this set of directives: -> &include /path/rsyncd.d/bar.conf -> &include /path/rsyncd.d/baz.conf -> &include /path/rsyncd.d/foo.conf +> ``` +> &include /path/rsyncd.d/bar.conf +> &include /path/rsyncd.d/baz.conf +> &include /path/rsyncd.d/foo.conf +> ``` except that it adjusts as files are added and removed from the directory. @@ -1296,12 +1331,14 @@ that will affect other include files. For example, this is a useful /etc/rsyncd.conf file: -> port = 873 -> log file = /var/log/rsync.log -> pid file = /var/lock/rsync.lock +> ``` +> port = 873 +> log file = /var/log/rsync.log +> pid file = /var/lock/rsync.lock > -> &merge /etc/rsyncd.d -> &include /etc/rsyncd.d +> &merge /etc/rsyncd.d +> &include /etc/rsyncd.d +> ``` This would merge any `/etc/rsyncd.d/*.inc` files (for global values that should stay in effect), and then include any `/etc/rsyncd.d/*.conf` files (defining @@ -1314,60 +1351,59 @@ master process usually runs as root, so it should be configured defensively. The following is a practical checklist; the project's `SECURITY.md` describes the underlying threat model and the per-platform residuals. -0. **Confine each module to its path.** - Leave "[use chroot](#)" enabled (the default attempts a chroot) so the - per-connection worker is jailed inside the module's "[path](#)". Where chroot - is unavailable rsync still resolves every transfer path so it cannot escape - the module through a symlinked parent, but a chroot is the stronger boundary - -- keep it on unless you have a specific reason not to. A `path = - /outer/./inner` chroots to `/outer` while serving `/inner` as the module root. - -0. **Drop privileges.** - Give each module a low-privilege "[uid](#)" and "[gid](#)" so a worker never - serves files as root; only the master process needs root (to chroot and bind - the port). Keep modules "[read only](#)" unless they must accept uploads, and - prefer "[numeric ids](#)" (or a "[name converter](#)") so a malicious file - list cannot map files to an unexpected local owner. - -0. **Restrict who can connect.** - Limit reachability with "[hosts allow](#)" / "[hosts deny](#)", bind the - daemon to a specific "[address](#)", and use a host firewall. A module - without "[auth users](#)" is reachable by anyone who can reach the port. - -0. **Authenticate with a strong secret and digest.** - Require login with "[auth users](#)" plus a "[secrets file](#)" that is - readable only by the daemon user (rsync refuses a too-open file unless - "[strict modes](#)" is disabled), and use a long, high-entropy secret. To - refuse the weak MD4/MD5 challenge digests that old clients can negotiate, set - a floor with "[auth digest](#)" (for example `auth digest = sha512`); see the - AUTHENTICATION STRENGTH section below. - -0. **Encrypt the connection.** - The daemon protocol authenticates but does **not** encrypt the data stream. - Do not expose a cleartext daemon to an untrusted network: front it with a TLS - proxy (see the SSL/TLS Daemon Setup section below) or run it over ssh. - -0. **Keep symlink handling safe.** - Leave "[munge symlinks](#)" enabled on any writable module (it is the default) - so an uploaded symlink cannot redirect a later operation outside the module. - Do **not** set "[insecure links](#) = yes" on a host shared with untrusted - local users: it disables the daemon's symlink-escape protections (re-opening - the symlink TOCTOU/escape vulnerabilities, including CVE-2026-53797 and - CVE-2026-53801) and is appropriate only on a single-tenant, fully isolated - host. - -0. **Refuse options you do not want.** - Use "[refuse options](#)" to reject client options a module should not allow. +0. **Confine each module to its path.** + Leave "[use chroot](#)" enabled (the default attempts a chroot) so the + per-connection worker is jailed inside the module's "[path](#)". Where chroot + is unavailable rsync still resolves every transfer path so it cannot escape + the module through a symlinked parent, but a chroot is the stronger boundary + -- keep it on unless you have a specific reason not to. A `path = /outer/./inner` chroots to `/outer` while serving `/inner` as the module root. + +1. **Drop privileges.** + Give each module a low-privilege "[uid](#)" and "[gid](#)" so a worker never + serves files as root; only the master process needs root (to chroot and bind + the port). Keep modules "[read only](#)" unless they must accept uploads, and + prefer "[numeric ids](#)" (or a "[name converter](#)") so a malicious file + list cannot map files to an unexpected local owner. + +2. **Restrict who can connect.** + Limit reachability with "[hosts allow](#)" / "[hosts deny](#)", bind the + daemon to a specific "[address](#)", and use a host firewall. A module + without "[auth users](#)" is reachable by anyone who can reach the port. + +3. **Authenticate with a strong secret and digest.** + Require login with "[auth users](#)" plus a "[secrets file](#)" that is + readable only by the daemon user (rsync refuses a too-open file unless + "[strict modes](#)" is disabled), and use a long, high-entropy secret. To + refuse the weak MD4/MD5 challenge digests that old clients can negotiate, set + a floor with "[auth digest](#)" (for example `auth digest = sha512`); see the + AUTHENTICATION STRENGTH section below. + +4. **Encrypt the connection.** + The daemon protocol authenticates but does **not** encrypt the data stream. + Do not expose a cleartext daemon to an untrusted network: front it with a TLS + proxy (see the SSL/TLS Daemon Setup section below) or run it over ssh. + +5. **Keep symlink handling safe.** + Leave "[munge symlinks](#)" enabled on any writable module (it is the default) + so an uploaded symlink cannot redirect a later operation outside the module. + Do **not** set "[insecure links](#) = yes" on a host shared with untrusted + local users: it disables the daemon's symlink-escape protections (re-opening + the symlink TOCTOU/escape vulnerabilities, including CVE-2026-53797 and + CVE-2026-53801) and is appropriate only on a single-tenant, fully isolated + host. + +6. **Refuse options you do not want.** + Use "[refuse options](#)" to reject client options a module should not allow. ## AUTHENTICATION STRENGTH Daemon authentication is a challenge-response system in which the client -returns a digest of the shared secret and a server-chosen challenge. Modern +returns a digest of the shared secret and a server-chosen challenge. Modern rsync (3.2.7 and later, built with openssl) negotiates the strongest digest both sides support -- `sha512` by default -- but for backward compatibility it falls back to `md5` (or `md4` below protocol 30) for a client that advertises no digest -list, and the digest negotiation is itself unauthenticated. A daemon that wants -to require a strong digest can set "[auth digest](#)". For the best protection, +list, and the digest negotiation is itself unauthenticated. A daemon that wants +to require a strong digest can set "[auth digest](#)". For the best protection, run rsync over ssh or a verified TLS transport (`rsync-ssl`), which protects the exchange at the transport layer, and use a high-entropy shared secret (which is infeasible to brute-force regardless of the digest). @@ -1386,10 +1422,10 @@ configure a TCP proxy (such as haproxy or nginx) as the front-end that handles the encryption. - You should limit the access to the backend-rsyncd port to only allow the - proxy to connect. If it is on the same host as the proxy, then configuring + proxy to connect. If it is on the same host as the proxy, then configuring it to only listen on localhost is a good idea. - You should consider turning on the `proxy protocol` rsync-daemon parameter if - your proxy supports sending that information. The examples below assume that + your proxy supports sending that information. The examples below assume that this is enabled. An example haproxy setup is as follows: @@ -1473,8 +1509,10 @@ A more sophisticated example would be: The /etc/rsyncd.secrets file would look something like this: -> tridge:mypass -> susan:herpass +> ``` +> tridge:mypass +> susan:herpass +> ``` ## FILES @@ -1502,7 +1540,7 @@ This manpage is current for version @VERSION@ of rsync. ## CREDITS -Rsync is distributed under the GNU General Public License. See the file +Rsync is distributed under the GNU General Public License. See the file [COPYING](COPYING) for details. An rsync web site is available at and its github @@ -1515,7 +1553,7 @@ Thanks to Karsten Thygesen for his many suggestions and documentation! ## AUTHOR -Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many +Rsync was originally written by Andrew Tridgell and Paul Mackerras. Many people from around the world have helped to maintain and improve it. Special thanks go to Wayne Davison, who maintained rsync from 2004 to 2024. diff --git a/support/rrsync.1.md b/support/rrsync.1.md index 1eefb1cc6..74dcf9399 100644 --- a/support/rrsync.1.md +++ b/support/rrsync.1.md @@ -19,11 +19,11 @@ is available at . A user's ssh login can be restricted to only allow the running of an rsync transfer in one of two easy ways: -* forcing the running of the rrsync script -* forcing the running of an rsync daemon-over-ssh command. +- forcing the running of the rrsync script +- forcing the running of an rsync daemon-over-ssh command. Both of these setups use a feature of ssh that allows a command to be forced to -run instead of an interactive shell. However, if the user's home shell is bash, +run instead of an interactive shell. However, if the user's home shell is bash, please see [BASH SECURITY ISSUE](#) for a potential issue. To use the rrsync script, edit the user's `~/.ssh/authorized_keys` file and add @@ -51,12 +51,12 @@ ssh-key line that should be restricted: > ``` Then, ensure that the rsyncd.conf file is created with one or more module names -with the appropriate path and option restrictions. If rsync's +with the appropriate path and option restrictions. If rsync's [`--config`](rsync.1#dopt) option is omitted, it defaults to `~/rsyncd.conf`. See the [**rsyncd.conf**(5)](rsyncd.conf.5) manpage for details of how to configure an rsync daemon. -When using rrsync, there can be just one restricted dir per authorized key. A +When using rrsync, there can be just one restricted dir per authorized key. A daemon setup, on the other hand, allows multiple module names inside the config file, each one with its own path setting. @@ -64,51 +64,51 @@ The remainder of this manpage is dedicated to using the rrsync script. ## OPTIONS -0. `-ro` +0. `-ro` - Allow only reading from the DIR. Implies [`-no-del`](#opt) and - [`-no-lock`](#opt). + Allow only reading from the DIR. Implies [`-no-del`](#opt) and + [`-no-lock`](#opt). -0. `-wo` +1. `-wo` - Allow only writing to the DIR. + Allow only writing to the DIR. -0. `-munge` +2. `-munge` - Enable rsync's [`--munge-links`](rsync.1#opt) on the server side. + Enable rsync's [`--munge-links`](rsync.1#opt) on the server side. -0. `-absolute` +3. `-absolute` - Allow file-transfer arguments to name the restricted directory using its - absolute server path. For example, with `rrsync -absolute /path/to/root`, - the transfer arg `/path/to/root/dir1` is accepted as an alias for `dir1`. + Allow file-transfer arguments to name the restricted directory using its + absolute server path. For example, with `rrsync -absolute /path/to/root`, + the transfer arg `/path/to/root/dir1` is accepted as an alias for `dir1`. -0. `-no-del` +4. `-no-del` - Disable rsync's `--delete*` and `--remove*` options. + Disable rsync's `--delete*` and `--remove*` options. -0. `-no-lock` +5. `-no-lock` - Avoid the single-run (per-user) lock check. Useful with [`-munge`](#opt). + Avoid the single-run (per-user) lock check. Useful with [`-munge`](#opt). -0. `-no-overwrite` +6. `-no-overwrite` - Enforce `--ignore-existing` on the server. Prevents overwriting existing - files when the server is the receiver. + Enforce `--ignore-existing` on the server. Prevents overwriting existing + files when the server is the receiver. - Because `--ignore-existing` protects only the file being transferred, this - also refuses the options that can reach a *different* existing file in the - restricted dir: `--log-file`, `--partial-dir`, `--delay-updates`, - `--delay-symlinks` (which creates its symlinks at the end of the transfer, - replacing whatever has appeared at that name since the check), and backup - mode (`-b`, `--backup-dir`, whose published backup replaces whatever - already occupies the backup name). Resumable uploads with an explicit - `--partial-dir`, `--delay-updates`, `--delay-symlinks`, and server-side - logging are therefore unavailable under this option. + Because `--ignore-existing` protects only the file being transferred, this + also refuses the options that can reach a *different* existing file in the + restricted dir: `--log-file`, `--partial-dir`, `--delay-updates`, + `--delay-symlinks` (which creates its symlinks at the end of the transfer, + replacing whatever has appeared at that name since the check), and backup + mode (`-b`, `--backup-dir`, whose published backup replaces whatever + already occupies the backup name). Resumable uploads with an explicit + `--partial-dir`, `--delay-updates`, `--delay-symlinks`, and server-side + logging are therefore unavailable under this option. -0. `-help`, `-h` +7. `-help`, `-h` - Output this help message and exit. + Output this help message and exit. ## SECURITY RESTRICTIONS @@ -121,16 +121,16 @@ file outside the DIR. The rrsync script rejects rsync's [`--protect-args`](rsync.1#opt) (`-s`) option because it would allow options to be sent to the server-side that the script -cannot check. If you want to support `--protect-args`, use a daemon-over-ssh +cannot check. If you want to support `--protect-args`, use a daemon-over-ssh setup. The rrsync script accepts just a subset of rsync's options that the real rsync -uses when running the server command. A few extra convenience options are also +uses when running the server command. A few extra convenience options are also included to help it to interact with BackupPC and accept some convenient user overrides. The [`--nice`](rsync.1#opt--nice) option is limited to local CPU nice 19, idle -I/O priority or both. Other values could raise the server process priority and +I/O priority or both. Other values could raise the server process priority and are rejected. The rrsync script accepts rsync's @@ -151,17 +151,17 @@ the option handling. If your users have bash set as their home shell, bash may try to be overly helpful and ensure that the user's login bashrc files are run prior to -executing the forced command. This can be a problem if the user can somehow +executing the forced command. This can be a problem if the user can somehow update their home bashrc files, perhaps via the restricted copy, a shared home directory, or something similar. One simple way to avoid the issue is to switch the user to a simpler shell, -such as dash. When choosing the new home shell, make sure that you're not +such as dash. When choosing the new home shell, make sure that you're not choosing bash in disguise, as it is unclear if it avoids the security issue. Another potential fix is to ensure that the user's home directory is not a shared mount and that they have no means of copying files outside of their -restricted directories. This may require you to force the enabling of symlink +restricted directories. This may require you to force the enabling of symlink munging on the server side. A future version of openssh may have a change to the handling of forced @@ -190,7 +190,7 @@ This manpage is current for version @VERSION@ of rsync. ## CREDITS -rsync is distributed under the GNU General Public License. See the file +rsync is distributed under the GNU General Public License. See the file [COPYING](COPYING) for details. An rsync web site is available at and its github @@ -198,5 +198,5 @@ project is . ## AUTHOR -The original rrsync perl script was written by Joe Smith. Many people have -later contributed to it. The python version was created by Wayne Davison. +The original rrsync perl script was written by Joe Smith. Many people have +later contributed to it. The python version was created by Wayne Davison. diff --git a/testsuite/README.md b/testsuite/README.md index f2cd2a616..881ceb4f9 100644 --- a/testsuite/README.md +++ b/testsuite/README.md @@ -5,6 +5,7 @@ The runner and harness use Python 3.7 or later and its standard library. Some te ## Running tests From a configured build directory: + ```sh make check make check29 @@ -14,6 +15,7 @@ make check30 The first target runs the suite with the default protocol; the others force protocols 29 and 30. Make runs up to eight tests at once. Set CHECK_J to change that limit. For an in-tree build, individual tests and filename patterns can be selected after running `make check-progs`: + ```sh python3 -S testsuite/runtests.py -j8 chmod-temp-dir 'xattrs*' python3 -S testsuite/runtests.py --help @@ -42,15 +44,15 @@ Profiles under profiles/ distinguish tests which do not apply from missing capab The tools/check.py launcher takes a build directory, binary, profile list and fresh output directory followed by runner options. It saves run.log and receipt.json, then checks the receipt against the executable and profiles. -Result | Meaning ---- | --- -N/A | Excluded by applicability metadata -PASS | Assertions passed -FAIL | An assertion failed -ERROR | The test or harness failed unexpectedly -SKIP | Skipped without a capability -UNSUPPORTED | A required capability was unavailable -PROFILE_ERROR | A result disagreed with the active profile +| Result | Meaning | +| ------------- | ------------------------------------------ | +| N/A | Excluded by applicability metadata | +| PASS | Assertions passed | +| FAIL | An assertion failed | +| ERROR | The test or harness failed unexpectedly | +| SKIP | Skipped without a capability | +| UNSUPPORTED | A required capability was unavailable | +| PROFILE_ERROR | A result disagreed with the active profile | With profiles active, an unsupported result is accepted only when the test declares the capability and the profile permits its absence. A generic skip fails the run. Without profiles, skips and unsupported results are accepted. Receipts record raw outcomes, profile verdicts, exclusions, executable hashes and the effective UID. @@ -59,6 +61,7 @@ With profiles active, an unsupported result is accepted only when the test decla [ci.yml](../.github/workflows/ci.yml) defines the platform groups and required checks. Native jobs exercise root and non-root transfers where available. Historical peers run applicable tests in both executable roles over pipe and TCP. Diagnostics cover the minimum Python version, static analysis, sanitisers, coverage and Valgrind. Coverage reports omit daemon work after chroot because its counter files are outside the chroot. The minimum Python and lint jobs use the same helper test roster. Run those checks from the repository root with: + ```sh python3 -B -S .github/scripts/diagnostics.py check-helpers ```