0% found this document useful (0 votes)
25 views

Rsync Command in Linux

rsync command allows backing up a home directory to another local or remote location. It minimizes data transfer by only copying differences between files using delta encoding. To backup the /home/tom directory to a USB drive mounted at /mnt/usbpen, use the rsync -au command, and add --delete to also remove files from the backup no longer in the source directory.

Uploaded by

charansahu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Rsync Command in Linux

rsync command allows backing up a home directory to another local or remote location. It minimizes data transfer by only copying differences between files using delta encoding. To backup the /home/tom directory to a USB drive mounted at /mnt/usbpen, use the rsync -au command, and add --delete to also remove files from the backup no longer in the source directory.

Uploaded by

charansahu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Q. How do I use rsync command to back up a home directory under Linux operating system? A.

rsync command easily backup your home directory to local secondary hard disk or remote server using ssh protocol. rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate.

Task: Backup /home/tom to /mnt/usbpen


Assuming that USB pen or external USB hard disk is mounted at /mnt/usbpen, enter the following command to backup (sync) new files and changes to existing files but don't remove files in backup directory:
$ rsync -au /home/tom /mnt/usbpen

To delete files in backup directory that no longer exist in directory being backed up, enter:
$ rsync -au --delete /home/tom /mnt/usbpen

You might also like