Backing up using rsync
After rsync has been setup on both the machines, we are now ready to send data back and forth. The rsync command is very simple, almost like the cp command that we all have been using for so long. A simple rsync command looks like this:
rsync [OPTIONS] SRC DEST
How to Use Rsync to Make a Remote Linux Backup
Imagine losing all your data by accidentally doing sudo rm -rf /someDirectory, sucks right? But it happens to the best of us. Now, if it was a Windows system, we could have used numerous backup options like OneDrive to secure our data. But what about Linux? Fortunately, we have some very robust tools to backup our Linux system too, and one of them is rsync.
Short for Remote SYNC, rsync is a CLI backup utility through which you can perform both local and remote backups in a secure and efficient way. It is secure because it uses SSH (secure shell) and efficient because it supports something called as incremental backup. Now what is incremental backup? In simple terms, rsync compares the file size and last modified time, and backs up only those files that have changed. rsync has become the industry standard to backup Linux systems for the last two decades because of a few additional reasons too, which are beyond the scope of this article.
Alright, enough theory. Now let’s see how to backup our Linux system to a remote computer using rsync.