parallel-rsync(1)

πŸ’– parallel-rsync πŸ’–

okay bestie, welcome to parallel-rsync β€” that's the one from the General Commands Manual section of your man pages, and it's literally the moment your file-copying life gets a glow-up. ✨


🌸 NAME 🌸

parallel-rsync β€” parallel file sync program πŸ¦‹


✨ SYNOPSIS ✨

parallel-rsync [-vAraz] [-h hosts_file] [-H [user@]host[:port]] [-l user] [-p par] [-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X arg] [-S args] local ...  remote

πŸ’… DESCRIPTION πŸ’…

so parallel-rsync is a program for copying files in parallel to a whole bunch of hosts, and it does it using the iconic, beloved rsync program. no cap, she's serving.

she comes with features like passing a password to ssh, saving output to files, and timing out. like, she's got range. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -h host_file, --hosts host_file β€” read hosts from the given host_file. the lines in that host file look like [user@]host[:port] and, slay, they can also include blank lines and comments (lines starting with #). if you give her multiple host files (yes, by using -h more than once), then parallel-rsync behaves as though those files were concatenated together. and if a host shows up multiple times? she will connect the given number of times. periodt.
  • -H [user@]host[:port]
  • --host [user@]host[:port]
  • -H "[user@]host[:port] [ [user@]host[:port ] ... ]"
  • --host "[user@]host[:port] [ [user@]host[:port ] ... ]" β€” add those host strings to the list of hosts. this option may be given multiple times, and she plays nicely with the -h option too, so you can mix and match. 🫢
  • -l user, --user user β€” use the given username as the default for any host entries that don't specifically specify a user. it's giving fallback queen.
  • -p parallelism, --par parallelism β€” use the given number as the maximum number of concurrent connections. yes, you're the one controlling the chaos. 😌
  • -t timeout, --timeout timeout β€” make connections time out after the given number of seconds. with a value of 0, parallel-rsync will not timeout any connections β€” she'll wait forever, iconic but also πŸ’€.
  • -o outdir, --outdir outdir β€” save standard output to files in the given directory. filenames are of the form [user@]host[:port][.num], where the user and port are only included for hosts that explicitly specify them. the number is a counter that gets incremented each time for hosts that are specified more than once.
  • -e errdir, --errdir errdir β€” save standard error to files in the given directory. filenames are of the same form as with the -o option. matching set, adorable.
  • -x args, --extra-args args β€” passes extra rsync command-line arguments (peep the rsync(1) man page for more info about rsync arguments). this option may be specified multiple times. the arguments are processed to split on whitespace, protect text within quotes, and escape with backslashes. to pass arguments without such processing, use the -X option instead.
  • -X arg, --extra-arg arg β€” passes a single rsync command-line argument (again, rsync(1) has the lore). unlike the -x option, no processing is performed on the argument, including word splitting. to pass multiple command-line arguments, use the option once for each argument. one at a time, bestie.
  • -O options, --options options β€” SSH options in the format used in the SSH configuration file (check ssh_config(5) for more info). this option may be specified multiple times.
  • -A, --askpass β€” prompt for a password and pass it to ssh. the password may be used for either unlocking a key or for password authentication. the password is transferred in a fairly secure manner (e.g., it will not show up in argument lists).
but be aware that a root user on your system could potentially intercept the password. 😭 not to be dramatic but that's a real caveat, keep it in mind.
  • -v, --verbose β€” include error messages from rsync with the -i and -e options.
  • -r, --recursive β€” recursively copy directories. go deeper. πŸŒ€
  • -a, --archive β€” use rsync archive mode (that's rsync's -a option).
  • -z, --compress β€” use rsync compression.
  • -S args, --ssh-args args β€” passes extra SSH command-line arguments (see the ssh(1) man page for more info about SSH arguments). the given value is appended to the ssh command (that's rsync's -e option) without any processing. raw. unprocessed. main character energy.

🌈 TIPS 🌈

the ssh_config file can include an arbitrary number of Host sections. each host entry specifies ssh options which apply only to the given host. host definitions can even behave like aliases if the HostName option is included. this ssh feature, in combination with parallel-ssh host files, provides a tremendous amount of flexibility. like, the range? unmatched. πŸ’œ


⭐ EXIT STATUS ⭐

the exit status codes from parallel-rsync are as follows:

  • 0 β€” Success ✨
  • 1 β€” Miscellaneous error
  • 2 β€” Syntax or usage error
  • 3 β€” At least one process was killed by a signal or timed out.
  • 4 β€” All processes completed, but at least one rsync process reported an error (exit status other than 0).

πŸ‘‘ AUTHORS πŸ‘‘

written by Brent N. Chun <bnc@theether.org> and Andrew McNabb <amcnabb@mcnabbs.org>. legends fr fr.

https://github.com/lilydjwg/parallel-ssh


🧚 SEE ALSO 🧚

rsync(1), ssh(1), ssh_config(5), parallel-ssh(1), parallel-rsync(1), parallel-slurp(1), parallel-nuke(1),


and that's the whole page, bestie 🫢 this version dropped way back on January 24, 2012, and yeah β€” it's still filed under parallel-rsync(1) in the General Commands Manual. go sync something parallel. slay. πŸ’–βœ¨

πŸ“¦ where this page comes from