Linux rsync command
Linux rsync command
The rsync command is a powerful tool for synchronizing files and directories between locations. It’s widely used for backups, mirroring, and copying large data sets because it transfers only the differences between source and destination.
rsync Features
Some of the key features are as follows:
- Incremental Transfer: Only transfers the differences between the source and destination.
- Remote Syncing: Works efficiently over networks using SSH or other remote shells.
- Bandwidth Efficiency: Can compress files in transit to save bandwidth.
- Backup Capabilities: Can be used for creating backups with options to preserve symbolic links, permissions, and timestamps.
Installation on the Ubuntu
To install the Linux rsync command on the Ubuntu system follow the below steps:
Open the terminal and run the following commands:
$ sudo apt update
$ sudo apt install rsync
Verify Install
Once installed, you can verify the installation by running the following
command:
$ rsync –version
Synchronizing folders using the rsync command
$ rsync [flags] sourceFolder destinationFolder
Example
The command below backs the files and folders from the source directory to the destination directory.
Command line flags
Some command line flags are as follows:
-a is the arhive mode that copies in recursive mode and preserves modification times.
-v is verbose mode. it will print information
-u will synchronize the folders .
–delete will remove the files that are deleted.
Linux Commands
Linux Basic Commands Tutorial page:
More Information on Ubuntu Linux: