powerful Linux command-line utility for file transfer and synchronization across computers


In this digital age, backup and transfer of files has become a regular task. Some folks carry thumb drives; others outsource to IT professionals; still others use dropbox or similar storage in "the cloud." The rsync Linux command is a great alternative for those who prefer to initiate backups themselves and have more control than drag-and-drop copying. rsync has tons of options, specified via command-line arguments. File ownership/permissions and/or modification time can be preserved. Passing the -n flag instructs rsync to list what changes would be made without carrying them out — always good to check!

rsync really shines in the syncing of current and outdated versions of the same file hierarchy. Often, the two file trees are on different hosts. Factors to consider include: the number/size/type of files, data transfer speed, data transfer algorithm, and how to to detect differences. The --delete flag indicates that any file present only in the outdated hierarchy should be deleted. For repeat backups of large hierarchies, the -a (for archive) flag will preserve all file metadata; backups where not much has changed take only fractions of a second!