How to backup iPhone 4S with illegal music on it?

ITunes won't let me backup my phone to the computer because I downloaded songs from YouTube onto it. Is there any way around this?

You can use some third party software like sharepod or yamipod to copy the songs from your iPhone 4s to computer first, then backup your iPhone and re-sync the songs back to your iPhone.

Why would you save music to a device you didn't know how to save music from? I never do that and I've still got the songs I downloaded over a decade ago. Just download them again from youtube to your computer.

iTunes doesn't back up music to a computer unless you bought it on iTunes. That's because the people who make iPods also sell music on iTunes.