Using rsync to sync files rsync avh source…


randki w zwiazku Using rsync to sync files.

saintes rencontres coquines rsync -avh source_folder/ target_folder/

  • -a: archive mode
  • -v: verbose
  • -h: human readable

Additional options

  • -u: update only (preserve newer files)
  • -H: preserve the hard link
  • –progress: shows progress
  • -n: dry run (without actual copying)

By the way, “/home/user/dir/” and “/home/usr/dir” are not the same thing to rsync. Without the final slash, rsync will copy the directory in its entirety. With the trailing slash, it will copy the contents of the directory but won’t recreate the directory.

For more explanations, check this nice post.

http://www.linux.com/news/enterprise/storage/8200-back-up-like-an-expert-with-rsync


Leave a Reply

Your email address will not be published. Required fields are marked *