Any process in which an organism or cell protects itself from anoxia, which may also result in resistance to repeated exposure to anoxia.