Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself independently backed up against loss. To use a device with a different setup you transfer the old library from a computer or a backup directly to the new setup, not the device to the library. Media 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 iTunes Store purchases which can be transferred to a computer.
iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
For transferring other items from an i-device to a computer you will have to use third party commercial software. See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991 Even this method may not fully recover what you had in the library originally. For example, if you had converted music files to a lower bitrate, or photos to a lower resolution, in order to save space it is those lower quality files you will recover.
The best solution, as indicated in another post, is to transfer the entire library intact from the old computer to the new one.