We study the dynamics of the entanglement between two oscillators that are initially prepared in a general two-mode Gaussian state and evolve while coupled to the same environment. In a previous paper we showed that there are three qualitatively different dynamical phases for the entanglement in the long time limit: sudden death, sudden death and revival and no-sudden death [Paz & Roncaglia, Phys. Rev. Lett. 100, 220401 (2008)]. Here we generalize and extend those results along several directions: We analyze the fate of entanglement for an environment with a general spectral density providing a complete characterization of the corresponding phase diagrams for ohmic and sub--ohmic environments (we also analyze the super-ohmic case showing that for such environment the expected behavior is rather different). We also generalize previous studies by considering two different models for the interaction between the system and the environment (first we analyze the case when the coupling is through position and then we examine the case where the coupling is symmetric in position and momentum). Finally, we analyze (both numerically and analytically) the case of non-resonant oscillators. In that case we show that the final entanglement is independent of the initial state and may be non-zero at very low temperatures. We provide a natural interpretation of our results in terms of a simple quantum optics model.