As cthulukitty pointed out, how you deal with this depends on whether you have a Mac or a PC. It's easier on a Mac, but doable on a PC. I've never had to deal with it myself, but I know others who have, successfully.
As far as charging the iPod goes, if you aren't charging on the same computer that the iPod is syncing with, there shouldn't be a problem of losing the music, since the computer shouldn't sync a "strange" iPod. A wall charger would be another option. Changing the settings on the computer, as cthulukitty suggested, would also prevent a problem with losing the music.
If you have a PC, you will have to buy a program to restore the music from the iPod to the computer. There are sites where you can get suggestions about what programs to use, and some computer stores will have personnel who are well informed on stuff like this. You will want to read the reviews of any program you buy, before you buy it, so you have a sense of the ease of use and the quality of the program.