You should be able to copy iTunes purchases over File > Devices > Transfer Purchases. For music from other sources (e.g. copies from CDs) then if you don't them on a backup that you can copy onto your computer then there are some programs listed half-way down this page which should be able to copy them back (you can't do it via home sharing) : https://discussions.apple.com/docs/DOC-3991
This site contains user submitted content, comments and opinions and is for informational purposes only.
Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site.