Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuration history management

Two scripts are available for configdb commands can be used to manage configuration history management:

  • configdb _key_ history: this script command can be used to explore the configuration history of a certain device.  It takes a hutch, /alias and device as arguments (plus authentication information):
    /device or hutch/XPM/xpmname string as argument (plus all the usual configdb options: --user, --password, --url-, etc.). For example:
    configdb historypython configdb_key_history.py --user tmoopr --password pcds --hutch tmo --alias NOBEAM --device tmo/BEAM/hsd_0

    And The command returns a list of configurations for the specific hutch/alias/device , each with date (in UTC  time zone) and "key" entry. The "key" can be used to retrieve the specific configuration using the configdb _ rollback .py scriptcommand.

  • configdb _ rollback.py: this script command can be used to retrieve a specific device configuration , and , optionally, to make it the current configuration for the device. It takes a hutch, /alias and device (and authentication information) as arguments, plus a key defining a device configuration (see the configdb_key_history.py script above):
    python configdb_rollback.py/device or hutch/XPM/xpmname string as argument (plus all the usual configdb options: --user, --password, --url-, etc.). Additionally, it requires a --key argument. For example:
    configdb rollback --user tmoopr --password pcds --
    hutch
    key 266 tmo
    --alias NOBEAM --device
    /NOBEAM/hsd_0
    --key 266

    The command will not write the retrieved configuration to the database unless By default, the script just shows the configuration. However, when the --write -to-database option is used, the scripts write the retrieved configuration as the current configuration of the same hutch/alias/device.(it will just print it to the screen, together with a warning), so this command can also be used as a viewer for historical configurations (without the --write option)


Configuration History and Keys

...