> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/platform-self-hosted/collibra-platform-self-hosted-installation-and-upgrade/upgrade-to-collibra-platform-self-hosted/prepare-your-environment-for-upgrade.md).

# Prepare your environment for upgrade

If your environment has repo clusters, you need to prepare it before upgrading to CPSH.

## Prerequisites

* You have downloaded the Collibra Platform Self-Hosted [installer](https://productresources.collibra.com/downloads/) on all nodes of your environment.
* The status of your repository is green or orange. If the status of the repository is Red, do not start the upgrade procedure but contact Collibra Support.

## Steps

{% stepper %}
{% step %}
Open Collibra Console with a user profile that has at least the **ADMIN** role.\ <i class="fa-chevrons-right">:chevrons-right:</i> Collibra Console opens with the **Infrastructure** page.
{% endstep %}

{% step %}

<details>

<summary>Create an export file.</summary>

{% stepper %}
{% step %}
In the main menu, click **Console Export Files**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The Console Export Files page appears.
{% endstep %}

{% step %}
In the upper right corner, click **Create Console Export File**.

{% hint style="info" %}
If you have one or more Edge sites in this CPSH environment, you need to create a backup for each Edge site.
{% endhint %}
{% endstep %}

{% step %}
Enter the required information.

<table><thead><tr><th width="152">Option</th><th>Description</th></tr></thead><tbody><tr><td>Environment</td><td>The CPSH environment for which to create an export file.</td></tr><tr><td>Include</td><td>You can create a full export file by selecting all of the options or a partial file by excluding some of the options.</td></tr><tr><td>Data</td><td>The core database data of the CPSH environment. This encompasses all data related to communities, domains, assets, users, operating model, and similar objects.</td></tr><tr><td>History</td><td><p>Data activity and snapshot-related information. This can result in a very large file, depending on the activity in CPSH.</p><p>If you exclude the data history when creating an export file, you export a subset of the database content. This results in a much smaller file that still provides a complete picture of the current content. This is useful when attaching a backup to a technical support ticket, allowing support to reproduce a problem.</p><div data-gb-custom-block data-tag="hint" data-style="danger" class="hint hint-danger"><p>If you apply an export file from a 5.7.x version or older without history, the data quality metrics do not work correctly. To resolve this issue, apply the file in your latest environment, upgrade the data, create a new export file, and apply the new file in the same environment.</p></div></td></tr><tr><td>Configuration</td><td>The Data Governance Center service configuration options.</td></tr><tr><td>Customizations</td><td><p>Customization files such as custom modules, styling, page definitions, and email templates.</p><p>This includes files that are located in the Collibra user home directory and files that are used to customize the CPSH environment (<strong>/opt/collibra_data/console/config</strong>), such as the ones in:</p><ul><li>email-templates</li><li>groovy-lib</li><li>images</li><li><strong>page-definitions</strong></li><li>security</li><li>styling</li><li>translations</li><li>modules (if available)</li></ul></td></tr><tr><td>Name</td><td><p>The name of the file. You can only use the following characters in the export file name:</p><ul><li>Letters</li><li>Numbers</li><li>Hyphen <code>-</code></li><li>Underscore <code>_</code></li><li>Period <code>.</code></li></ul></td></tr><tr><td>Description</td><td><p>The description of the export file. You can only use the following characters in the description:</p><ul><li>Letters</li><li>Numbers</li><li>Hyphen <code>-</code></li><li>Underscore <code>_</code></li><li>Period <code>.</code></li></ul></td></tr><tr><td>Retain for</td><td><p>The retention period for the export file, after which the file is automatically removed:</p><ul><li>7 days</li><li>30 days</li><li>60 days</li><li>Indefinite (default)</li></ul></td></tr></tbody></table>
{% endstep %}

{% step %}
Click **Create Export File**.\ <i class="fa-chevrons-right">:chevrons-right:</i> A dialog box with a progress bar is displayed. You can let the export continue in the background.
{% endstep %}
{% endstepper %}

</details>
{% endstep %}

{% step %}
On the Infrastructure page, click the environment that you want to stop.
{% endstep %}

{% step %}
Click <img src="https://2506952333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyaPea5X9i57QjtoviPeO%2Fuploads%2Fgit-blob-09a4638dac00a335d1890f1cdcca14f5d384c830%2Fone-column%402x.png?alt=media" alt="" data-size="line">**Stop**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Stop environment** dialog box appears.
{% endstep %}

{% step %}
Click **Stop environment**.\ <i class="fa-chevrons-right">:chevrons-right:</i> All services in the environment are stopped.
{% endstep %}

{% step %}
When all services are stopped, delete all secondary \[replica] repo services from the repository cluster.
{% endstep %}

{% step %}
[Start](https://productresources.collibra.com/docs/collibra/latest/Default.htm#cshid=DOC1616) all repo services that were used as replica.
{% endstep %}

{% step %}
[Stop](https://productresources.collibra.com/docs/collibra/latest/Default.htm#cshid=DOC1622) all repo services again.
{% endstep %}
{% endstepper %}
