Main.RSyncBasics


Examples and notes for the use of the secure mirroring tool, rsync

Example command:

>rsync -arv --progress --rsh='ssh -p2145' ./* username@destination.com:~/Temp/Destination/

  • -a copies things in archive mode, which ensures things like permissions and owner/group are retained.
  • -r means to do a recursive copy, including all sub-directories and files within.
  • -v means to be verbose in output and status information.
  • --progress means to keep track of file progress and transfers are made.
  • '--rsh='COMMAND' is which remote shell program to use, in this case overriding the default of rsh with ssh'' and providing a custom port number.
  • ./* is the source files, in this case all the files and directories in the current working directory.
  • username@destination.com:~/Temp/Destination/ A specification of the destination for the files, which includes a user-name, a host to connect to, and a directory to insert the files, in this case /home/username/Temp/Destination/

Links