I have done RNA isolation from bacterial cell cultures. We normally keep bacterial cell pellets dissolved in Trizol for several months at -80 C. For DNA, I feel you can keep up for years also.
Actually I'll say freezing DNA in TRIzol itself is not recommended as it can cause degradation of the DNA. But according to the TRIzol manufacturer's protocol, DNA can be stored in the interphase/organic phase (after TRIzol extraction) at -20°C or -80°C for long-term storage.