# How Configuration Changes are Saved and Deployed

The Central Administration server stores configuration files for each EMS server it manages in two directories:

- The working directory stores the last read configuration from the EMS server. It also stores the lock file, which contains the edits being made by a user to a server configuration.
- The deployment directory contains details on each deployment of the EMS server. This directory contains only records of configuration files that have already been deployed using Central Administration.

All commands issued through the Central Administration web interface modify the server configuration files in these two directories. The figure below shows which files are modified for each action performed through the Central Administration web interface:

- Lock & Edit enables the user to make changes to the configuration. As the user edits the configuration, the edits are saved in the lock file.
- Save saves configuration changes made to the EMS server through the web interface to the lock file. Note that changes are also automatically saved at regular intervals, even if the user does not click Save.
- Deploy takes the configuration lock file from the working directory, and deploys it to the EMS server. If the deployment succeeds, the lock file is copied to the deployment directory for the current deployment and to the working file for the EMS server.

  If deployment fails, the lock file is not copied to the deployment directory. It remains in the working directory and can be further edited and redeployed, or the lock can be reverted and changes discarded.

  Note that the EMS server keeps a copy of the previous JSON configuration file upon receiving a deployment from the Central Administration server. When the deployment is successful, the previous configuration is kept in a file of the same name as the current configuration with an additional `.bak` suffix. For example, `tibemsd.json.bak`. During subsequent deployments, the backup file is overwritten.

- Refresh causes the Central Administration server to retrieve the currently deployed configuration file from the running EMS server, and save that file in the working directory. This is the only way to obtain configuration changes made directly to the EMS server. (That is, changes that were not made through Central Administration.)

Copyright © Cloud Software Group, Inc. All rights reserved.