SEARCH

How-To Geek

How to Setup Rsync Backups on Linux the Easy Way

Most people these days use some type of online backup like Dropbox, but what if you just want the same feature, but backing up to an external hard drive instead? Here’s how to do it the easy way.

In the past, we showed you how to synchronize files and folders with SyncToy, however, SyncToy only works for Windows. On the other hand, Rsync is an open source tool that works on any computing platform. Whether you are on Windows, Linux, or Mac, Rsync backups files and folder on any of these platforms.

Rsync comes as a command line utility, and the secret to make it work, lies in how skilled you are with command line switches. If you loathe the command line, Grsync gives a nice user interface for Rsync, and it is also available for Windows and Mac.

Getting Started with Grsync

Install Grsync with your package manager.

Prepare a folder, ideally somewhere outside your PC – an external hard disk, or a network storage drive, for your backups. Once you have done that, open Grsync, and create a new session.

A session stores a different set of source and destination directories, and any configuration associated to them. Simply click the add button to add a new one, and delete it if you no longer need the session.

The top box is the source, and the bottom box is the destination. The destination folder is where you want to back up your files, this folder acts as your Dropbox folder. The source folder is where you keep all your important files in your computer.

You have three options the basic, advance, and extra. The basic options are pretty self- explanatory, and you’ll find most of the options they will ever need here. You might want to select “skip newer” and “delete on destination” option. “Skip newer” tell grsync not to overwrite files that are newer in the back up folder, and “delete on destination” tells grsync to trash files that you have in your back up folder but not in your computer.

Hover your mouse over each option to understand what it means.

The simulation menu is very useful if you are not sure that you have selected the right options.

Simulation does not copy your files, it only gives you a list of files that Grsync will backup with the options that you have selected.

If you are happy with the output, click the execute menu to save the settings, and perform the backup.

Once we have a session that backup our files to an external storage device, we have to create another one that synchronize files between the network folder and your computer. This way, Grsync will download new files in the network folder into your computer. Please remember that Grsync only copies the folder that you specify in the source field, and if you want to synchronize that folder, you need to specify a path to that folder in the destination field, not the actual folder.

For example, we want to synchronize the document folder in the back up drive with our document folder inside our home folder. To do this, we set our home folder, “home/zainul”, and not “home/zainul/document” in the destination field.

Scheduling Backups

To get a Dropbox-like synchronization, you need to schedule Grsync to synchronize both your folder and the network folder. Windows, Mac, and Linux have their own GUI based scheduler. Gnome Scheduler might be the easiest way to schedule these backups for Linux. You can use Task Scheduler, if you are running Windows, and iCal if you are on Mac.

We have to add both back ups as recurring tasks.

Give them a good name, and enter this as the command

grsync –e “name of the session”

Remember to schedule both sessions that you just created: the one that back up your files to the network folder, and the one that download new files from the network folder to you computer.

Rsync is a great tool to keep your files synchronize across computers, network drive, and even mobile devices. Try it out, and feel free to share what you think with the other fellow readers in the comments section.

Download Grsync for Windows and Mac

Zainul spends his time trying to make technology more productive, whether it’s Microsoft Office applications, or learning to use web applications to save time.

  • Published 07/5/11

Comments (7)

  1. Screwtape

    Does rsync backup just the parts of the file that have changed, instead of the entire file? Much like Dropbox.

    I keep hearing about programs on linux that do this. Are there any “true” Windows
    programs that do the same?

  2. RomelSan

    Nice article, this helped me a lot!
    I now synchronize my computers with my Synology Disk Station.
    Thanks!

  3. Skiddie

    Is this post going to show us how to setup rsync on Linux then?

  4. Raj

    Nicely explained! One qs though. If the first session deletes files on destination not in local folder, wouldnt that also delete new files that the second session is meant for?

  5. Milo

    @Screwtape There is rsync for windows. I don’t know of any ui wrappers like this for it, but cli is better anyways.. ;)

    Either way, I would recommend picking up cygwin (http://www.cygwin.org) which provides a package manager of sorts for tons of Linux programs on a Windows computer (rsync, bash, even x11 and window managers).

  6. Milo

    Well I missed the bottom link. I guess there IS a wrapper for it. But I would still go with cli…

  7. Ed

    I like and use luckyBackup on my Linux Mint machine

Enter Your Email Here to Get Access for Free:

Go check your email!