Learn rsync to backup everything
Since I've stopped using big tech cloud storage solutions, I've been looking into what other tools I can use to backup my files, photos and videos.
I have a home server, and I didn't want to use the straight forward brute-force solution which is scp (openSSH secure file copy) because I don't want to copy files between my machine and the host all over again even if there was no change.
I've tried solutions like syncthing, which is nice, very simple to configure and I'm still using it for syncing some folders between my server and my laptop. But I fell in love with rsync for its simplicity and its features.
In this article, I'll walk you through about how I use rsync daily to backup my files.
What is rsync
rsync as the man page indicates is a fast, versatile, remote (and local) file-copying tool.
To use rsync you'll have to install its package on both the source and destination systems, chances are it's already included in your distribution. You can check if it's installed, by typing at your terminal which rsync.
You'll also need to have ssh configured between your machine and the remote host, so make sure that you have an openSSH server up and running.
To use rsync, it's pretty simple:
rsync [OPTION...] SRC... [DEST]
Options you should know before using rsync
–verbose (-v)
Pretty common option, very useful to use in order to obtain additional information.
–dry-run
This is super useful when starting to learn rsync. It simulates the execution of your rsync command without really doing anything. It allows you to perform a trial run. It is used in combination with –verbose (-v) to see what an rsync command is going to do before actually running it.
Thanks to this command I was fine-tuning my rsync command until I got to a place where I'm satisfied with the outcome.
–archive (-a)
It's an equivalent option to -rlptgoD. It's a quick way to say that you want recursion and to preserve almost everything (permissions, attributes about your files, .. etc)
-P (–partial –progress)
This option is a combination of the two option –partial and –progress
–partial
Using this option tells rsync to keep the partially sent files, because the default behavior is to delete any partially transferred files. This is nice in case of an interruption in the backup routine, the subsequent transfer of the rest of the file will be much faster.
–progress
This option is only useful for showing the progress of the transfer. as the man page states "This gives a bored user something to watch."
A little example of how I use it
I've set up a cron job that runs a bash script every two minutes where I basically backup my directory ~/backup into my remote host thinkcenter.
rsync -aP backup_folder user@hostname:~/backup
Learn more
I recommend you to watch this great video explaining when (and how) to use rsync: Bread's Youtube Video
man page is also great for more details, and if you want to get started you can also check the command tldr which is amazing to have the most common ways of invoking a tool.
Quick note: I just wanna let you know that the comment section is live now! Feel free to let me know what do you use to backup your files and should I consider a more modern tool (like rclone ?).
Thanks for reading!
Subscribe to get future posts via email
Add a comment
Comments (2)
Abderrahmane Faiz
November 26, 2025 12:37
Something I mentioned in the article but maybe wasn't super clear is that tldr is a command that you can install and use on the terminal to show a cheat sheet about different commands, not specifically rsync
Jan
November 28, 2025 21:26
Wow didn't know about tldr, so useful!
Copyright © 2025 Abderrahmane Faiz