{"id":2834,"date":"2020-07-17T06:40:12","date_gmt":"2020-07-16T21:40:12","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2834"},"modified":"2020-07-17T06:42:54","modified_gmt":"2020-07-16T21:42:54","slug":"a-little-experiment-with-the-new-features-of-rsync-3-2-0","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2020\/07\/17\/a-little-experiment-with-the-new-features-of-rsync-3-2-0\/","title":{"rendered":"rsync 3.2.0\u306e\u65b0\u6a5f\u80fd\u3092\u5c11\u3057\u8a66\u3059"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>\u30d5\u30a1\u30a4\u30eb\u540c\u671f\u306b\u3068\u3066\u3082\u4fbf\u5229\u306arsync\u306e3.2.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/rsync.samba.org\/\">rsync<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30d0\u30b0\u30d5\u30a3\u30af\u30b9\u3084\uff0c\u3044\u304f\u3064\u304b\u306e\u65b0\u6a5f\u80fd\u304c\u5165\u3063\u305f\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e<br \/>\n\u203b2. \u9e7f\u5150\u5cf6Linux\u52c9\u5f37\u4f1a 2020.06\u3067\u767a\u8868\u3057\u305f\u3082\u306e\u3068\u540c\u3058\u5185\u5bb9\u3067\u3059\uff0e<\/p>\n<div style=\"text-align: center;\"><a style=\"display: block; margin: 5px auto;\" href=\"https:\/\/www.edocr.com\/v\/akxbnoxw\" target=\"_blank\"><img decoding=\"async\" style=\"max-width: 300px;\" src=\"https:\/\/s3.amazonaws.com\/storage.prizmshare.com\/940060C4-2F52-4449-B3A4-D79714A87FC7\/akxbnoxw\/4z2lrbm4.jpg?ts=1593431142405\" alt=\"rsync 3.2.0 \u306e\u65b0\u6a5f\u80fd\u3092\u8a66\u3057\u3066\u307f\u308b\"\/><\/a><\/p>\n<p style=\"text-align: center; font-size: .8em;\"><a href=\"https:\/\/www.edocr.com\" target=\"_blank\">View more on edocr<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u5c0e\u5165\u4f8b\">\u5c0e\u5165\u4f8b<\/h2>\n<div class=\"sectionbody\">\n<div class=\"sect2\">\n<h3 id=\"_debian_sid_amd64_ubuntu_20_04_lts_amd64\">Debian sid amd64 &amp; Ubuntu 20.04 LTS amd64<\/h3>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sudo apt build-dep rsync\n$ sudo apt install libxxhash-dev libzstd-dev liblz4-dev\n$ wget -c \\\nhttps:\/\/download.samba.org\/pub\/rsync\/rsync-3.2.0.tar.gz \\\nhttps:\/\/download.samba.org\/pub\/rsync\/rsync-3.2.0.tar.gz.asc \\\nhttps:\/\/opencoder.net\/WayneDavison.key\n$ gpg2 --import .\/WayneDavison.key\n$ gpg2 --verify .\/rsync-3.2.0.tar.gz.asc\n$ tar tvzf .\/rsync-3.2.0.tar.gz\n$ tar xzf .\/rsync-3.2.0.tar.gz\n$ cd rsync-3.2.0\n$ .\/configure --help\n$ .\/configure\n$ make\n$ .\/rsync --version\nrsync  version 3.2.0  protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http:\/\/rsync.samba.org\/\nCapabilities:\n    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n    ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n    xxh64 (xxhash) md5 md4 none\nCompress list:\n    zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\nare welcome to redistribute it under certain conditions.  See the GNU\nGeneral Public Licence for details.<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"admonitionblock note\">\n<table  class=\" table table-hover\" >\n<tbody>\n<tr>\n<td class=\"icon\">\n<div class=\"title\">Note<\/div>\n<\/td>\n<td class=\"content\">\ngpg\u9375\u306f\u6b21\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\uff0e<a href=\"https:\/\/rsync.samba.org\/download.html\">rsync download<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_raspberri_pi_os_amd64\">Raspberri Pi OS amd64<\/h3>\n<div class=\"paragraph\">\n<p>Raspberry Pi OS arm64\u306e\u5834\u5408 <code>libzstd-dev<\/code> \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c <code>1.3.8+dfsg-3<\/code> \u3068\u5c11\u3057\u53e4\u304fbuild\u306b\u5931\u6557\u3057\u307e\u3059\uff0e <code>.\/configure --disable-zstd<\/code> \u3068\u3057\u3066zstd\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\uff0csource\u304b\u3089 <code>zstd 1.4.5<\/code> \u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067build\u51fa\u6765\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ make\n  :\ntoken.c: In function \u2018init_compression_level\u2019:\ntoken.c:73:40: warning: implicit declaration of function \u2018ZSTD_minCLevel\u2019; did you mean \u2018ZSTD_maxCLevel\u2019? [-Wimplicit-function-declaration]\n   min_level = skip_compression_level = ZSTD_minCLevel();\n                                        ^~~~~~~~~~~~~~\n                                        ZSTD_maxCLevel\ntoken.c: In function \u2018send_zstd_token\u2019:\ntoken.c:685:2: error: unknown type name \u2018ZSTD_EndDirective\u2019; did you mean \u2018ZSTD_DDict\u2019?\n  ZSTD_EndDirective flush = ZSTD_e_continue;\n  ^~~~~~~~~~~~~~~~~\n  ZSTD_DDict\ntoken.c:685:28: error: \u2018ZSTD_e_continue\u2019 undeclared (first use in this function)\n  ZSTD_EndDirective flush = ZSTD_e_continue;\n                            ^~~~~~~~~~~~~~~\ntoken.c:685:28: note: each undeclared identifier is reported only once for each function it appears in\ntoken.c:701:3: warning: implicit declaration of function \u2018ZSTD_CCtx_setParameter\u2019 [-Wimplicit-function-declaration]\n   ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n   ^~~~~~~~~~~~~~~~~~~~~~\ntoken.c:701:37: error: \u2018ZSTD_c_compressionLevel\u2019 undeclared (first use in this function); did you mean \u2018skip_compression_level\u2019?\n   ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level);\n                                     ^~~~~~~~~~~~~~~~~~~~~~~\n                                     skip_compression_level\ntoken.c:751:13: error: \u2018ZSTD_e_flush\u2019 undeclared (first use in this function); did you mean \u2018ZSTD_DCtx_s\u2019?\n     flush = ZSTD_e_flush;\n             ^~~~~~~~~~~~\n             ZSTD_DCtx_s\ntoken.c:753:8: warning: implicit declaration of function \u2018ZSTD_compressStream2\u2019; did you mean \u2018ZSTD_compressStream\u2019? [-Wimplicit-function-declaration]\n    r = ZSTD_compressStream2(zstd_cctx, &amp;zstd_out_buff, &amp;zstd_in_buff, flush);\n        ^~~~~~~~~~~~~~~~~~~~\n        ZSTD_compressStream\n$ cd ..\n$ sudo apt remove libzstd-dev\n$ wget https:\/\/github.com\/facebook\/zstd\/releases\/download\/v1.4.5\/zstd-1.4.5.tar.gz \\\nhttps:\/\/github.com\/facebook\/zstd\/releases\/download\/v1.4.5\/zstd-1.4.5.tar.gz.sha256\n$ sha256sum -c .\/zstd-1.4.5.tar.gz.sha256\n$ tar tvf .\/zstd-1.4.5.tar.gz | lv\n$ tar xf .\/zstd-1.4.5.tar.gz\n$ cd zstd-1.4.5\n$ make\n$ sudo make install\n$ cd ..\/rsync-3.2.0\n$ .\/configure &amp;&amp; make<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_debian_sid_amd64\">Debian sid amd64<\/h3>\n<div class=\"paragraph\">\n<p>Debian sid amd64 \u74b0\u5883\u306b\u306f\u3059\u3067\u306b\u964d\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089\u5c0e\u5165\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sudo apt install rsync\n$ rsync --version\nrsync  version 3.2.0  protocol version 31\nCopyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.\nWeb site: http:\/\/rsync.samba.org\/\nCapabilities:\n    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,\n    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append,\n    ACLs, xattrs, iconv, symtimes, prealloc, SIMD\nChecksum list:\n    xxh64 (xxhash) md5 md4 none\nCompress list:\n    zstd lz4 zlibx zlib none\n\nrsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\nare welcome to redistribute it under certain conditions.  See the GNU\nGeneral Public Licence for details.\n$ dpkg-query -W rsync\nrsync   3.2.0-1<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3063\u3066\u3053\u3068\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0eNEWS\u3092\u898b\u3066\u307f\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/download.samba.org\/pub\/rsync\/src\/rsync-3.2.0-NEWS\">NEWS<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_bug_fix\">BUG FIX<\/h2>\n<div class=\"sectionbody\">\n<div class=\"quoteblock\">\n<blockquote>\n<div class=\"paragraph\">\n<p>Avoid a hang when an overabundance of messages clogs up all the I\/O buffers.<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u30d0\u30b0\u4fee\u6b63\u304c\u3061\u3087\u3063\u3068\u6c17\u306b\u306a\u308a\u307e\u3059\uff0efat32\u306e\u5236\u9650\u306b\u5f15\u3063\u304b\u304b\u3063\u305f\u3068\u304d\u306b\u5e30\u3063\u3066\u3053\u306a\u3044\u554f\u984c\u3082\u3053\u308c\u3067\u89e3\u6c7a\u3057\u3066\u308b\u304b\u3082?\u672a\u78ba\u8a8d\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/matoken.org\/blog\/2020\/04\/11\/notes-on-fat32-when-recovering-hdd-data\/\">HDD\u30c7\u30fc\u30bf\u5fa9\u65e7\u6642\u306bFAT32\u306e\u5236\u9650\u306b\u5d4c\u3063\u305f\u30e1\u30e2 \u2013 matoken\u2019s meme<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_enhancements\">ENHANCEMENTS<\/h2>\n<div class=\"sectionbody\">\n<div class=\"sect2\">\n<h3 id=\"_checksum_choicestr_ccstr\">&#8211;checksum-choice=STR, &#8211;cc=STR<\/h3>\n<div class=\"paragraph\">\n<p>\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u5f62\u5f0f\u3092\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e\u73fe\u5728\u9078\u629e\u3067\u304d\u308b\u306e\u306f <code>xxh64\/md5\/md4<\/code> \u306e3\u7a2e\u985e or <code>none<\/code> or <code>auto<\/code>(\u65e2\u5b9a\u5024)<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">man(1)\u3088\u308a<\/div>\n<div class=\"content\">\n<pre>              o      auto (the default)\n              o      xxh64 (aka xxhash)\n              o      md5\n              o      md4\n              o      none<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p><code>--version<\/code> \u306b\u3082\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ rsync --version | grep Checksum -A1\nChecksum list:\n    xxh64 (xxhash) md5 md4 none<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>configure option \u306b <code>--disable-xxhash<\/code> \u304c\u3042\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>  --disable-xxhash        disable xxhash checksums<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u74b0\u5883\u5909\u6570 <code>RSYNC_CHECKSUM_LIST<\/code> \u3067\u3082\u6307\u5b9a\u3067\u304d\u307e\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3 <code>--checksum-choice<\/code> \u304c\u3042\u308b\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307b\u3046\u304c\u512a\u5148\u306a\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3061\u306a\u307f\u306b <code>--checksum-choice<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044 <code>3.1.3<\/code> \u306b\u5bfe\u3057\u3066 <code>xxh64<\/code> \u3092\u5411\u3051\u3066\u53e9\u3044\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\uff0e(<code>md4<\/code>, <code>md5<\/code> \u306fok)<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ rsync --checksum-choice=xxh64 -avc .\/* user@remote:\/tmp\/\nunknown checksum name: xxh64\nrsync error: requested action not supported (code 4) at checksum.c(73) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6642\u9593\u304c\u3069\u306e\u304f\u3089\u3044\u5909\u308f\u308b\u304b\u3061\u3087\u3046\u3069\u8ee2\u304c\u3063\u3066\u3044\u305fkernel source(\u5c0f\u3055\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u6ca2\u5c71)\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u306f\u3058\u3081\u666e\u901a\u306b\u540c\u671f\u3057\u305f\u5f8c\uff0c\u30ad\u30e3\u30c3\u30b7\u30e5\u30af\u30ea\u30a2\u3057\u3066 <code>md4<\/code>, <code>md5<\/code>, <code>xxh64<\/code> \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u601d\u3063\u305f\u3088\u308a\u5dee\u304c\u51fa\u306a\u3044\u611f\u3058?<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">md4<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ find .\/linux-5.6 | wc -l\n82114\n$ du -ms .\/linux-5.6\n1310    .\/linux-5.6\n$ rsync --checksum-choice=auto -ac .\/linux-5.6 \/tmp\/\n$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=md4 -ac .\/linux-5.6 \/tmp\/\n3\n\nreal    0m52.393s\nuser    0m5.051s\nsys     0m12.246s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">md5<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=md5 -ac .\/linux-5.6 \/tmp\/\n3\n\nreal    0m57.716s\nuser    0m6.976s\nsys     0m13.486s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">xxh64<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=xxh64 -ac .\/linux-5.6 \/tmp\/\n3\n\nreal    1m5.520s\nuser    0m2.507s\nsys     0m13.625s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5927\u304d\u3081\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e4GB\u7a0b\u306eiso\u30d5\u30a1\u30a4\u30eb1\u3064\u3067\u3059\uff0e<code>md4<\/code>, <code>md5<\/code> \u306f\u3042\u307e\u308a\u4ee3\u308f\u308a\u307e\u305b\u3093\u304c\uff0c<code>xxh64<\/code> \u306f\u304b\u306a\u308a\u9ad8\u901f\u3067\u3059\u306d\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">md4<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ls -s .\/Parrot-security-4.9.1_x64.iso*\n3909164 .\/Parrot-security-4.9.1_x64.iso  3909164 .\/Parrot-security-4.9.1_x64.iso2\n$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=md4 -ac .\/Parrot-security-4.9.1_x64.iso .\/Parrot-security-4.9.1_x\n64.iso2\n3\n\nreal    0m23.276s\nuser    0m10.601s\nsys     0m4.387s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">md5<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=md5 -ac .\/Parrot-security-4.9.1_x64.iso .\/Parrot-security-4.9.1_x64.iso2\n3\n\nreal    0m28.150s\nuser    0m16.945s\nsys     0m4.399s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">xxh64<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sync ; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches ; time rsync --checksum-choice=xxh64 -ac .\/Parrot-security-4.9.1_x64.iso .\/Parrot-security-4.9.1_x64.iso2\n3\n\nreal    0m12.767s\nuser    0m1.375s\nsys     0m4.060s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u8fba\u306e\u901f\u5ea6\u306f\u74b0\u5883\u306b\u3088\u308a\u5927\u5206\u5909\u308f\u308b\u3068\u601d\u3046\u306e\u3067\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_compress_choicestr_zcstr\">&#8211;compress-choice=STR, &#8211;zc=STR<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p><code>--compress<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u5229\u7528\u6642\u306e\u5727\u7e2e\u5f62\u5f0f\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u5727\u7e2e\u5f62\u5f0f\u306frsync 3.2.0 \u540c\u58eb\u3067\u306f <code>zlibx<\/code> \u5f62\u5f0f\u304c <code>zlib<\/code> \u5f62\u5f0f\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e<br \/>\n\u9078\u629e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f <code>zstd, lz4, zlibx, zlib, none<\/code> \u306e\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">man(1)\u3088\u308a<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>              o      zstd\n              o      lz4\n              o      zlibx\n              o      zlib\n              o      none<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p><code>rsync --version<\/code> \u3067\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ rsync --version | grep Compress -A1\nCompress list:\n    zstd lz4 zlibx zlib none<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>configure oprion \u306b <code>--disable-zstd<\/code>, <code>--disable-lz4<\/code> \u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>  --disable-zstd          disable zstd compression\n  --disable-lz4           disable LZ4 compression<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u74b0\u5883\u5909\u6570 <code>RSYNC_COMPRESS_LIST<\/code> \u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u672a\u5bfe\u5fdc\u306e 3.1.3 \u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3068 <code>unknown option<\/code> \u3068\u8a00\u308f\u308c\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ time rsync --compress-choice=zstd --compress -a .\/hoge mk@x201i.local:\/tmp\/\nrsync: on remote machine: --compress-choice=zstd: unknown option\nrsync error: syntax or usage error (code 1) at main.c(1596) [server=3.1.3]\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.2.0]<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u3061\u3089\u3082\u7c21\u5358\u306b\u30d9\u30f3\u30c1\u3092\uff0e\u3067\u3082Wi-Fi\u74b0\u5883\u3060\u3057\u53c2\u8003\u7a0b\u5ea6\u306b\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">zstd<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ssh user@remote rm -rf ~\/tmp\/linux-5.6; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches; time rsync --compress-choice=zstd --compress -a --rsync-path=~\/src\/rsync-3.2.0\/rsync ~\/src\/linux-5.6 user@remote:~\/tmp\/\n3\n\nreal    4m38.921s\nuser    0m24.463s\nsys     0m7.182s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">lz4<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ssh user@remote rm -rf ~user\/tmp\/linux-5.6; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches; time rsync --compress-choice=lz4 --compress -a --rsync-path=~\/src\/rsync-3.2.0\/rsync ~\/src\/linux-5.6 user@remote:~\/tmp\/\n3\n\nreal    9m28.829s\nuser    0m4.878s\nsys     0m6.177s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">zlibx<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ssh user@remote rm -rf ~user\/tmp\/linux-5.6; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches; time rsync --compress-choice=zlibx --compress -a --rsync-path=~\/src\/rsync-3.2.0\/rsync ~\/src\/linux-5.6 user@remote:~\/tmp\/\n3\n\nreal    5m21.702s\nuser    0m46.740s\nsys     0m6.541s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">zlib<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ssh user@remote rm -rf ~user\/tmp\/linux-5.6; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches; time rsync --compress-choice=zlib --compress -a --rsync-path=~\/src\/rsync-3.2.0\/rsync ~\/src\/linux-5.6 user@remote:~\/tmp\/\n3\n\nreal    5m28.722s\nuser    0m45.861s\nsys     0m6.381s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">none<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ssh user@remote rm -rf ~user\/tmp\/linux-5.6; echo 3 | sudo tee \/proc\/sys\/vm\/drop_caches; time rsync --compress-choice=none -a --rsync-path=~\/src\/rsync-3.2.0\/rsync ~\/src\/linux-5.6 user@remote:~\/tmp\/\n3\n\nreal    22m56.712s\nuser    0m1.848s\nsys     0m7.323s<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_debugnstr\">&#8211;debug=NSTR<\/h3>\n<div class=\"paragraph\">\n<p>\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3068\u5727\u7e2e\u306e\u8a73\u7d30\u3092\u8868\u793a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u3088\u3046\u3067\u3059\uff0e\u3069\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u304b\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">&#8211;debug=NSTR \u3092\u4ed8\u3051\u305f\u3068\u304d\u306e\u306e\u5b9f\u884c\u7d50\u679c\u4f8b<\/div>\n<div class=\"content\">\n<pre>Client negotiated checksum: xxh64\nClient compress: zstd (level 3)<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_debugopts_mdebugopts\">&#8211;debug=OPTS, -M\u2014\u200bdebug=OPTS<\/h3>\n<div class=\"paragraph\">\n<p><code>--debug=OPTS<\/code> \u3092\u4f7f\u3046\u3068\u30ea\u30e2\u30fc\u30c8\u306ersync\u306b\u30c7\u30d0\u30c3\u30b0\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u3089\u306a\u304f\u306a\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u308c\u306b\u3088\u308a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3068\u30b5\u30fc\u30d0\u5074\u3067\u7570\u306a\u308b\u30c7\u30d0\u30c3\u30b0\u30ec\u30d9\u30eb\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305d\u3046\u3067\u3059\uff0e<br \/>\n\u30ea\u30e2\u30fc\u30c8\u5074\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u308b\u5834\u5408\u306b\u306f <code>-M\u2014\u200bdebug=OPTS<\/code><\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_siginfo_sigvtalrm\">SIGINFO &amp; SIGVTALRM<\/h3>\n<div class=\"paragraph\">\n<p>rsync\u30d7\u30ed\u30bb\u30b9\u306b <code>SIGINFO<\/code> &amp; <code>SIGVTALRM<\/code> \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0eLinux\u306f <code>SIGINFO<\/code> \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c <code>SIGVTALRM<\/code> \u3092\u8a66\u3057\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">rsync\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u72b6\u614b\u3067 <code>SIGVTALRM<\/code> \u3092\u9001\u4fe1<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ pkill -SIGVTALRM rsync<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">rsync\u304c\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>linux-5.6\/arch\/sparc\/lib\/lshrdi3.S\n    114,384,392  81%  931.12kB\/s    0:01:59 (xfr#21058, ir-chk=1030\/23451)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_copy_asusergroup\">&#8211;copy-as=USER[:GROUP]<\/h3>\n<div class=\"paragraph\">\n<p>\u6307\u5b9a\u30e6\u30fc\u30b6\/\u30b0\u30eb\u30fc\u30d7\u6a29\u9650\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">\u30b3\u30d4\u30fc\u5143\u306b3\u30e6\u30fc\u30b6\u306e\u30d5\u30a1\u30a4\u30eb<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ ls -Al \/tmp\/rsync-test\/\ntotal 0\n-rw-r--r-- 1 matoken  matoken  0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root     root     0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">\u666e\u901a\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e6\u30fc\u30b6\u304c\u5f15\u304d\u7d99\u304c\u308c\u308b<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sudo .\/rsync -a \/tmp\/rsync-test\/ \/tmp\/rsync-test2\n$ ls -lA \/tmp\/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken  matoken  0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 root     root     0 Jun 25 18:51 root\n-rw-r--r-- 1 www-data www-data 0 Jun 25 18:51 www-data<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\"><code>--copy-as=matoken<\/code> \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066matoken\u306b\u306a\u308b<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ sudo \\rm -rf \/tmp\/rsync-test2\n$ sudo .\/rsync --copy-as=matoken -a \/tmp\/rsync-test\/ \/tmp\/rsync-test2\n$ ls -lA \/tmp\/rsync-test2\ntotal 0\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:50 matokenfile\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 root\n-rw-r--r-- 1 matoken matoken 0 Jun 25 18:51 www-data<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_v\">-V<\/h3>\n<div class=\"paragraph\">\n<p><code>--version<\/code> \u306e\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066 <code>-V<\/code> \u304c\u5165\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ .\/rsync --help|grep -- -V\n--version, -V            print the version + other info and exit\n$ .\/rsync --help|grep \\-V\ngrep (GNU grep) 3.4\nCopyright (C) 2020 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later &lt;https:\/\/gnu.org\/licenses\/gpl.html&gt;.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nWritten by Mike Haertel and others; see\n&lt;https:\/\/git.sv.gnu.org\/cgit\/grep.git\/tree\/AUTHORS&gt;.<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_ipv4_4_ipv6_6\">&#8211;ipv4, -4 \/ &#8211;ipv6, -6<\/h3>\n<div class=\"paragraph\">\n<p>ipv4, ipv6 \u3092\u6307\u5b9a\u3057\u305f\u3044\u3068\u304d\u306b <code>rsh='ssh -4'<\/code> \u3068\u3059\u308b\u3088\u308a\u4fbf\u5229\u306a <code>--ipv4<\/code>, <code>-4<\/code>, <code>--ipv6<\/code>, <code>-6<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5165\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock shell\">\n<div class=\"title\">ipv4\u3057\u304b\u306a\u3044\u74b0\u5883\u3067 <code>-6<\/code> \u3092\u6307\u5b9a\u3057\u3066\u5931\u6557\u3059\u308b<\/div>\n<div class=\"content\">\n<pre class=\"highlight\"><code>$ rsync -avc6 .\/ user@remote:\/tmp\/\nssh: Could not resolve hostname remote: Name or service not known\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(235) [sender=3.2.1]<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30d5\u30a1\u30a4\u30eb\u540c\u671f\u306b\u3068\u3066\u3082\u4fbf\u5229\u306arsync\u306e3.2.0\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e rsync \u30d0\u30b0\u30d5\u30a3\u30af\u30b9\u3084\uff0c\u3044\u304f\u3064\u304b\u306e\u65b0\u6a5f\u80fd\u304c\u5165\u3063\u305f\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e \u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e \u203b2.  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[547,7,517,6,546,199,63],"tags":[119],"class_list":["post-2834","post","type-post","status-publish","format-standard","hentry","category-buster-raspberry-pi-os","category-debian-linux","category-focal-fossa20-04","category-linux","category-raspberry-pi-os","category-sid","category-ubuntu","tag-rsync"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2834"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2834\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}