> For the complete documentation index, see [llms.txt](https://docs.vega365.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vega365.com/xport/user-manual/upgrade-everything-workflow/step-by-step-user-guide/media-migration/re-hydrate-media-content-and-rebuild-the-media-database.md).

# Re-Hydrate Media Content and Rebuild the Media Database

Connect copied media to the destination media database

Now that all media content has been copied to the destination disks, we need to connect these to the respective recorder media databases.

{% hint style="success" %}
Steps for one of these destination recorders are listed below. The XPort program's wizard walks one through these steps for each destination recorder that receives media content.
{% endhint %}

{% stepper %}
{% step %}

### Begin

<figure><img src="https://771655570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fxj7X0c61rEOwTqSjg2jo%2Fuploads%2FobPyXQXT9v6IFHbxpTfb%2Fhydrate_begin.png?alt=media&amp;token=34593886-f89c-4999-890c-34c94c59e3cf" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Copy the generated program to the destination recorder indicated

The hydration program is specific to each destination recorder. Copy to the destination indicated by XPort. *It does not function on other destination recorders.*

<figure><img src="https://771655570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fxj7X0c61rEOwTqSjg2jo%2Fuploads%2FwQHSjNolceWLb75Uprl0%2Fcopy_hydrate_program.png?alt=media&amp;token=18c51bf5-965c-4b4d-8067-bf1616919f54" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Extract and Run

The process turns off the recording server service at the destination recorder before reconnecting media to the destination media database.

{% hint style="warning" %}
New video from cameras is not recorded on this recorder until the rehydration by XPort and subsequent media database rebuild (performed by the Milestone Recording Server Service) is complete.&#x20;
{% endhint %}

{% embed url="<https://youtu.be/sPks_ylUVmA>" %}
{% endstep %}

{% step %}

### Wait for rehydration to complete

{% hint style="info" %}
The time taken for this step depends on the size of the media database that needs to be reconnected. A 41TB database could take up to two hours on some servers.
{% endhint %}

After completion, one must see the command window as below, with a completion message.

<figure><img src="https://771655570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fxj7X0c61rEOwTqSjg2jo%2Fuploads%2F9xC9RZDr4G7rFLqR1w3j%2Fmedia_database_rebuild_done.png?alt=media&amp;token=98205d92-296c-4e30-bf5a-838a42daa603" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Media Database Rebuild

The XPort program begins the recording server service at the end of the rehydration process. When it starts, the recording server service detects changes in its media database and initiates an automatic rebuild of the media database. XPort displays a window showing the recording server status messages to monitor the completion of the rebuild process. Once finished, the highlighted image below should be visible, and the service must be in the "Running" state.

{% hint style="warning" %}
Media database rebuild could take as long as database rehydration on some systems.
{% endhint %}

<figure><img src="https://771655570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fxj7X0c61rEOwTqSjg2jo%2Fuploads%2FmDiq3cOS5yOs53vl9sM8%2Fmedia_database_rebuild.png?alt=media&amp;token=fccbd15b-ec4c-4157-8c4b-6cf3769e4033" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Repeat for other recorders that received content

The XPort program's wizard walks one through these steps for each destination recorder that receives media content.
{% endstep %}
{% endstepper %}

Then, click "**>"** in the Wizard to continue.
