For detection (PCR, sequencing etc) it will be fine for years at -20C and indefinitely at -80C.
For isolation, it is best to process material immediately. If this is not possible then storage at -80C should be fine but I wouldn't recommend -20C (that said it has worked previously)