I recently started using rsync to back up my user's home directory. One command
rsync -av --delete /path/to/directory/to/be/copied/ /path/to/destination/directorywhich in my case (using Puppy) is:
rsync -av --delete /mnt/sda7/home/al/ /mnt/sdb2/kubuntu_home_backup...backs up my /home/al/ directory to a directory called kubuntu_home_backup on another partition. Note the absence of a forward slash at the end of the destination directory. If I typed /mnt/sdb2/kubuntu_home_backup/ instead of /mnt/sdb2/kubuntu_home_backup, then the terminal would create another directory at /mnt/sdb2/kubuntu_home_backup/al, and back up everything in there.
The first time the command is run, it makes a copy of my /home/al directory. After that, when I run the command, it only copies files that have changed, and also deletes any files from the backup directory that I have deleted from my user's home directory since I last ran the command.
Pretty clever, huh?
The -a option is for archive, and -v is for verbose, as you might have guessed. The --delete option deletes files that I have deleted as I described above.
You can also use compression to make the backup smaller, although I haven't bothered with that so far.
Please see rsync --help, info rsync and man rsync for more detalis
Edited by Al1000, 27 October 2015 - 10:26 AM.