rsync is a powerful tool for backing up and synchronizing data on Linux.
1. Connect to the server via SSH.
2. Install rsync with apt install rsync if it isn't already installed.
3. A simple rsync command for copying data looks like this: rsync -av [source_directory] [destination_directory].
4. You can also use rsync over SSH to transfer data securely between two servers: rsync -av -e ssh [source_directory] [username@remote_server]:[destination_directory].
5. The -a option stands for "archive", which enables a range of options that are useful for backups.
6. The -v option stands for "verbose", which means rsync shows detailed information during the transfer.
7. You can also exclude a list of files that should not be copied. To do this, create a file with the exclusion rules and add the --exclude-from option.
8. For regular backups, you can run rsync in a cron job.
07. Sep 2023
1 min