Rsync for easy (and quick) backups



I’ve got to say, I haven’t spent ENOUGH time with rsync to really be fluent in how I could put it to use…. A week or so ago I was reading this list of essential Linux software by a guy that moved from Mac OS X to linux because he detested the DRM that was being shoved down his throat. Anyway, one of his essentials was rsync for backups. Which got me thinking. Why didn’t I use rsync for backups. At one point in time I used unison, but for some reason had stopped and was in need of reorganizing my home backup strategy anyway. I found a few interesting approaches.


This “Link Backup” script is an interesting approach and seems like a good idea. Essentially files on disc can have more than one “hard link” (*think of a filename) pointing to it and so… they copy everything once and then just copy the changes on incremental backups making hard links to the already existing-unchanged files. From the site:

Link-Backup is a backup utility that creates hard links between a series of backed-up trees, and intelligently handles renames, moves, and duplicate files without additional storage or transfer.

Transfer occurs over standard i/o locally or remotely between a client and server instance of this script. Remote backups rely on the secure remote shell program ssh.
Link-Backup comes with a web based viewer of the backups it makes.

One of the beauties of rsync is that it can work locally, or over the network, it can use ssh for encryption… in sum it gives you some options that are really handy. But the real kicker is this…. the rsync algorithm is fairly clever. Let’s say I rsync my home directory – 15GB worth to a removable drive. The first time, this will take quite a while. The second time… rsync looks and sees what files have changed and even what PARTS of those files have changed, it winds up saving a good deal of time in successive rsync runs over the first run. Here’s a basic rsync how-to. You would think from the name that it would automatically “synchronize” two different directories. However it doesn’t do that by default. It is designed more to “make the second folder look like the first folder”. Which is a SLIGHTLY different concept. However, it CAN be used to do a two way synchronization….

rsync -avu folder1/* folder2/
rsync -avu folder2/* folder1/
for instance would copy changed files from folder1 to folder 2 without deleting files, without clobbering newer files in folder2. The next line does the same from folder2 to folder1. The only problem might be encountered with a file that is independently edited in the two locations. Of course, you run into problems with that in MOST ANY synchronization scheme.

Another good reference on “easy automated snapshot backups using rsync” is here. This one goes into some good detail and makes use of a feature in rsync to deal with hard links. Rsync is available for Windows as well.

While I’m at it, let me not forget the rsync.net file storage service where for a few dollars a month you can store a few GB of data…. (It’s not connected to the originator of the rsync protocol.) So, it might be worth looking into if you’re interested in working up a good backup strategy.

Related Posts

Blog Traffic Exchange Related Posts
  • Remote Tech Support using VNC (Ultravnc SC and x11vnc+wrapper script) Ok, some time back I'd done a writeup on UltraVNC SC, which is a nice customizable (windows version) VNC server that essentially let's someone doing remote support build their own downloadable .exe that runs and automatically tries to make a direct connection to a "listening" vnc viewer. It's good for......
  • Mondorescue manually restoring from an afio.bz2 file For several years now, I've used Mondorescue as a backup solution for those customers with a Linux server. It makes for a nice, easily scriptable backup that can go ahead and burn to disc, *(or tape or another pc....) My preferred way of doing this has been a full mondorescue......
  • Linux Permissions Headache Yikes, what an evening..... it started innocently enough in the afternoon. I have an old Mandrake 10.0 server that I was upgrading clamav on (recent security update). While I was at it, I was reviewing the anti-spam setup to see if I could get any better success with filtering junk......
Blog Traffic Exchange Related Websites
  • Trackbacks for Corporate Blogs Explained If you are just getting started in the world of corporate blogging, you are probably already aware of the fact that there is a lot to take in, and plenty for you to learn. One of the concepts that you need to understand when turning your corporate blog into a......
  • Link Building After the Nofollow Tag With all of the SEO companies popping up everywhere how do you know your SEO efforts are going to pay off? I spend a significant amount of time reviewing SEO offerings from other companies and find that the range in quality of SEO can vary greatly. While doing proper......
  • An A-Z Index of the Bash command line for Linux From SS64.com:   adduser Add a user to the system addgroup Add a group to the system alias Create an alias • apropos Search Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages (Debian/Ubuntu) aspell Spell Checker awk Find......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site