How to backup an iPhone, and restore it, with no side effects? I need to restore my iPhone in order for my phone's carrier unlock to go through. What is the best method to do this?

At the end of the restore process, I want the phone to be exactly the same as it was before the restore process (i.e. apps, app data, pictures, etc. should all be restored), without any unintended side effects (I will get to this in a moment). It's okay if minor things are different, such as having to reenter usernames and passwords, but all the apps/data must be restored.

It's my understanding that the simplest solution is to create an iCloud backup (assuming you have enough space), erase the phone, then restore from iCloud. Although I will have to wait for all the apps to be redownloaded, this will preserve everything on my phone, and not have any unintended side effects.

The problem is that I have more data on my phone than can be backed up to iCloud using the free account (5GB), so I am looking for an alternative solution.

By unintended side effects, I am referring to something that changes and may cause me trouble in the future. For example, if I recall correctly, when I choose to sync a phone to a particular computer, it will forever be tied with that computer, and I will not be able to sync with another one unless I erase all of the data first. I don't want this. This violates my requirement that everything be the same as it was before the restore, because now my phone is locked to a computer, a side effect I clearly didn't have before I started the restore process.

In your solution, please list any shortcomings and/or side effects that might arise.
You can use a computer for backup. It only ties for that computer in regards of music and video content. If you want to sync it to another iTunes library at a later point, the music that was synced from that computer will be deleted. This is not the case for tracks bought in iTunes if that device is activated for that account, or if you're using iTunes match.

If you use the computer, you can choose to encrypt the backup, that way the passwords (for networks and whatnot) will be backed up and restored as well.

As a side note, it doesn't seem usual to me that you need to restore the phone for the unlock to take place. It usually is enough to connect it to a computer with iTunes open.