[[run_diff]]
= Identify Changed Configuration Files
:description: How to identify changed configuration files during an OpenNMS Horizon or Meridian upgrade.

During an upgrade, {page-component-title} overwrites configuration files, so any customization you may have done will be lost.
You need to back up your customized configuration files so that you can merge them into your upgraded system.

Consider one of the following options to identify changed configuration files:

* <<config-diff, Run the config-diff.sh script>> to show which files have changed.
* Make the `$\{OPENNMS_HOME}/etc` folder a Git repository to track changes between versions (see xref:deployment:upgrade/git-diff.adoc[Manage Configuration Changes with Git]).

[[config-diff]]
== Run the config-diff.sh script

The `config-diff` tool identifies differences between the default {page-component-title} configuration and what you are running.
Identifying these differences helps you to determine what you need to migrate as part of an upgrade.

Run the `config-diff` tool in the `$\{OPENNMS_HOME}/bin` directory to determine changes from a pristine installation:

[source, console]
----
cd ${OPENNMS_HOME}/bin
./config-diff.sh -d
----

TIP: The `colordiff` command, available in Debian and Red Hat distributions, colors the output for better legibility of changes.

Note the following in the config-diff.sh output:

* Files you added
* Files you modified
* Files you deleted

Back up any files that were changed and added so that you can merge them later as part of the upgrade process.
Note any files that you have deleted so that you can remove them after the upgrade.