# OVH

How to back up and restore OVH managed databases via SimpleBackups.

OVH offers managed database clusters under its Public Cloud offering, supporting MySQL, PostgreSQL, Redis, and MongoDB. Connecting an OVH database to SimpleBackups requires configuring authorized IPs, copying your connection credentials, and optionally providing a CA certificate. SimpleBackups also supports automatic discovery through the OVH API. This guide covers both approaches.

## Connecting your database

### Step 1: Configure IP filtering

1. Log in to your OVH account and navigate to the databases section under **Public Cloud**.

![OVH Public Cloud databases section](https://simplebackups.com/docs/docs-assets/media-helpkit-co/e09d485c2d64098912d1.png)

2. Select the database you want to back up.
3. Go to the **Authorised IPs** section.
4. Add the [SimpleBackups IP addresses](https://simplebackups.com/docs/help-tips-and-troubleshooting/connecting-a-server/simplebackups-ip-addresses-firewall) to the allowlist.

![OVH authorised IPs section](https://simplebackups.com/docs/docs-assets/media-helpkit-co/c5c4ba6eec29fb443809.png)

![OVH IP address entry form](https://simplebackups.com/docs/docs-assets/media-helpkit-co/66d0cccb267f8ca054f1.png)

### Step 2: Copy your connection credentials

1. Navigate to the **Login Information** section.
2. Copy the connection details or the full service URI.
3. Download the **CA Certificate**.
4. From the **Users** tab, retrieve user details or reset the user password if needed.

![OVH login information section showing connection details](https://simplebackups.com/docs/docs-assets/media-helpkit-co/d77622ecb3319b3bc17f.png)

![OVH users tab](https://simplebackups.com/docs/docs-assets/media-helpkit-co/ac3666aeec5dc7003f0a.png)

### Step 3: Set up a database backup in SimpleBackups

Navigate to creating a new database backup and choose **Serverless**. You can connect using either manual form fill or automatic import:

**Manual connection**

Select the database **Type** and fill in the connection details, or click **Paste connection string** and enter the full service URI.

![SimpleBackups database connection form with manual fields for OVH](https://simplebackups.com/docs/docs-assets/media-helpkit-co/e9831dffa55761aa14df.png)

**Automatic import via DBaaS provider**

1. Click **Connect your DBaaS Provider**.
2. Choose an **OVH** provider.
3. Select the managed database you want to back up.
4. Click **Validate**.

![SimpleBackups DBaaS provider selection for OVH](https://simplebackups.com/docs/docs-assets/media-helpkit-co/e296b6a42e401c257839.png)

For both methods, under **Certificate / TLS**, select **REQUIRED** mode and paste the CA certificate you downloaded.

![SimpleBackups TLS certificate configuration for OVH](https://simplebackups.com/docs/docs-assets/media-helpkit-co/7435e30966505c77ece2.png)

### Step 4: Validate and activate

Click **Validate connection** to confirm that SimpleBackups can reach your database. Once validated, configure your schedule and activate the backup.

## Restoring a backup

To restore a backup, navigate to your backup page and open the **Logs** tab. Click the detail icon on the backup you want to restore from, then open the **Restore** tab. Generate a download link and copy it.

![OVH backup logs tab](https://simplebackups.com/docs/docs-assets/media-helpkit-co/fdc0b70812ab1a050874.png)

![OVH backup detail view](https://simplebackups.com/docs/docs-assets/media-helpkit-co/4f3dcb6e45839adba466.png)

![OVH restore tab with download link](https://simplebackups.com/docs/docs-assets/media-helpkit-co/69c0ea465a6961c5da5d.png)

Run the following command to download and decompress your backup (replace the URL with your signed download link):

```bash
wget -O - "<signed-download-url>" | gunzip -c > backup.pgsql
```

Then restore using `pg_restore`, replacing `<your-database-uri>` with your full database connection string:

```bash
pg_restore -d "<your-database-uri>" ./backup.pgsql
```

**Tip:**
Use the latest version of `pg_restore` to avoid compatibility issues during restore.
