Guest User

Untitled

a guest
Jul 28th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. ### The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)
  2.  
  3. #### This creates an archive that does the following:
  4.  
  5. **rsync**
  6. (Everyone seems to like -z, but it is much slower for me)
  7.  
  8. - a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  9. - H: preserves hard-links
  10. - A: preserves ACLs
  11. - X: preserves extended attributes
  12. - x: don't cross file-system boundaries
  13. - v: increase verbosity
  14. - --numeric-ds: don't map uid/gid values by user/group name
  15. - --delete: delete extraneous files from dest dirs (differential clean-up during sync)
  16. - --progress: show progress during transfer
  17.  
  18. **ssh**
  19. - T: turn off pseudo-tty to decrease cpu load on destination.
  20. - c arcfour: use the weakest but fastest SSH encryption. Must specify "Ciphers arcfour" in sshd_config on destination.
  21. - o Compression=no: Turn off SSH compression.
  22. - x: turn off X forwarding if it is on by default.
  23.  
  24. **Original**
  25.  
  26. ```sh
  27. rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir>
  28. ```
  29.  
  30.  
  31. **Flip**
  32.  
  33. ```sh
  34. rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" [source_dir] [dest_host:/dest_dir]
  35. ```
Add Comment
Please, Sign In to add comment