![rsync: [Sender] 메모리 부족: my_alloc 호출자(file=lib/pool_alloc.c, line=143)](https://linux55.com/image/219023/rsync%3A%20%5BSender%5D%20%EB%A9%94%EB%AA%A8%EB%A6%AC%20%EB%B6%80%EC%A1%B1%3A%20my_alloc%20%ED%98%B8%EC%B6%9C%EC%9E%90(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/{} {}
결국에는 여전히 실패하겠지만, 모든 하위 디렉터리가 동기화된 후에만 가능하기를 바랍니다.