I believe oxygen is the most important factor for short term survival of beneficial bacteria. In previous threads about the viability of bacteria sold on shelves in bottles I have suggested doing a simple experiment. Take a some of your viable active bio-media (eg: k1 media) and place it in an "open" bucket with or without and also take an equal amount and place it in a with an air tight lid. Put the buckets in the shade somewhere for 24 hours and come back and smell the contents. The bucket exposed to the air (oxygen) will probably smell the same as when you put it in there (a light fishy smell), but the sealed bucket will smell horrible. It will have that rotten eggs smell (hydrogen sulfide H2S) because the "beneficial" bacteria in the bucket will have used up all the oxygen and in the absence of oxygen the anaerobic bacteria present will be able to thrive and begin to eat what ever available food source there is which will be the "beneficial" bacteria. As the anaerobic bacteria consume and grow they produce hydrogen sulfide as a byproduct which is responsible for the rotten egg smell.
It's a simple experiment and can be done even with a small amount of media in a small jar or plastic container as long as it has a tight fitting lid. The time period for the bacteria change will depend on a number of things, temperature being paramount. If you put the container in your fridge or a cool place all the bacteria metabolism's will slow down and the beneficial bacteria won't use up the oxygen as quickly, and as long as there is some oxygen present the anaerobic bacteria won't grow. Interestingly though, they will still continue to be present in a dormant state waiting for the opportunity when there is no longer any oxygen and they can begin to grow. Same thing happens with the beneficial bacteria. Even after you've sealed the container and the anaerobic bacteria have taken over there will still be plenty of viable aerobic bacteria (beneficial bacteria) left in a dormant state and would begin to reverse the process as soon as you start to reintroduce oxygen into the environment. It's pretty hard to actually kill off all of one type of bacteria or the other without kill off all the bacteria, which could easily be done with high heat, chemicals like bleach or using UV light.
Anyway, I'm rambling, but this thread got me thinking about the viability of beneficial bacteria and how some people believe that if you turn off your pump for a day it will kill off all the beneficial bacteria on your bio-filter media, but then they also believe that same bacteria can thrive for months in an airtight bottle on a store shelf somewhere.