PUBLISHED: August 17, 2019
Deprecation Notice: This article was written more than a year ago which means that its information might no longer be
up-to-date. We cannot therefore guarantee the accuracy of it's contents.
Table of Contents
How to mirror drives with rsync
One of the most overlooked Linux commands is rsync. It solves many of the issues that the normal copy command is unable to do. For example, with a single rsync command you can mirror the entire contents of one hard drive to another without any third party software and if one wishes, only copy the differences between the two locations.
Mirror two hard drives
$ rsync -avzr --delete /source/ /destination/
Let us explain in detail what these parameters mean. For the sake of clarity, multiple options have been separated into their own line.
rsync | the command itself |
-a | archive mode |
-v | increase verbosity |
-z | compress file data during the transfer |
-r | recurse into directories |
–delete | delete extraneous files from the destination |
/source/ | where to copy files from |
/destination/ | where to copy files to |
Further Information
For further information on the rsync command, type:
$ man rsync
comments powered by Disqus