Some bacterial cells tide over unfavorable conditions by forming endospores.
During this process, a portion of the cytoplasm and a copy of the bacterial chromosome undergo dehydration and get surrounded by a three-layered covering.
The resulting structure, called endospore can tolerate extreme environmental conditions and can remain viable for several years.
When the environmental conditions are suitable, the endospore absorbs water, swells and the wall splits, releasing the cell inside. It develops a new cell wall and starts functioning as a typical bacterial cell.