Like most of us, my work is divided between a laptop and a PC and I use cloud services like Dropbox and Ubuntu One to share data between them. Grsync and Rsync takes data sharing to the next level, giving me the ability to synchronize updates among multiple Linux machines.
If you come from a Windows background, think of Rsync as a Robocopy for Linux. Rsync, like Robocopy, is an intelligent file backup command line tool copying only those files you specify. Typically we’re only copying the files that have been modified since the last time Robocopy was run resulting in a very efficient copy process. Rsync has all of the capabilities of Robocopy with one big advantage, its Grsync graphical UI. Here’s a screenshot of Grsync.
For the Rubyists out there looking at the source and destination properties of the above example, yes, Git or some other version control system is the best way to keep project files in sync, but let’s ignore that point for now. Our purpose here is to demonstrate keeping files updated on multiple Linux machines.
Our example shows copying updated files from a machine to a cloud service. To complete the update on another machine we’d reverse the process. It should be noted that each task can be saved as what is called a “Session” in Grsync. This is a configuration file you create once and can use with multiple machines. I keep my Grsync Session Config files on a cloud drive so I can load the configurations from any machine.
You’ll notice below how we can include additional properties for setting exclude and log files.
One of my favorite features of Grsync is the ability to perform dry runs as shown below. This gives you a preview of what files will be copied and confirms the process will copy the files you were expecting it to copy
Not only are you presented with a list of files that will be copied but a command line statement is generated from your GUI settings. You can use the command to learn more about rsync or use it in a bash script.
I hope I’ve demonstrated how darn handy Grsync and Rsync can be in keeping your files synchronized among multiple Linux machines.