Backing up using RSync

Today we are going to take a look at backing up files in Linux using RSync.  RSync will come already installed on almost every Linux distribution so you will not need to install it.

The basic syntax is:

rsync /home/user/dir /media/disk/dir

Lets explain this with an example.  If I wanted to back up my entire home directory to an external hard drive called sdc mounted in media I would type the following:

rsync /home /media/sdc


Now there are various switches we can use with rsync and the main ones are outlined below:

-a archive.  This preserves, among other things, the owner, group and permissions of the directory / file.

-h hardlinks.  This switch will preserve all hardlinks to the directory /file.

-v verbose mode.  This switch tells Rsync to inform us what it is doing when performing the backup.

– exclude. This will allow us to exclude certain files / directories from being backed up e.g –exclude ‘home/user/dir.

So using the switches our example would look like:

rsync -avh –exclude ‘home/chris/documents’  /home /media/sdc

For people who don’t like using the command line there is a program called GRsync which provides a GUI for using RSync.

About the Author

Hi I am Chris Wakefield the owner of ComTech IT Support. I provide Windows and Linux based IT Support, laptop repairs and computer repairs to both business and personal clients in and around Stirling.

For a list of what I can offer you why not visit my website www.comtech247.net where you will find a list of my services, testimonials, blog and much more.

 

 

 

This entry was posted in Blog and tagged backing up, comtech, grsync, linux, rsync. Bookmark the permalink.

3 Responses to Backing up using RSync

  1. Ferdi says:

    Thanks for all your valuable efforts on this website. Kate really likes managing internet research and it is easy to see why. My partner and i learn all regarding the lively manner you deliver priceless solutions through the web blog and as well boost participation from the others on that subject plus our favorite princess is always learning a lot of things. Have fun with the remaining portion of the new year. You are performing a great job.

  2. Ricky says:

    Quality post, I will be browsing back more often to find fresh news.

  3. Angelic says:

    Actually difficult to get qualified persons with this topic, you seem like you know exactly what you are referring to! Thx

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current month ye@r day *