Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
I wonder what mirdir offers over rsync.
Posted Nov 21, 2005 21:58 UTC (Mon) by fjf33 (subscriber, #5768)
Posted Nov 21, 2005 22:10 UTC (Mon) by tjw.org (guest, #20716)
It's slightly more advanced than 'cp -a' because it supports exclude lists and does some checking to make sure every file isnt' copied every time. However, it doesn't look like it does anything advanced when examining the directories like rsync does. From the mirdir manual:
Counter of bytes to be compared in files which look equal.
-s Compare the full content of files, ignoring -t option if
Also it doesn't appear to support ssh tunneling (or any network capability).
I seriously question the experience level of the person who writes the CLI Magic series. Assuming the target audience is novices, why not show them how to use a much more useful tool that is probably already installed on their machine instead of sending them off on a wild goose chase?
Posted Nov 22, 2005 1:22 UTC (Tue) by warthawg (guest, #3055)
He's no sys admin, that's for sure. :)
I'm just a lame Linux user who has been using it since about 95, and as his exclusive desktop since 98. The column is definitely for noobies, and rsync has already been covered in a column I wrote in April. And I guess I should come clean about the fact that my rank (Corporal-for-life in the Linux Liberation Army) is an honorary one, that I awarded myself.
That said, I really think some people need to get over the notion that writing about a tool means the author loves it, or swears in blood it's the best of breed, or implies anything at all which is even remotely close to that.
That sort of thinking implies a mindset as infantile as "my distro can beat up your distro." Or substitute desktop enviroment, email client, ripper, desktop OS, server OS, whatever else you want to argue about for distro in that template.
Mirdir is a fine tool for some purposes, and for some people. Like rsync better anyway? Fine. I think it is a little bit of overkill for local copies, copying data to a keydisk, and similar tasks that a normal user is likely to need to do, but whatever. Mirdir's deal is simplicity, rsync's power comes from being able to do much more than that. IMO, newbies like and appreciate simple.
Posted Nov 22, 2005 6:22 UTC (Tue) by sitaram (subscriber, #5959)
Having said that, this is for Joe. And I'm speaking for myself :-)
I've used Linux since about 95 (my first distro was Yggdrasil!), and I'll let the rest of it go unsaid (not that there's too much). I've now come to the point that, for every task I have, I look for one tool that is as much of a superset of everything else as possible, simply because -- lemme say it outright -- I'm too old to remember all of them :-( I don't always find the "one ring", but I look for it anyway!
Which is why I agree with the idea that when talking about a new tool, a reference can be made to similar tools with a short bit of info, just to give us "crusty old geeks" a very brief comparision. Please dont read it as a "my ditro can beat up your distro" situation. I'm too old for that kind of stuff too :-)
In this example, something like "For power users, rsync [URL of your previous article here] offers more choices, at the price of more complexity. For example, leave off the final slash on the source dir and see how long you take to figure out what went wrong!" would have been appropriate.
I'd hate to offend Joe -- I've learnt a lot from him. But I still wish I hadn't spent time downloading and looking at mirdir, and something like the example para above would have helped me avoid that.
Posted Nov 22, 2005 8:38 UTC (Tue) by hppnq (guest, #14462)
Seriously, I like articles like these: simple solutions for simple but real problems. Users always have the option to adjust their tools to their needs and experience, sysadmins should know how to pick the right tool for the job in the first place.
So by all means, Joe, keep it coming.
Posted Nov 22, 2005 12:25 UTC (Tue) by khim (subscriber, #9252)
I could, of course, recommend mirrordir as a much better alternative, but I would be joining the wrong choir. The only real solution is painfully obvious: install a proper logical volume manager, rsync and friends are for wimps.
I keep backup of my files on system thousand miles away from my main one. With rsync. Now: how exactly can I do this with "proper logical volume manager" ? On the other hand I hardly find a task not doable with rsync but doable with mirrordir...
Posted Nov 22, 2005 20:23 UTC (Tue) by hppnq (guest, #14462)
The point I was trying to make is not whether rsync is able to solve a problem (such as making a simple local backup), but whether it is the most appropriate tool for the job.
Posted Nov 23, 2005 17:31 UTC (Wed) by grouch (guest, #27289)
From the article:
mirdir -enone /home/username/text-files /home/username/text-mirror
rsync -avz /home/username/text-files/ /home/username/text-mirror
No more complicated for newbies to learn than mirdir; actually, it takes fewer keystrokes. Not any more cryptic, either.
Now, if I wanted to delete old versions:
rsync -avz --delete /home/username/text-files /home/username/text-mirror
How about if a friendly 'root' mounted some Compact Flash disk on a usb card reader for me?
rsync -avz --delete ./my_text_files/ /mnt/temp/my_text_files
How about mirroring to some website where I have an ssh account?
rsync -avz --delete -e ssh ./my_text_files/ me@there:my_home/my_text_files
The article does a good job of introducing 'mirdir', which I had never heard of until now. As someone else pointed out, it would be helpful to mention other similar tools.
Thanks for your continuing work, Joe!
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds