How to backup your home directory easily with the rsync command.

How to use rsync to backup your home directory or whole system and skip directories that are not required to be backed up.

This simple rsync command will backup the contents of your home directory to a folder on a removable drive. This command will exclude various system folders if you wish to backup the / partition instead.

rsync -avh --progress --exclude {"/dev", "/lost+found", "/media", "/mnt", "/proc", "/run", "/sys", "/tmp"} /home /mnt/mounts/jason/My\ Stuff/backups/

Another way would be to have the excluded folders in a list in a text file and specify the file name in the command. You do not need to backup everything in every directory anyway.

rsync -avh --progress --exclude-from "exclude-list.txt" /home /mnt/mounts/jason/My\ Stuff/backups/

This command did have problems with copying over all file attributes, but this could be due to the fact that I was copying files from EXT4 to NTFS. But all files were backed up and that is what matters.

No comments have been made. Use this form to start the conversation :)

Leave a Reply