![rsync: [Sender] メモリ不足: my_alloc 呼び出し元 (file=lib/pool_alloc.c, line=143)](https://linux33.com/image/219023/rsync%3A%20%5BSender%5D%20%E3%83%A1%E3%83%A2%E3%83%AA%E4%B8%8D%E8%B6%B3%3A%20my_alloc%20%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97%E5%85%83%20(file%3Dlib%2Fpool_alloc.c%2C%20line%3D143).png)
多数のファイルを含むサブディレクトリを含むディレクトリをrsyncしようとしています。だから私は次のような結果を得たときには全く驚かなかった。
[sender] out of memory: my_alloc caller (file=lib/pool_alloc.c, line=143)
サーバー側のメモリが不足しています。
rsync
一時ファイルをファイル名として使用して、メモリに少数のファイル名を保持するように知る方法はありますか?
root@remote-end:~# rsync --version
rsync version 3.2.3 protocol version 31
答え1
答えではありませんが、不都合な解決策は次のとおりです。
# Copy the dir structure without files
ssh remote 'cd srcdir; find . -type d' | parallel mkdir -p
find . -type d |
# Sort so the deep dirs come first
perl -e 'print sort { $b=~s:/:/:g <=> $a=~s:/:/:g; } <>;' |
parallel rsync -a remote:srcdir/{} {}
結局はまだ失敗しますが、すべてのサブディレクトリが同期された後にのみ可能であることを願っています。