See the bold at the end of the post for a short answer.
Looked this up a while ago out of curiosity....it's convoluted but I'll explain to the best of my knowledge. Some of this is is from the internet, some from school...all kinda blurry so it could be wrong.
Simply put, it varies from country to country, although I believe that in the the United States it is no longer legal to do so....sort of. Traditionally in North America, first-sale doctrine basically gave you free reign do do whatever you wanted with your property as long as you didn't directly violate the copyright holder's rights. This means you can lend the CD out to a friend, give it away,even play it in your own home when having a party...and if a guest wants to buy your copy off you, you can sell it! first-sale, however, did have one little catch....it didn't give you a right to make any copies. That is, after all, exactly what owning a copyright was all about. Now, I don't know if first-sale explicitly stated that copies couldn't be made or if it just didn't cover it and common law kind of decided it that way. I really have no idea as when I studied first-sale, it was in completely different context.
Fair use is also involved, but it is also really convoluted and there's a lot of misinformation out there, but it basically says that there are certain things that limit copyrights. Generally, it usually depends on profit-motivation, societal benefit, market impact, and some other stuff. So, if you're a teacher writing an exam, you can use a quote from Watership Down in a question without fear of being sued. As far as I know, fair use isn't a hard set of rules, but rather based on a common law set of principles and judicial discretion. Fair use was cited in the famous lawsuit where it was deemed legal to record television shows for private use.
Through a combination of these two base principles of consumer protectionism in copyright law there was a period where yes, you were completely entitled to make copies of pretty much anything you owned as long as you did not distribute them in any way shape or form. You could, of course, still lend your CD out to a buddy, you just couldn't lend it out and still use your backup (I don't think). Generally, first-sale is pretty fucking cut and dry, but fair use is complicated and vague. There's a lot of good arguments for things being fair use and there's been a lot of courts contradicting each other on whether or not they actually are.
So, all gravy eh? Nope....lobbyists are smart and tricky. The DMCA fucked it up for you guys, and new copy right laws are soon going to fuck it up for us. I don't know the exact legal reason or the extent of precedent that has been set, but apparently, the DMCA actually made circumventing copy protection a crime. So, regardless of whether or not you're entitled to have a backup of your property, if copy protection had to be circumvented in order to make that backup, it's technically illegal.
That leaves a lot of questions. If you download the copy and don't circumvent the protection yourself, are you still responsible? Does the DMCA make the actual backups themselves illegal or just the process of making them? I'm sure someone knows answers, but I don't.
The DMCA is bullshit, but not as bad as how they try to get around first-sale by throwing around "licences" instead of actual goods.
It depends what you're copying and you'd probably have to go to court to actually find out in any specific instance.....or at least hire a lawyer.
You are, however justifying in doing what you said, so go ahead.