Using rsync
An old favorite for backing up is rsync. One big reason for this is because rsync enables you to copy only those files that have changed since the last backup. So although the initial backup might take a long time, subsequent backups are much faster. It is also highly configurable and can be used with removable media such as USB hard drives or over a network. Here is one way to use rsync.
First, create an empty file and call it backup.sh:
matthew@seymour:~$ sudo touch backup.sh
Then, using your favorite text editor, enter the following command into the file and save it:
sudo rsync --force --ignore-errors --delete --delete-excluded --exclude-from=/home/matthew-exclude.txt --backup --backup-dir=`date +%Y-%m-%d` -av //media/externaldrive/backup/Seymour ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access