# Backup & recovery

In the case of unintentional deletions, Backup & Recovery allows project admins to roll back their main environment to a previous working version within seconds.

## Overview

**Warning:**

**This feature is an addon for enterprise customers. [Contact sales to learn more](https://hygraph.com/contact)**

In the case of unintentional deletions, Backup & Recovery allows project admins to roll back their main environment to a previous working version within seconds.

## What you can do

- Automatic daily backup of a project's `master` environment, with up to a 7-day retention period.
- Easy recovery for project admins in case of accidental deletions.
- Recovery within seconds to a previous backup as a new environment that you can promote.
- Backups contain content, assets & schema.

## Backup creation

When the feature is enabled, backups are created automatically every day, during non-working hours, and kept for up to 7 days.

Project admins can see the next scheduled backup date & time, and the general retention. We also show the list of all available backups:

![Clone settings](https://hygraph.com/images/docs/user-guides/project-guides/backups-list.png)

## Recover backup

Click `Recover backup` on one of the backup cards to start the process:

![Recover backup](https://hygraph.com/images/docs/user-guides/project-guides/backups-recover.png)

A modal with two selection options will display:

### Recover backup only

![Recover backup only](https://hygraph.com/images/docs/user-guides/project-guides/recover-backup-only.png)

The `Recover backup only` option creates a new environment from the backups.

### Recover backup & promote to master

The `Recover backup & promote to master` option turns the backup into a normal environment and promotes that to master.

The backup replaces the old master environment.

![Recover backup & promote to master](https://hygraph.com/images/docs/user-guides/project-guides/recover-backup-and-promote.png)

If you select this option, you must also choose a name for the demoted master environment, [like in our normal promotion flow](https://hygraph.com/docs/developer-guides/project/manage-project-environments#promote-environments-to-master). 

This process will only take a few seconds.

#### Asset URLs change

Since backups are created as a new environment, the asset URLs will be different. Make sure to check for asset URLs stored in other places, such as source code or external systems.

Please note that, while in the past every single handle would have been updated, with the new asset system only the base URL changes on cloned environments.

**Old URL change behavior:**

Original asset URL:

`https://media.graphassets.com/6gB5FZ9mQiWHOu6Lt95p`

Asset URL after backup:

`https://media.graphassets.com/<random new handle>`

With the new **Hygraph Asset Management System**, the following asset URL:

```
https://eu-west-2.graphassets.com/cm1q9b9c401cv07ut4wcgf2uj/cm2kmqsf6002a07ukg3z7sjzg
```

Would turn into something like this:

```
https://eu-west-2.graphassets.com/<new asset env id>/cm2kmqsf6002a07ukg3z7sjzg
```

Since the asset ID remains the same, you can simply run a search for the old asset environment ID and replace it with the new one.
