Skip to content

Instantly share code, notes, and snippets.

@riywo
Created March 15, 2011 09:46
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riywo/870515 to your computer and use it in GitHub Desktop.
Save riywo/870515 to your computer and use it in GitHub Desktop.
GNU parallel使って並列でrsyncする&ちゃんとmkdirする
find /path/to/dir/ -type f | time parallel --eta 'rsync -aRz --compress-level=1 {} remote:/'
@riywo
Copy link
Author

riywo commented Mar 15, 2011

rsyncは-Rつけてフルパスにして、リモートを/からの指定にすると、mkdirちゃんとやってくれる。
zオプションは普通にやるとかなりcpu使い果たすのでcompress-levelを下げるとよさげ。

@riywo
Copy link
Author

riywo commented Mar 15, 2011

remote側のsshd_configでMaxStartupsをコア数より多くしないとsshでエラーがでる。
rshだったら大丈夫かも。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment