How to completely backup my iphone?

My iphone 5 has a defect so I have to take it to the Apple store tomorrow to get it replaced. However, I don't want to lose all the stuff i have on it (music, apps, photos/albums, contacts).Is there anyway to completely back all this stuff up? The music on my iphone is not exactly what I have on my itunes so is that a problem?

You can back your stuff up to iCloud or iTunes. Just put the music into your iTunes and then back everything up before sending it back to Apple. Then you should be good to go. Hope this helped.

PS: To send the music to your iTunes, go to your iTunes folder, go to iTunes media and then put your music into the automatically send to iTunes folder. After that, open iTunes and then the music should be there.

If it's in your phone, then plug your phone into the USB port and then iTunes will and should automatically update the playlists.

Yes, you can do so by using iCloud. It will back everything up, EVERYTHING! It also will do automatic backups every now and again once you have it set up, so you'll always be good to go! Here's how to set it up so it can back up your phone:

1. Open Settings on your iPhone.
2. Scroll down until you find iCloud, and then tap iCloud.
3. Turn on iCloud and enter all the things it asks you to enter.
Now you're all backed up! Once you get your new iPhone here's what you'll need to do:
1. When you turn your iPhone on for the first time it asks you to set it up, there will be an option for iCloud. Choose the option that says you have an account, and then log into the account and everything will download onto your new iPhone.
2. Enjoy your new iPhone.

Good luck! I hope I was able to answer your question to the best of my ability.