---
title: "Backing up and exporting a database on your database server"
description: "Find out how to back up and export a database from your Web Cloud Databases server using the OVHcloud Control Panel or phpMyAdmin"
url: https://docs.ovhcloud.com/en/guides/web-cloud/databases/db-backup-export-database-server
lang: en
lastUpdated: 2026-06-08
---
# Backing up and exporting a database on your database server

## Objective

Your database can contain a large amount of essential information for your website. It is therefore vital to be able to back it up or export it.

**Find out how to back up and export your database from your database server.**

## Requirements

- A [Web Cloud Databases instance](https://www.ovhcloud.com/en-gb/web-cloud/databases/) (included in a [Web Hosting](https://www.ovhcloud.com/en-gb/web-hosting/) Performance, Agency, Agency Plus or Agency Max plan).


***

### OVHcloud Control Panel Access

- **Direct link:** <ManagerLink to="/#/web/web/private_database">Web Cloud Databases</ManagerLink>
- **Navigation path:** <code className="action">Web Cloud</code> > <code className="action">Web Cloud Databases</code> > Select your database service

***


## Instructions

:::info
[Web Cloud Databases](https://www.ovhcloud.com/en-gb/web-cloud/databases/) solutions do not provide access to the database management system itself, but to the databases hosted on it.

- There is no super user "root" access.
- Generic SQL commands work normally, and software such as HeidiSQL, SQuirreL SQL or Adminer is fully compatible.

:::

### Backing up and exporting a database from the Control Panel

:::info

- Backups are automatically performed once a day on all your databases.
- Automatic and manual backups are kept for 30 days. After this period, they are automatically deleted.

:::

#### Creating a manual backup

Click on the tabs below to view each of the **3** steps.


**Step 1**

Go to the <ManagerLink to="/#/web/web/private_database">Web Cloud Databases</ManagerLink> page, then select the solution concerned.
![Web Cloud Databases](/images/assets/screens/control-panel/product-selection/web-cloud/web-cloud-databases.png)

**Step 2**

Click on the <code className="action">Databases</code> tab.
In the **Backups** column, the number corresponds to the number of available backups for your database.


**Step 3**

Click the <code className="action">...</code> button to the right of the database, then on <code className="action">Back up now</code>.
![Web Cloud Databases](/images/assets/screens/control-panel/product-selection/web-cloud/web-cloud-databases/databases/back-up-now.png)

#### Exporting a backup

Click on the tabs below to view each of the **4** steps.


**Step 1**

Go to the <ManagerLink to="/#/web/web/private_database">Web Cloud Databases</ManagerLink> page, then select the solution concerned.
![Web Cloud Databases](/images/assets/screens/control-panel/product-selection/web-cloud/web-cloud-databases.png)

**Step 2**

Click on the <code className="action">Databases</code> tab.
In the **Backups** column, the number corresponds to the number of available backups for your database.


**Step 3**

Click the <code className="action">...</code> button to the right of the database, then on <code className="action">Show backups</code>.
![Web Cloud Databases](/images/assets/screens/control-panel/product-selection/web-cloud/web-cloud-databases/databases/show-backups.png)

**Step 4**

The list of available backups appears. Click the <code className="action">...</code> button to the right of the backup you want, then on <code className="action">Download the backup</code>.


### Backing up and exporting a database outside the Control Panel

If the available RAM on your server does not allow the desired export, use the OVHcloud tool in the Control Panel, which uses resources external to your plan. Refer to the section "[Backing up and exporting a database from the Control Panel](#backing-up-and-exporting-a-database-from-the-control-panel)" of this documentation.

**Click on the export method of your choice to view the content.**


Export a MySQL or MariaDB database from OVHcloud phpMyAdmin

To export your database directly from phpMyAdmin, first log in using the guide "[Connecting to a database](/en/guides/web-cloud/databases/db-connecting-database-server.md)".
Once logged in to phpMyAdmin, click on the name of the database you want to export, then on the <code className="action">Export</code> tab at the top.
There are two possible export modes. If you do not have a specific need, we recommend using the **quick** mode in **SQL** format.
![Web Cloud Databases](/images/assets/screens/other/web-tools/phpmyadmin/pma-export-backup-web-cloud-db.png)


Export a MySQL or MariaDB database via command line

```bash
mysqldump --host=server --user=user --port=port --password=password database_name > database_name.sql
```


Export a MySQL or MariaDB database from a PHP script

```php
1. <?php echo "Your database is being backed up.......";
2. system("mysqldump --host=server --user=user --port=port --password=password database_name > database_name.sql");
3. echo "Backup complete. You can retrieve the database via FTP";
4. ?>
```
:::warning
- To prevent third-party access to this file containing sensitive data, secure access to it using the guide: [How do I password-protect a directory?](/en/guides/web-cloud/web-hosting/htaccess-protect-directory-by-password.md)
- This action is only possible from an OVHcloud shared hosting plan.
:::


Export a PostgreSQL database via command line

```bash
pg_dump --host=server --port=port --user=user --password=password database_name > database_name.sql
```


Export a PostgreSQL database from a PHP script

```php
1. <?php echo "Your database is being backed up.......";
2. system("PGPASSWORD=password pg_dump --host=server --port=port --user=user --password=password database_name > database_name.sql");
3. echo "Backup complete. You can retrieve the database via FTP";
4. ?>
```
:::warning
- To prevent third-party access to this file containing sensitive data, secure access to it using the guide: [How do I password-protect a directory?](/en/guides/web-cloud/web-hosting/htaccess-protect-directory-by-password.md)
- This action is only possible from an OVHcloud shared hosting plan.
:::

## Go further

[Backing up and exporting a database from the Control Panel](#backing-up-and-exporting-a-database-from-the-control-panel)

For specialised services (SEO, development, etc.), contact [OVHcloud partners](https://partner.ovhcloud.com/en-gb/directory/).

If you would like assistance using and configuring your OVHcloud solutions, please refer to our [support offers](https://www.ovhcloud.com/en-gb/support-levels/).

Join our [community of users](https://community.ovhcloud.com/).
