> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/databases/in-memory-db/overview/backup-recovery.md).

# Backup and Recovery

## How do backups work in In-Memory DB v2?

<code class="expression">space.vars.ionos\_cloud</code> DBaaS for In-Memory DB v2 replaces fixed daily backups with configurable snapshots. You can set:

* **Location:** The Object Storage region where snapshots are stored. For added data safety, use a location different from the cluster's own region.
* **Retention days:** The number of days snapshots are retained before being automatically deleted, from 1 to 365 days (default: 7). Reducing this value purges any existing snapshots that fall outside the new retention window.
* **Snapshot hours:** One or more hours of the day (UTC) at which snapshots are taken. At least one hour must be specified.

Snapshots can be used to restore an existing cluster to a previous point in time, or to initialize a new cluster with data from an existing snapshot during creation. For more information, see [<mark style="color:blue;">Restore an In-Memory DB Cluster</mark>](/cloud/databases/in-memory-db/how-tos/v2/restore-in-memory-db-cluster.md).

## How do backups work in In-Memory DB v1?

<code class="expression">space.vars.ionos\_cloud</code> DBaaS for In-Memory DB supports automatic backups. Automatic backups are created in either of the following instances:

* During the creation of an In-Memory DB instance.
* Upon upgrading the current version of In-Memory DB to a higher version.

<code class="expression">space.vars.ionos\_cloud</code> DBaaS performs automatic daily full backups of the In-Memory DB instances that run regularly at a specific hour based on the value set in the DBaaS component. It ensures that there is a backup available for each day. <code class="expression">space.vars.ionos\_cloud</code> maintains backups for the last seven days so that you can recover them for up to a week. For more information about backup restoration, see [<mark style="color:blue;">View individual cluster details and restore a backup</mark>](/cloud/databases/in-memory-db/how-tos/v1/view-in-memory-db-clusters.md#view-individual-cluster-details-and-restore-a-backup).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/databases/in-memory-db/overview/backup-recovery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
