# Upgrade and Maintenance

IONOS Cloud updates and patches your In-Memory DB instance to achieve high standards of functionality and security. This includes minor patches for In-Memory DB and patches for the underlying operating system. Generally, these updates are unnoticeable and do not interrupt your operation. However, occasionally, IONOS Cloud restarts your In-Memory DB instance to allow the changes to take effect.

## Prerequisites

* Prepare for a downtime during the version upgrade.
* Ensure the instance has enough available storage. While the upgrade is space-efficient (because it does not copy the data directory), some temporary data is written to the disk.

{% hint style="info" %}
**Note:**

* Updates to a new minor version are always backward compatible. Such updates are done during the maintenance window with no additional actions from your end.
* Failure to configure persistence for a single instance might result in data loss.
  {% endhint %}

Currently, IONOS Cloud DBaaS supports only minor version upgrades for In-Memory DB instances. Any changes that could cause service interruptions, such as version upgrades, are performed during a one-hour weekly maintenance window, which may result in brief connection interruptions. We recommend reconnecting to resume and complete any transactions that may have been affected during the maintenance window.

{% hint style="info" %}
**Note:** Maintenance operations are initiated during the scheduled one-hour weekly maintenance window, but the duration may extend depending on the task. For example, tasks such as data replication may require additional time.
{% endhint %}

You can configure a maintenance window during the In-Memory DB instance creation using the same API request. For more information, see [<mark style="color:blue;">Create an In-Memory DB Instance</mark>](https://docs.ionos.com/sections-test/guides/databases/in-memory-db/api-howtos/create-in-memory-db-instance). You can also configure one when you modify the existing In-Memory DB instance. For more information, see [<mark style="color:blue;">Modify an In-Memory DB Instance</mark>](https://docs.ionos.com/sections-test/guides/databases/in-memory-db/api-howtos/modify-in-memory-db-instance).

The following code schedules automatic maintenance every `Monday` at `16:30:59`:

```bash
"maintenanceWindow":{
         "time":"16:30:59",
         "dayOfTheWeek":"Monday"
      },
```
