{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/rsync/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/rsync/", "feed_url": "https://matoken.org/blog/tag/rsync/feed/json/", "language": "ja", "title": "rsync – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=2834", "url": "https://matoken.org/blog/2020/07/17/a-little-experiment-with-the-new-features-of-rsync-3-2-0/", "title": "rsync 3.2.0\u306e\u65b0\u6a5f\u80fd\u3092\u5c11\u3057\u8a66\u3059", "content_html": "
\n
\n
\n

\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

\n
\n
\n\n
\n
\n

\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

\n
\n
\n

\u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e
\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

\n
\"rsync

\n

View more on edocr

\n
\n
\n
\n
\n
\n

\u5c0e\u5165\u4f8b

\n
\n
\n

Debian sid amd64 & Ubuntu 20.04 LTS amd64

\n
\n
\n
$ 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.
\n
\n
\n
\n\n\n\n\n\n\n\n
\n
Note
\n
\ngpg\u9375\u306f\u6b21\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\uff0ersync download
\n
\n
\n
\n

Raspberri Pi OS amd64

\n
\n

Raspberry Pi OS arm64\u306e\u5834\u5408 libzstd-dev \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 1.3.8+dfsg-3 \u3068\u5c11\u3057\u53e4\u304fbuild\u306b\u5931\u6557\u3057\u307e\u3059\uff0e ./configure --disable-zstd \u3068\u3057\u3066zstd\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\uff0csource\u304b\u3089 zstd 1.4.5 \u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067build\u51fa\u6765\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ 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, &zstd_out_buff, &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 && make
\n
\n
\n
\n
\n

Debian sid amd64

\n
\n

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

\n
\n
\n
\n
$ 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
\n
\n
\n
\n

\u3063\u3066\u3053\u3068\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0eNEWS\u3092\u898b\u3066\u307f\u307e\u3059\uff0e

\n
\n
\n\n
\n
\n
\n
\n
\n

BUG FIX

\n
\n
\n
\n
\n

Avoid a hang when an overabundance of messages clogs up all the I/O buffers.

\n
\n
\n
\n
\n

\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

\n
\n\n
\n
\n
\n

ENHANCEMENTS

\n
\n
\n

–checksum-choice=STR, –cc=STR

\n
\n

\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 xxh64/md5/md4 \u306e3\u7a2e\u985e or none or auto(\u65e2\u5b9a\u5024)

\n
\n
\n
man(1)\u3088\u308a
\n
\n
              o      auto (the default)\n              o      xxh64 (aka xxhash)\n              o      md5\n              o      md4\n              o      none
\n
\n
\n
\n

--version \u306b\u3082\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ rsync --version | grep Checksum -A1\nChecksum list:\n    xxh64 (xxhash) md5 md4 none
\n
\n
\n
\n

configure option \u306b --disable-xxhash \u304c\u3042\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
  --disable-xxhash        disable xxhash checksums
\n
\n
\n
\n

\u74b0\u5883\u5909\u6570 RSYNC_CHECKSUM_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u307e\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3 --checksum-choice \u304c\u3042\u308b\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307b\u3046\u304c\u512a\u5148\u306a\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u3061\u306a\u307f\u306b --checksum-choice \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044 3.1.3 \u306b\u5bfe\u3057\u3066 xxh64 \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(md4, md5 \u306fok)

\n
\n
\n
\n
$ 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]
\n
\n
\n
\n

\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 md4, md5, xxh64 \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u601d\u3063\u305f\u3088\u308a\u5dee\u304c\u51fa\u306a\u3044\u611f\u3058?

\n
\n
\n
md4
\n
\n
$ 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
\n
\n
\n
\n
md5
\n
\n
$ 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
\n
\n
\n
\n
xxh64
\n
\n
$ 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
\n
\n
\n
\n

\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\uff0emd4, md5 \u306f\u3042\u307e\u308a\u4ee3\u308f\u308a\u307e\u305b\u3093\u304c\uff0cxxh64 \u306f\u304b\u306a\u308a\u9ad8\u901f\u3067\u3059\u306d\uff0e

\n
\n
\n
md4
\n
\n
$ 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
\n
\n
\n
\n
md5
\n
\n
$ 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
\n
\n
\n
\n
xxh64
\n
\n
$ 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
\n
\n
\n
\n

\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

\n
\n
\n
\n
\n
\n

–compress-choice=STR, –zc=STR

\n
\n
\n

--compress \u30aa\u30d7\u30b7\u30e7\u30f3\u5229\u7528\u6642\u306e\u5727\u7e2e\u5f62\u5f0f\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u5727\u7e2e\u5f62\u5f0f\u306frsync 3.2.0 \u540c\u58eb\u3067\u306f zlibx \u5f62\u5f0f\u304c zlib \u5f62\u5f0f\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e
\n\u9078\u629e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f zstd, lz4, zlibx, zlib, none \u306e\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n
man(1)\u3088\u308a
\n
\n
              o      zstd\n              o      lz4\n              o      zlibx\n              o      zlib\n              o      none
\n
\n
\n
\n

