A state machine and system for redundantly backing up data. A first
storage facility is controlled by a first state machine having a finite
number of states, each state having a set of allowed operations. The
first state machine includes at least one state for controlling the first
storage facility to operate as a primary storage facility for storing and
updating a primary copy of the data. A second storage facility is
controlled by a second state-machine that has least one state for
controlling the second storage facility to operate as a secondary storage
facility for storing redundant data. The second state machine also has at
least one state for controlling the second storage facility to operate as
the primary storage facility. The second storage facility assumes the
role of primary in response to a fault at the first storage facility or
based on the origin of request traffic. The first and second state
machines may also include states for responding to various fault
conditions and may include substantially the same states as the other.