I've got an 8GB 2nd gen iPod Touch that still has firmware 2.2.1 on it. Is there a way to safely upgrade it to 3.1.2 + jailbreak?

I accidentally upgraded my 16GB 2nd gen to iOS 4, thereby ruining my battery life. I'd like to make sure my 8GB stays on 3.1.2 to retain the amazing battery life.