> For the complete documentation index, see [llms.txt](https://docs.cloudassert.com/hybr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudassert.com/hybr/installation/updates/cost-management.md).

# Cost Management

### Backup the current version artifacts

* Stop the Cost Management agent service
* Take a back up of the Cost Management agent config file
  * File Path: C:\Program Files\CloudAssertCostManagement\CloudAssert.CostManagement.WindowsService\CloudAssert.CostManagement.WindowsService.exe.config
* Back up the Cost Management database

### Install the new build

* Uninstall the existing version of the Cost Management agent service
* Update the Cost Management Database using the Cost Management Tool. Make sure to update the connection string in tool web config before executing the update command

```
CloudAssert.CostManagement.Tool.exe UpdateDatabase
```

* Delete Staging tables - Execute the below SQL command against Cost Management Database

{% file src="/files/-MGo8vS4H84GsKk\_IOj-" %}
Staging Tables Reset Query
{% endfile %}

* Install the latest Cost Management agent service
* Stop the agent service
* Refer the previous version's agent config file and change the current one
* Start the agent service
