Posted: . At: 8:09 AM. This was 7 years ago. Post ID: 10163
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

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.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.