Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'How to use 'cp' as a simple but reliable backup tool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to use 'cp' as a simple but reliable backup tool
Authored by: zkarj on Feb 17, '10 05:13:06PM

Well, believe. The first presumption that cp gives is "I'm not endangering my source files". It copies from a to b. Period. There was some testing done to perfect the flags, sure. And I admit to not realising the --dry-run option of rsync.

But all of you rsync fans have all been using it and have learnt its features. Try approaching it from the point of view of someone who didn't know it existed until they had these precious files to back up. I don't have access to a *nix command line at the moment, but I remember reading through the man pages and then searching online and getting the typical *nix expectation that I knew what I was doing and was just trying to figure out some nuance.

I've written my fair share of documentation in my 20+ year IT career and had to deal with the users that read it. I've used my fair share of technology too. I know when I understand something and I know when I don't. I know how horribly things can go wrong if I don't understand. The rsync documentation is ambiguous in places and/or uses terms without defining them. I could find no web resource that gave me any greater level of understanding. Actually, the same is true for the cp command. Because it is a 'basic' *nix command, everyone assumes you either know it inside out or you won't use it. A rather odd approach, really.

In this hint, I gave an explicit use case and an exact syntax that works so that others may find in their searching what I couldn't.

[ Reply to This | # ]
How to use 'cp' as a simple but reliable backup tool
Authored by: leamanc on Feb 17, '10 06:05:40PM

I only kid. :-) But please accept my apology, as I see you are getting quite a bit of flak for posting this hint. I didn't mean to insult you personally.

I was just trying to point out that while your usage of cp accomplishes what you are looking to do, you've got to understand that the vast majority of people here are going to say it's the wrong way to do the job. Once again, don't take it as a personal insult, but I find it exceptionally hard to believe that you couldn't find a decent rsync tutorial. A Google search for 'rsync copy local directory' should provide you with tons of useful links. I know it will, because it did for me!

I use rsync extensively both at home and on the job, but I only tap the bare minimum of its capabilities. As several people have posted here already, the rsync equivalent of what you are doing is almost like your cp command, but with less flags. Granted, this isn't the old days of time-sharing on the VAX when using an extra process when you didn't need to got you in trouble, but following those old practices are still a good idea, because they are effective and efficient. rsync in particular is one of the most efficient apps out there.

I rsync a 100 GB iTunes Library every night--maintaining metadata like playcounts and ratings--and it runs in less than a minute from one FireWire 400 drive to a USB2 drive on my Mac mini. I think it's things like this that have caused people to get so up-in-arms about pushing you toward rsync. It's an amazing app, and is really what you're looking for here. If you really couldn't find the answer by Googling, you could have posted in the forums here and got a solid answer back PDQ.

You say you have 20+ years in IT. I'm not far behind you. So as a fellow IT professional, I'm sure you've ran into some scenarios like this: At my company, we provide both Excel and FileMaker Pro. There is some cross-over in functionality, but we've got so many folks who just want to force Excel into being a database, and FMP into being a spreadsheet app. We get the Adobe Creative Suite for our marketing staff. They've got both Photoshop and Illustrator in this suite. Yet they often want to draw in Photoshop, and edit in Illustrator. In both cases, yeah you can probably do what you want to do my using the "wrong" app, but it's just much easier if you use the right tool for the right job.

Once again, no personal offense intended, and I actually learned something about cp that I didn't know before, but you've got to understand that *most* of the people here just want to help, and I think in the long run you'll be happy with learning rsync. Like I said, I just use a minimum of its capabilities, but every new thing I learn is a complete joy. Take the time, ask for help, find the solution. It will be worth it.

[ Reply to This | # ]
How to use 'cp' as a simple but reliable backup tool
Authored by: zkarj on Feb 17, '10 06:36:38PM

Thanks for the thoughtful reply. I understand and appreciate your comments. As always, knowing exactly what to search for is the key. I had no idea, until now, that "local" had special meaning in rsync terms. :-)

[ Reply to This | # ]
How to use 'cp' as a simple but reliable backup tool
Authored by: Han Solo on Feb 20, '10 02:13:02PM
Could you please post as a hint your rsync solution to reconciling iTunes Libraries? It would be useful to know if you are, in fact, reconciling the songs/playcounts/ratings/playlists/etc. across multiple computers, or merely synchronizing the contents of the "iTunes Music" folders. In other words, suppose the metadata for song #1 was changed on computer A and for song #2 on computer B. Would your rsync command reflect those changes on both computers?

It also would be useful to know both the version of iTunes you are using and the version of rsync. Thanks!

[ Reply to This | # ]