rsync --version \u3067\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ rsync --version | grep Compress -A1\nCompress list:\n    zstd lz4 zlibx zlib none
\n
\n
\n
\n

configure oprion \u306b --disable-zstd, --disable-lz4 \u304c\u3042\u308a\u307e\u3059\uff0e

\n
\n
\n
\n
  --disable-zstd          disable zstd compression\n  --disable-lz4           disable LZ4 compression
\n
\n
\n
\n

\u74b0\u5883\u5909\u6570 RSYNC_COMPRESS_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u672a\u5bfe\u5fdc\u306e 3.1.3 \u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3068 unknown option \u3068\u8a00\u308f\u308c\u307e\u3059\uff0e

\n
\n
\n
\n
$ 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]
\n
\n
\n
\n

\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

\n
\n
\n
zstd
\n
\n
$ 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
\n
\n
\n
\n
lz4
\n
\n
$ 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
\n
\n
\n
\n
zlibx
\n
\n
$ 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
\n
\n
\n
\n
zlib
\n
\n
$ 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
\n
\n
\n
\n
none
\n
\n
$ 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
\n
\n
\n
\n

–debug=NSTR

\n
\n

\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

\n
\n
\n
–debug=NSTR \u3092\u4ed8\u3051\u305f\u3068\u304d\u306e\u306e\u5b9f\u884c\u7d50\u679c\u4f8b
\n
\n
Client negotiated checksum: xxh64\nClient compress: zstd (level 3)
\n
\n
\n
\n
\n

–debug=OPTS, -M\u2014\u200bdebug=OPTS

\n
\n

--debug=OPTS \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
\n\u30ea\u30e2\u30fc\u30c8\u5074\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u308b\u5834\u5408\u306b\u306f -M\u2014\u200bdebug=OPTS

\n
\n
\n
\n

SIGINFO & SIGVTALRM

\n
\n

rsync\u30d7\u30ed\u30bb\u30b9\u306b SIGINFO & SIGVTALRM \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 SIGINFO \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c SIGVTALRM \u3092\u8a66\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n
rsync\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u72b6\u614b\u3067 SIGVTALRM \u3092\u9001\u4fe1
\n
\n
$ pkill -SIGVTALRM rsync
\n
\n
\n
\n
rsync\u304c\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a
\n
\n
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)
\n
\n
\n
\n
\n

–copy-as=USER[:GROUP]

\n
\n

\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

\n
\n
\n
\u30b3\u30d4\u30fc\u5143\u306b3\u30e6\u30fc\u30b6\u306e\u30d5\u30a1\u30a4\u30eb
\n
\n
$ 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
\n
\n
\n
\n
\u666e\u901a\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e6\u30fc\u30b6\u304c\u5f15\u304d\u7d99\u304c\u308c\u308b
\n
\n
$ 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
\n
\n
\n
\n
--copy-as=matoken \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066matoken\u306b\u306a\u308b
\n
\n
$ 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
\n
\n
\n
\n
\n

-V

\n
\n

--version \u306e\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066 -V \u304c\u5165\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
$ ./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 <https://gnu.org/licenses/gpl.html>.\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<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
\n
\n
\n
\n
\n

–ipv4, -4 / –ipv6, -6

\n
\n

ipv4, ipv6 \u3092\u6307\u5b9a\u3057\u305f\u3044\u3068\u304d\u306b rsh='ssh -4' \u3068\u3059\u308b\u3088\u308a\u4fbf\u5229\u306a --ipv4, -4, --ipv6, -6 \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5165\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
ipv4\u3057\u304b\u306a\u3044\u74b0\u5883\u3067 -6 \u3092\u6307\u5b9a\u3057\u3066\u5931\u6557\u3059\u308b
\n
\n
$ 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]
\n
\n
\n
\n
\n
\n", "content_text": "\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\n\n\n\nrsync\n\n\n\n\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\n\n\n\u203b1. \u3053\u306e\u8a18\u4e8b\u6295\u7a3f\u6642\u306b\u306f 3.2.2 \u304c\u51fa\u3066\u3044\u307e\u3059\uff0e\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\n\nView more on edocr\n\n\n\n\n\n\u5c0e\u5165\u4f8b\n\n\nDebian sid amd64 & Ubuntu 20.04 LTS amd64\n\n\n$ 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.\n\n\n\n\n\n\n\nNote\n\n\ngpg\u9375\u306f\u6b21\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\uff0ersync download\n\n\n\n\n\n\nRaspberri Pi OS amd64\n\nRaspberry Pi OS arm64\u306e\u5834\u5408 libzstd-dev \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 1.3.8+dfsg-3 \u3068\u5c11\u3057\u53e4\u304fbuild\u306b\u5931\u6557\u3057\u307e\u3059\uff0e ./configure --disable-zstd \u3068\u3057\u3066zstd\u3092\u7121\u52b9\u306b\u3059\u308b\u304b\uff0csource\u304b\u3089 zstd 1.4.5 \u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067build\u51fa\u6765\u307e\u3057\u305f\uff0e\n\n\n\n$ 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, &zstd_out_buff, &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 && make\n\n\n\n\nDebian sid amd64\n\nDebian 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\n\n\n\n$ 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\n\n\n\n\u3063\u3066\u3053\u3068\u3067\u8a66\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0eNEWS\u3092\u898b\u3066\u307f\u307e\u3059\uff0e\n\n\n\nNEWS\n\n\n\n\n\n\nBUG FIX\n\n\n\n\nAvoid a hang when an overabundance of messages clogs up all the I/O buffers.\n\n\n\n\n\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\n\n\n\nHDD\u30c7\u30fc\u30bf\u5fa9\u65e7\u6642\u306bFAT32\u306e\u5236\u9650\u306b\u5d4c\u3063\u305f\u30e1\u30e2 \u2013 matoken\u2019s meme\n\n\n\n\n\nENHANCEMENTS\n\n\n–checksum-choice=STR, –cc=STR\n\n\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 xxh64/md5/md4 \u306e3\u7a2e\u985e or none or auto(\u65e2\u5b9a\u5024)\n\n\nman(1)\u3088\u308a\n\n o auto (the default)\n o xxh64 (aka xxhash)\n o md5\n o md4\n o none\n\n\n\n--version \u306b\u3082\u51fa\u529b\u3055\u308c\u307e\u3059\uff0e\n\n\n\n$ rsync --version | grep Checksum -A1\nChecksum list:\n xxh64 (xxhash) md5 md4 none\n\n\n\nconfigure option \u306b --disable-xxhash \u304c\u3042\u308a\u307e\u3057\u305f\uff0e\n\n\n\n --disable-xxhash disable xxhash checksums\n\n\n\n\u74b0\u5883\u5909\u6570 RSYNC_CHECKSUM_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u307e\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3 --checksum-choice \u304c\u3042\u308b\u5834\u5408\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307b\u3046\u304c\u512a\u5148\u306a\u3088\u3046\u3067\u3059\uff0e\n\n\n\u3061\u306a\u307f\u306b --checksum-choice \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044 3.1.3 \u306b\u5bfe\u3057\u3066 xxh64 \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(md4, md5 \u306fok)\n\n\n\n$ 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]\n\n\n\n\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 md4, md5, xxh64 \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u601d\u3063\u305f\u3088\u308a\u5dee\u304c\u51fa\u306a\u3044\u611f\u3058?\n\n\nmd4\n\n$ 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\n\n\n\nmd5\n\n$ 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\n\n\n\nxxh64\n\n$ 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\n\n\n\n\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\uff0emd4, md5 \u306f\u3042\u307e\u308a\u4ee3\u308f\u308a\u307e\u305b\u3093\u304c\uff0cxxh64 \u306f\u304b\u306a\u308a\u9ad8\u901f\u3067\u3059\u306d\uff0e\n\n\nmd4\n\n$ 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\n\n\n\nmd5\n\n$ 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\n\n\n\nxxh64\n\n$ 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\n\n\n\n\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\n\n\n\n\n\n–compress-choice=STR, –zc=STR\n\n\n--compress \u30aa\u30d7\u30b7\u30e7\u30f3\u5229\u7528\u6642\u306e\u5727\u7e2e\u5f62\u5f0f\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u5727\u7e2e\u5f62\u5f0f\u306frsync 3.2.0 \u540c\u58eb\u3067\u306f zlibx \u5f62\u5f0f\u304c zlib \u5f62\u5f0f\u3088\u308a\u3082\u512a\u5148\u3055\u308c\u308b\u3088\u3046\u3067\u3059\uff0e\n\u9078\u629e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f zstd, lz4, zlibx, zlib, none \u306e\u3088\u3046\u3067\u3059\uff0e\n\n\nman(1)\u3088\u308a\n\n o zstd\n o lz4\n o zlibx\n o zlib\n o none\n\n\n\nrsync --version \u3067\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e\n\n\n\n$ rsync --version | grep Compress -A1\nCompress list:\n zstd lz4 zlibx zlib none\n\n\n\nconfigure oprion \u306b --disable-zstd, --disable-lz4 \u304c\u3042\u308a\u307e\u3059\uff0e\n\n\n\n --disable-zstd disable zstd compression\n --disable-lz4 disable LZ4 compression\n\n\n\n\u74b0\u5883\u5909\u6570 RSYNC_COMPRESS_LIST \u3067\u3082\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\u672a\u5bfe\u5fdc\u306e 3.1.3 \u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3068 unknown option \u3068\u8a00\u308f\u308c\u307e\u3059\uff0e\n\n\n\n$ 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]\n\n\n\n\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\n\n\nzstd\n\n$ 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\n\n\n\nlz4\n\n$ 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\n\n\n\nzlibx\n\n$ 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\n\n\n\nzlib\n\n$ 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\n\n\n\nnone\n\n$ 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\n\n\n\n–debug=NSTR\n\n\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\n\n\n–debug=NSTR \u3092\u4ed8\u3051\u305f\u3068\u304d\u306e\u306e\u5b9f\u884c\u7d50\u679c\u4f8b\n\nClient negotiated checksum: xxh64\nClient compress: zstd (level 3)\n\n\n\n\n–debug=OPTS, -M\u2014\u200bdebug=OPTS\n\n--debug=OPTS \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\n\u30ea\u30e2\u30fc\u30c8\u5074\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9001\u308b\u5834\u5408\u306b\u306f -M\u2014\u200bdebug=OPTS\n\n\n\nSIGINFO & SIGVTALRM\n\nrsync\u30d7\u30ed\u30bb\u30b9\u306b SIGINFO & SIGVTALRM \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 SIGINFO \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c SIGVTALRM \u3092\u8a66\u3057\u307e\u3057\u305f\uff0e\n\n\nrsync\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u72b6\u614b\u3067 SIGVTALRM \u3092\u9001\u4fe1\n\n$ pkill -SIGVTALRM rsync\n\n\n\nrsync\u304c\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8868\u793a\n\nlinux-5.6/arch/sparc/lib/lshrdi3.S\n 114,384,392 81% 931.12kB/s 0:01:59 (xfr#21058, ir-chk=1030/23451)\n\n\n\n\n–copy-as=USER[:GROUP]\n\n\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\n\n\n\u30b3\u30d4\u30fc\u5143\u306b3\u30e6\u30fc\u30b6\u306e\u30d5\u30a1\u30a4\u30eb\n\n$ 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\n\n\n\n\u666e\u901a\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e6\u30fc\u30b6\u304c\u5f15\u304d\u7d99\u304c\u308c\u308b\n\n$ 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\n\n\n\n--copy-as=matoken \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066matoken\u306b\u306a\u308b\n\n$ 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\n\n\n\n\n-V\n\n--version \u306e\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066 -V \u304c\u5165\u308a\u307e\u3057\u305f\uff0e\n\n\n\n$ ./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 <https://gnu.org/licenses/gpl.html>.\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<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.\n\n\n\n\n–ipv4, -4 / –ipv6, -6\n\nipv4, ipv6 \u3092\u6307\u5b9a\u3057\u305f\u3044\u3068\u304d\u306b rsh='ssh -4' \u3068\u3059\u308b\u3088\u308a\u4fbf\u5229\u306a --ipv4, -4, --ipv6, -6 \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5165\u308a\u307e\u3057\u305f\uff0e\n\n\nipv4\u3057\u304b\u306a\u3044\u74b0\u5883\u3067 -6 \u3092\u6307\u5b9a\u3057\u3066\u5931\u6557\u3059\u308b\n\n$ 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]", "date_published": "2020-07-17T06:40:12+09:00", "date_modified": "2020-07-17T06:42:54+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "rsync", "Buster", "Debian", "Focal Fossa(20.04)", "Linux", "Raspberry Pi OS", "sid", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=2206", "url": "https://matoken.org/blog/2018/11/02/trouble-with-the-contents-of-the-file-synchronized-by-rsync/", "title": "rsync\u3067\u540c\u671f\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u304c\u9593\u9055\u3063\u3066\u3044\u3066\u56f0\u308b", "content_html": "
\n

\u6700\u8fd1\u5916\u306e\u30b5\u30fc\u30d0\u306effmpeg\u3067\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092rsync\u30b3\u30de\u30f3\u30c9\u3067\u5bb6\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\uff0c\u5148\u65e5rsync\u3067\u30b3\u30d4\u30fc\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u306b\u518d\u751f\u304c\u51fa\u6765\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u73fe\u308c\u307e\u3057\u305f\uff0e
\n\u6050\u3089\u304fffmpeg\u306e\u51e6\u7406\u304c\u6700\u5f8c\u307e\u3067\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3067rsync\u3092\u958b\u59cb\u3057\u3066\uff0cffmpeg\u306e -movflags faststart \u304c\u6700\u5f8c\u306e\u3042\u305f\u308a\u3067rsync\u3067\u8ee2\u9001\u304c\u7d42\u308f\u3063\u305f\u9818\u57df\u3092\u66f8\u304d\u63db\u3048\u305f\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\uff0e
\nrsync\u306f\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3092\u78ba\u8a8d\u3057\u3066\u3044\u305f\u306e\u3067\u306f?\u3068\u78ba\u8a8d\u3059\u308b\u3068\u3069\u3046\u3082\u660e\u793a\u7684\u306b\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3057\u306a\u3044\u3068\u7c21\u6613\u7684\u306a\u30c1\u30a7\u30c3\u30af\u3057\u304b\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\uff0e
\n\u5c11\u3057\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n

\u5185\u5bb9\u304c\u9055\u3046\u3051\u308c\u3069\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3068\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306e\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b\uff0e

\n
\n
\n
\n
$ mkdir from to\r\n$ echo '0123456789' > from/01\r\n$ echo '0123456780' > to/01\r\n$ touch -d0 from/01\r\n$ touch -d0 to/01\r\n$ ls -l from/01 to/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708  2 00:00 from/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708  2 00:00 to/01
\n
\n
\n
\n

rsync \u306e --archive option \u3067\u30b3\u30d4\u30fc\u3059\u308b\u3068\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u306a\u3044\uff0e\u5185\u5bb9\u3082\u7570\u306a\u3063\u305f\u307e\u307e\uff0e

\n
\n
\n
\n
$ rsync -av from/ to/\r\nsending incremental file list\r\n\r\nsent 73 bytes  received 12 bytes  170.00 bytes/sec\r\ntotal size is 11  speedup is 0.13\r\n$ diff from/01 to/01\r\n1c1\r\n< 0123456789\r\n---\r\n> 0123456780
\n
\n
\n
\n

rsync \u306e --checksum option\u3092\u4ed8\u4e0e\u3059\u308b\u3068\u5225\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u3066\u5185\u5bb9\u3082\u540c\u4e00\u306b\u306a\u308b\uff0e

\n
\n
\n
\n
$ rsync -av --checksum from/ to/\r\nsending incremental file list\r\n01\r\n\r\nsent 147 bytes  received 35 bytes  364.00 bytes/sec\r\ntotal size is 11  speedup is 0.06\r\n$ diff from/01 to/01
\n
\n
\n
\n

\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3093\u306a\u611f\u3058\u306b\u5909\u66f4\u3057\u305f\uff0e

\n
\n
\n
\n
$ rsync -avAHXce ssh --partial --append user@server:from/ to/
\n
\n
\n
\n

\uff03\u5b9f\u969b\u306f\u3088\u304f\u56de\u7dda\u5207\u308c\u308b\u306e\u3067while loop \u306b\u5165\u308c\u3066\u3042\u308b\uff0e

\n
\n
\n

EDIT: \u8ee2\u9001\u6e08\u307f\u90e8\u5206\u306e\u30c1\u30a7\u30c3\u30af\u306f\u3053\u308c\u3067\u306fNG\u3067 --append(\u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u8a18)\u3092\u524a\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\uff0e--append-verify \u3067\u884c\u3051\u305d\u3046\u306a\u6c17\u304c\u3057\u305f\u304c\u3053\u308c\u3082NG\u3060\u3063\u305f\uff0e

\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W rsync\r\nrsync   3.1.2-2.2\r\n$ lsb_release -d\r\nDescription:    Ubuntu 18.10\r\n$ uname -m\r\nx86_64
\n
\n
\n", "content_text": "\u6700\u8fd1\u5916\u306e\u30b5\u30fc\u30d0\u306effmpeg\u3067\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092rsync\u30b3\u30de\u30f3\u30c9\u3067\u5bb6\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\uff0c\u5148\u65e5rsync\u3067\u30b3\u30d4\u30fc\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u306b\u518d\u751f\u304c\u51fa\u6765\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u73fe\u308c\u307e\u3057\u305f\uff0e\n\u6050\u3089\u304fffmpeg\u306e\u51e6\u7406\u304c\u6700\u5f8c\u307e\u3067\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\u3067rsync\u3092\u958b\u59cb\u3057\u3066\uff0cffmpeg\u306e -movflags faststart \u304c\u6700\u5f8c\u306e\u3042\u305f\u308a\u3067rsync\u3067\u8ee2\u9001\u304c\u7d42\u308f\u3063\u305f\u9818\u57df\u3092\u66f8\u304d\u63db\u3048\u305f\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\uff0e\nrsync\u306f\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u3092\u78ba\u8a8d\u3057\u3066\u3044\u305f\u306e\u3067\u306f?\u3068\u78ba\u8a8d\u3059\u308b\u3068\u3069\u3046\u3082\u660e\u793a\u7684\u306b\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3057\u306a\u3044\u3068\u7c21\u6613\u7684\u306a\u30c1\u30a7\u30c3\u30af\u3057\u304b\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\uff0e\n\u5c11\u3057\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\u5185\u5bb9\u304c\u9055\u3046\u3051\u308c\u3069\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3068\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306e\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b\uff0e\n\n\n\n$ mkdir from to\r\n$ echo '0123456789' > from/01\r\n$ echo '0123456780' > to/01\r\n$ touch -d0 from/01\r\n$ touch -d0 to/01\r\n$ ls -l from/01 to/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708 2 00:00 from/01\r\n-rw-r--r-- 1 matoken matoken 11 11\u6708 2 00:00 to/01\n\n\n\nrsync \u306e --archive option \u3067\u30b3\u30d4\u30fc\u3059\u308b\u3068\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u306a\u3044\uff0e\u5185\u5bb9\u3082\u7570\u306a\u3063\u305f\u307e\u307e\uff0e\n\n\n\n$ rsync -av from/ to/\r\nsending incremental file list\r\n\r\nsent 73 bytes received 12 bytes 170.00 bytes/sec\r\ntotal size is 11 speedup is 0.13\r\n$ diff from/01 to/01\r\n1c1\r\n< 0123456789\r\n---\r\n> 0123456780\n\n\n\nrsync \u306e --checksum option\u3092\u4ed8\u4e0e\u3059\u308b\u3068\u5225\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u8a8d\u8b58\u3055\u308c\u3066\u540c\u671f\u3055\u308c\u3066\u5185\u5bb9\u3082\u540c\u4e00\u306b\u306a\u308b\uff0e\n\n\n\n$ rsync -av --checksum from/ to/\r\nsending incremental file list\r\n01\r\n\r\nsent 147 bytes received 35 bytes 364.00 bytes/sec\r\ntotal size is 11 speedup is 0.06\r\n$ diff from/01 to/01\n\n\n\n\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3093\u306a\u611f\u3058\u306b\u5909\u66f4\u3057\u305f\uff0e\n\n\n\n$ rsync -avAHXce ssh --partial --append user@server:from/ to/\n\n\n\n\uff03\u5b9f\u969b\u306f\u3088\u304f\u56de\u7dda\u5207\u308c\u308b\u306e\u3067while loop \u306b\u5165\u308c\u3066\u3042\u308b\uff0e\n\n\nEDIT: \u8ee2\u9001\u6e08\u307f\u90e8\u5206\u306e\u30c1\u30a7\u30c3\u30af\u306f\u3053\u308c\u3067\u306fNG\u3067 --append(\u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u8a18)\u3092\u524a\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\uff0e--append-verify \u3067\u884c\u3051\u305d\u3046\u306a\u6c17\u304c\u3057\u305f\u304c\u3053\u308c\u3082NG\u3060\u3063\u305f\uff0e\n\n\n\u74b0\u5883\n\n$ dpkg-query -W rsync\r\nrsync 3.1.2-2.2\r\n$ lsb_release -d\r\nDescription: Ubuntu 18.10\r\n$ uname -m\r\nx86_64", "date_published": "2018-11-02T21:38:53+09:00", "date_modified": "2018-11-11T15:37:32+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/38f5f3b575c5eb45cda6aa659bca119ac7a5e16b46565e869d0030e3bd66981d?s=512&d=mm&r=g" }, "tags": [ "rsync", "Cosmic Cuttlefish(18.10)", "Linux", "Ubuntu" ] }, { "id": "http://matoken.org/blog/?p=1411", "url": "https://matoken.org/blog/2016/09/28/the-power-outage-is-anxiety-backup-lsyncd-and-nilfs2/", "title": "\u505c\u96fb\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u4e0d\u5b89\u306a\u306e\u3067lsyncd\u3068NILFS2\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7", "content_html": "

\u5148\u65e5\u306e\u53f0\u98a816\u53f7\u306709/19 23:00\u9803\u304b\u308909/22 12:45\u9803\u307e\u3067\u505c\u96fb\u3057\u3066\u3044\u307e\u3057\u305f\u2026\u2026\uff0e \u3068\u308a\u3042\u3048\u305a\u30b5\u30fc\u30d0\u306f\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u3066ThinkPad X200\u306f\u30d0\u30c3\u30c6\u30ea\u304c4\u672c\uff0cX220\u306f2\u672c\uff0c\u30e2\u30d0\u30a4\u30eb\u30d0\u30c3\u30c6\u30ea\u306f10000mA x3\u3068\u3044\u3046\u611f\u3058\u3067\u505c\u96fb\u958b\u59cb\uff0e \u3068\u308a\u3042\u3048\u305a\u666e\u901a\u306b\u4f7f\u3063\u3066\u3044\u3066\u3082X200\u3060\u3051\u3067\u30823\u55b6\u696d\u65e5\u4ee5\u4e0a\u306f\u8010\u3048\u3089\u308c\u308b\u306f\u305a\u3067\u3059\uff0e

\n

\u3067\u3082\u4e00\u5fdcNotePC\u306f\u5fc5\u9808\u30c7\u30d0\u30a4\u30b9\u4ee5\u5916\u306f\u53d6\u308a\u5916\u3057\u3066\u8f1d\u5ea6\u3092\u4e0b\u3052\u3066powertop\u3067\u7701\u96fb\u529b\u30e2\u30fc\u30c9\u306b\uff0e

\n

\uff03powertop\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8fba\u308a\u3092\u53c2\u8003\u306b\uff0e

\n
\n \u300cBluetooth\u3067Linux\u30de\u30b7\u30f3\u3068Android\u3092\u7e4b\u3044\u3067\u8a71\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u305f\u8a71\u300d\u300c\u53f0\u98a8\u3067\u505c\u96fb\u306b\u306a\u3063\u3066\u7701\u96fb\u529b\u306e\u8a2d\u5b9a\u3092\u3057\u305f\u8a71\u300d\u300c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u8a2d\u5b9a\u304c\u5f15\u304d\u7d99\u304c\u308c\u306a\u304f\u3066\u56f0\u3063\u305f\u306e\u3067\u8abf\u3079\u305f\u8a71\u300d from Kenichiro MATOHARA\n
\n

\u3053\u308c\u30671\u53f0\u305a\u3064\u4f7f\u3063\u3066\u3044\u304f\u3053\u3068\u306b\uff0e\u3057\u304b\u3057\uff0c\u4e0d\u5b89\u70b9\u304c\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\uff0e \u4f55\u6642\u3082\u306f\u30ef\u30fc\u30af\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306fownCloud\u3067\u81ea\u52d5\u30d0\u30c3\u30af\u30a2\u30c3\u30d7&\u30c7\u30a4\u30ea\u30fc\u3067\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u3078\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u3057\u304b\u3057\u505c\u96fb\u6642\u306f\u30b5\u30fc\u30d0\u304c\u52d5\u3044\u3066\u306a\u3044&\u96fb\u6c60\u306e\u5207\u308c\u305fPC\u304b\u3089\u5225\u306ePC\u306b\u4f5c\u696d\u5185\u5bb9\u304c\u79fb\u884c\u3067\u304d\u306a\u3044\uff0e\u3068\u3044\u3046\u3053\u3068\u3067lsyncd\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092USB\u30e1\u30e2\u30ea\u306b\u30b3\u30d4\u30fc&\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306fNILFS2\u306b\u3057\u3066\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3082\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e

\n

\u307e\u305a\u306fUSB\u30e1\u30e2\u30ea\u306e\u7528\u610f\uff0e\u666e\u901a\u306bNILFS2\u3067\u4f5c\u308a\u307e\u3059\uff0e
\n/dev/sdz\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u60c5\u5831\u3092\u524a\u9664\u3057\u3066\u5168\u9818\u57df1\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3067\u4f5c\u6210\u3057\uff0cNILFS2\u3067\u521d\u671f\u5316\u3057\u3066/mnt\u306b\u30de\u30a6\u30f3\u30c8\u3057\u3066\u30e6\u30fc\u30b6\uff0c\u30b0\u30eb\u30fc\u30d7\u3092\u81ea\u5206\u306e\u3082\u306e\u306b\u3057\u3066\u3044\u307e\u3059\uff0e

\n
$ sudo wipefs -a /dev/sdz\r\n$ sudo fdisk /dev/sdz\r\nCommand (m for help): n\r\nPartition type\r\n   p   primary (0 primary, 0 extended, 4 free)\r\n   e   extended (container for logical partitions)\r\nSelect (default p): p\r\nPartition number (1-4, default 1):\r\nFirst sector (51-7821311, default 51):\r\nLast sector, +sectors or +size{K,M,G,T,P} (51-7821311, default 7821311):\r\n\r\nCreated a new partition 1 of type 'Linux' and of size 3.7 GiB.\r\n\r\nCommand (m for help): w\r\n$ sudo mkfs.nilfs2 /dev/sdz1\r\n$ sudo mount /dev/sdz1 /mnt\r\n$ sudo chown `id -u`.`id -g` /mnt\r\n$ sudo chmod 700 /mnt
\n

\u7d9a\u3044\u3066lsyncd\u3092\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u3092\u540c\u671f\u3057\u307e\u3059\uff0elsyncd\u306finotify\u3092\u30c8\u30ea\u30ac\u30fc\u306b\u4efb\u610f\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u308a\u51fa\u6765\u307e\u3059\uff0e\u4e00\u822c\u7684\u306b\u306frsync\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u540c\u671f\u306b\u4f7f\u3044\u307e\u3059\uff0e\u4eca\u56de\u306f\u30a2\u30c9\u30db\u30c3\u30af\u306b\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u52d5\u304b\u3057\u307e\u3057\u305f\uff0e\u540c\u671f\u5143\u540c\u671f\u5148\u306frsync\u3068\u540c\u3058\u66f8\u304d\u65b9\u3060\u3068\u601d\u3046\u306e\u3067\u524d\u3082\u3063\u3066rsync -avn from to\u307f\u305f\u3044\u306a\u611f\u3058\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u304a\u304f\u3068\u5b89\u5fc3\u3067\u3059\uff0e

\n
$ lsyncd -log all -nodaemon -rsync /home/mk/ownCloud /mnt/ownCloud
\n

\u3053\u308c\u3067lsyncd\u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\uff0c\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u81ea\u52d5\u7684\u306bUSB\u30e1\u30e2\u30ea\u306b\u30b3\u30d4\u30fc\u3055\u308c\uff0cUSB\u30e1\u30e2\u30ea\u306e\u4e2d\u3067\u306f\u81ea\u52d5\u7684\u306b\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u304c\u4f5c\u6210\u3055\u308c\u308b\u72b6\u614b\u3067\u3059\uff0e \u4f5c\u696d\u306e\u533a\u5207\u308a\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u660e\u793a\u7684\u306b\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3068\u66f4\u306b\u5b89\u5fc3\u3067\u3059\uff0e\uff08\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\uff0c\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306b\u306f\u4f55\u6642\u3067\u3082\u305d\u306e\u72b6\u614b\u306b\u5dfb\u304d\u623b\u305b\u308b\uff0e\u4f46\u3057\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u306f\u53e4\u3044\u3082\u306e\u304b\u3089\u9806\u306b\u81ea\u52d5\u7684\u306b\u524a\u9664\u3055\u308c\u308b\uff0e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306f\u81ea\u52d5\u524a\u9664\u3055\u308c\u306a\u3044\uff09

\n

\u30de\u30b7\u30f3\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u304d\u306b\u306flsyncd\u3092\u6b62\u3081\u3066\u5ff5\u306e\u70barsync\u3092dry run\u3057\u3066\u540c\u671f\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u3066\u304a\u3044\u3066\uff0c\u65b0\u3057\u3044\u30de\u30b7\u30f3\u3067USB\u30e1\u30e2\u30ea\u304b\u3089SSD\u306brsync\u3057\u3066lsyncd\u3092\u52d5\u304b\u3059\u3068\u3044\u3046\u611f\u3058\u3067\u3057\u305f\uff0e

\n\n

\u95a2\u6771\u5728\u4f4f\u6642\u306e\u8a08\u753b\u505c\u96fb\u306e\u3068\u304d\u306f\u8a08\u753b\u7684\u3060\u3057\u6642\u9593\u3082\u305a\u308c\u306a\u3044\u3057\u3067\u6848\u5916\u56f0\u308a\u307e\u305b\u3093\u3067\u3057\u305f(\u4ed5\u4e8b\u306f\u5927\u5909\u3060\u3063\u305f\u3051\u3069)\uff0e\u3067\u3082\u5ff5\u306e\u70baNotePC\u306e\u5927\u5bb9\u91cf\u30d0\u30c3\u30c6\u30ea\u306f\u8cb7\u3044\u5897\u3057\u3057\u3066\u6301\u3061\u6b69\u3044\u3066\u3044\u307e\u3057\u305f\uff0e(\u4eca\u56de\u306e\u30d0\u30c3\u30c6\u30ea\u306e\u4e00\u3064\u3082\u305d\u308c)
\n\u2193\u306f\u305d\u306e\u9803\u306e\u767a\u8868\u30b9\u30e9\u30a4\u30c9

\n\n

\u3061\u306a\u307f\u306b\u505c\u96fb\u304b\u308914,5\u6642\u9593\u3067\u643a\u5e2f\u57fa\u5730\u5c40\u306e\u30d0\u30c3\u30c6\u30ea\u3082\u5c3d\u304d\u305f\u3088\u3046\u3067\u5b8c\u5168\u306b\u30aa\u30d5\u30e9\u30a4\u30f3\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff0eNILFS2\u306f\u5927\u62b5\u6a19\u6e96\u3067\u306f\u5c0e\u5165\u3055\u308c\u3066\u3044\u306a\u3044\u3057\u624b\u5143\u3067\u306fGit\u7ba1\u7406\u3082\u3057\u3066\u3044\u308b\u306e\u3067NILFS2\u306f\u4f7f\u308f\u306a\u304f\u3066\u3082\u826f\u304b\u3063\u305f\u304b\u306a\u3068\u5f8c\u3067\u601d\u3044\u307e\u3057\u305f\uff0e

\n

\u5fa9\u65e7\u6642\u306e\u6b8b\u5bb9\u91cf\u306fNotePC \u304c1.5\u672c/\u30e2\u30d0\u30a4\u30eb\u30d0\u30c3\u30c6\u30ea\u304c50% x2\u3068\u3044\u3046\u611f\u3058\u672a\u3060\u884c\u3051\u308b\u306a\u3068\u3044\u3046\u611f\u3058\u3067\u3057\u305f\uff0e\u3067\u3082\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u7e4b\u304c\u3063\u3066\u3044\u305f\u3089\u3082\u3063\u3068\u5229\u7528\u3057\u3066\u3044\u305f\u3067\u3057\u3087\u3046\uff0e

\n

\u3057\u304b\u3057\u3053\u306e\u8fba\u306f\u96f7\u3084\u3089\u5f37\u98a8\u3084\u3089\u3067\u3088\u304f\u505c\u96fb\u306b\u306a\u308a\u307e\u3059\uff0e\u5927\u62b5\u306f\u643a\u5e2f\u57fa\u5730\u5c40\u304c\u843d\u3061\u308b\u307e\u3067\u306b\u306f\u5fa9\u65e7\u3059\u308b\u306e\u3067\u3059\u304c\uff0c\u53f0\u98a8\u3060\u3068\u4eca\u56de\u306e\u3088\u3046\u306b\u9577\u3044\u505c\u96fb\u306b\uff0e\u3067\u3082\u5fa9\u65e7\u72b6\u6cc1\u3092\u505c\u96fb\u60c5\u5831\u30b5\u30a4\u30c8\u3067\u78ba\u8a8d\u3057\u3066\u3044\u308b\u3068\u6df1\u591c\u306b\u3082\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\u5909\u308f\u3063\u3066\u3044\u306624\u6642\u9593\u4f53\u5236\u3067\u5fa9\u65e7\u3057\u3066\u308b\u306e\u304b\u3068\u9a5a\u304d\u307e\u3057\u305f\uff0e\u4e5d\u5dde\u96fb\u529b\u306e\u95a2\u4fc2\u8005\u306e\u307f\u306a\u3093\u3055\u3093\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059_o_
\n\uff08\u3067\u3082\u663c\u9803\u5fa9\u65e7->\u672c\u65e5\u4e2d->\u672c\u65e5\u672a\u660e\u5fa9\u65e7\u3068\u30b9\u30c6\u30fc\u30bf\u30b9\u304c\u305a\u308c\u8fbc\u3093\u3067\u3044\u304f\u3068\u306f\u3061\u3087\u3063\u3068\u3064\u3089\u304b\u3063\u305f\u3067\u3059\u2026\u2026\uff09

\n\n

\u3064\u3044\u3067\u306b\u4eca\u56de\u5f79\u306b\u305f\u3063\u305f\u3082\u306e\u3092

\n