I would backup to DVDs, or to a portable HDD.
To back up to a portable HDD, go into your "Music" folder, and copy the "iTunes" folder. Paste it on the other HDD and it should copy all contents of your iTunes library
Otherwise, you'll need to backup to DVD, and preserve the library. What I did was:
-Create Playlists in iTunes, and dragged a range of artists into it (ex: Artists A-D) If the total size of all that music was around or just over 3GB, I wrote that down in a text file for reference. Disc 1 - A - D.
-Once I determined the correct amounts of music to put on each DVD, I created burn folders for each one naming them accordingly. "Music A-D" "Music E-G" etc...
I navigate to Music/iTunes/iTunes Music and select all artist folders from A-D, and drag it to the correct burn folder. I continue until all my music is ready to be backed up. Be careful when selecting artist folders in "P" or "M", because iTunes holds all podcasts in a folder named "Podcasts" which lies within the "iTunes Music" folder. The same goes for "Movies"
If you have movies or podcasts, I suggest you back those up separately.
Now. I insert my 4.5GB DVDs and begin burning each burn folder to disc. You may wonder why if I have 4.5GB DVDs, then why don't I use the full space so it doesn't take 6 DVDs for music alone. The answer is simple. I keep that text file for reference when I back up music, and if I were to add more music to a certain range, it would throw the discs off. I keep extra space on the DVDs so that more music can be added to it in the future, and I won't have to do all the size determining next time.
Now the most important part. You have backed up the music, now you need to step back and burn the folder named "iTunes".
Music/iTunes/
-Remember not to select the "iTunes Music" folder when you burn the contents of this folder. This has already been done in chunks.
Burn the library files and you're all set.
Copy everything back the way it was prior to burning it after you format. Open iTunes, and it will read the library file that you placed in it's default directory. All playlists, songs, artwork, everything -- it will all be intact.
This means to go into your "iTunes" folder, and replace everything there with the burned copies. Then select the "iTunes Music" folder and copy the artist folders back in there.