Downloading past purchases from the App Store, iBookstore, and iTunes Store - http://support.apple.com/kb/ht2519 - enabled with iTunes 10.3 and newer; not available in all countries; apps, books (not audiobooks), music, t.v. shows, and movies (some - not all studios have permitted this). Movies currently available in the USA only. Downloading previously purchased movies and TV shows requires iTunes 10.6 or later. Discontinued items not available. For items not included in the iCloud list (e.g., ringtones), or locations or computer systems where iCloud is not (yet?) available, you only get one download per fee paid. Apple notes it is your responsibility to back up your purchases.
Select the store on the left side of iTunes.
Click on Purchased on the right side under Quick Links.
You can re-download your available previous purchases.
Otherwise:
Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer is designed with you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is purchased content.
iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
For transferring other items from an i-device to a computer you will probably have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
- Senuti - http://www.fadingred.com/senuti/
- Phoneview - http://www.ecamm.com/mac/phoneview/
- MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/ - Mac & Windows
- Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
- Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
- Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
- 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/thread/2452022?answerId=11624224022#11624224022 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
Additional information here https://discussions.apple.com/thread/3933661?answerId=18324797022#18324797022