A method and apparatus is provided to restore the configuration of a
network device. A configuration manager in a network device saves a
version of the configuration of the network device by storing the
configuration data in an format that conforms to a standard markup
language such as the extended markup language (XML). The format includes
a sequence of corresponding tags and values that represent the content of
the internal data structures in the memory of the router that comprise
the saved version of the configuration. At the time of restoration, an
parser is used to parse the values from the tags and the configuration
manager restores the contents of the internal data structures in the
memory of the router to the parsed values in accordance with the
corresponding tags.