title | excerpt | updated |
---|---|---|
Duplicating the contents of one database to another |
Find out how to duplicate the content of an OVHcloud database into another OVHcloud database |
2025-02-20 |
Your database is a central part of building your dynamic website. During the life cycle of your website, for practical or technical reasons, you may copy the content of one database to a Start SQL or Web Cloud Databases.
This guide explains how to duplicate the content of an OVHcloud database into another OVHcloud database.
[!primary]
With this feature, databases are not moved but copied. This is because the original database is not deleted automatically, as is the case with a migration process. Only the contents of the source database are duplicated for copying to the destination database.
- You are using a Start SQL and/or Web Cloud Databases solution. The two databases concerned must be created beforehand in order to use the replication tool.
- You have access to the OVHcloud Control Panel.
- You have sufficient rights to all database services concerned. You can find more information in our guide Managing contacts for your services.
Before you begin, make sure that:
- Your Database Management System (MySQL, PostgreSQL, etc.) is the same for your two databases (source and destination).
- The version of your DBMS is the same for both your databases (source and destination). Although the duplication may work with different versions, it is recommended that you use the same versions.
- The contents of the source database must not exceed the size of the destination database.
This feature is available for:
- A Start SQL database (included in some of our web hostings or ordered separately).
- A database hosted on a Web Cloud Databases server (included with our Performance web hosting or ordered separately).
Depending on your situation, the path to your source database is different.
Click on the tabs below to view each of the 4 steps.
[!tabs] Step 1
Log in to the OVHcloud Control Panel, then go to the
Web Cloud
{.action} section.Step 2
Click the
Hosting plans
{.action} menu, then select the Web Hosting plan concerned.Step 3
On the page that pops up, click on the
Databases
{.action} tab.Step 4
You will see a list of your Start SQL databases.
Click on the tabs below to view each of the 3 steps.
[!tabs] Step 1
Log in to the OVHcloud Control Panel, then go to the
Web Cloud
{.action} section.Step 2
Click the
Web Cloud Databases
{.action} menu, then choose the Web Cloud Databases solution concerned.Step 3
By clicking on the
Databases
{.action} tab, you will see a list of the databases on your Web Cloud Databases server.
In the Databases
{.action} tab, regardless of your solution, click the ...
{.action} button to the right of the row of the database you want to duplicate, then select Copy database
{.action}.
A window will pop up to identify your destination database.
If you do not have a destination database, click on the link to purchase a new database as shown in the screenshot below.
You can choose between a Start SQL solution, or a Web Cloud Databases server.
[!primary]
When you purchase your new database, it is not activated by default. To enable it, log in to your OVHcloud Control Panel and go to the
Web Cloud
{.action} section.
- For a Shared SQL database: Follow our guide on Creating a database on your Web Hosting plan.
- For a database on a Web Cloud Databases server: Follow our guide Creating a database on a Web Cloud Databases server.
If you already have a destination database, first choose its type:
-Copy to database
{.action}: If you want to copy the contents of your source database to a Start SQL database.
-Copy to a Web Cloud Databases
{.action}: If you want to copy the content from your source database to a Web Cloud Databases database.
You have selected Copy to database
{.action}. Two drop-down lists appear. Click the first button, then select the web hosting plan of your destination Start SQL database. Once you have selected a web hosting plan, click on the second drop-down list to choose the destination Start SQL database.
Click Next
{.action}. The following confirmation message is displayed:
If you do not want to overwrite the destination database you have chosen, click Back
{.action} to change your choice, or Cancel
{.action} to cancel everything. Otherwise, click Confirm
{.action} to confirm that you want to duplicate the contents of the source database to the destination database.
The following confirmation message is displayed:
It may take several minutes to copy the database. To check the progress, go to the Ongoing tasks
{.action} tab. In the table, a new row will appear for your copy with a status of "scheduled". Once the operation is complete, the line disappears.
You have selected Copy to a Web Cloud Databases
{.action}. Two drop-down lists appear. Click on the first link, then select the Web Cloud Databases solution that your destination database is based on. Once you have selected the Web Cloud Databases solution, click on the second drop-down list to choose the destination database on your Web Cloud Databases server.
Click Next
{.action}. The following confirmation message is displayed:
If you do not want to overwrite the destination database you have chosen, click Back
{.action} to change your choice, or Cancel
{.action} to cancel everything. Otherwise, click Confirm
{.action} to confirm that you want to duplicate the contents of the source database to the destination database.
It may take several minutes to copy the database. To check the progress, go to the Ongoing tasks
{.action} tab. In the table, a new row will appear for your copy with a status of "scheduled". Once the operation is complete, the line disappears.
Once you have made a copy of your source database, you will need to take a final action if you want to use your new database.
In the Ongoing tasks
{.action} tab, ensure that the duplication is complete (the line corresponding to your copy has disappeared).
To connect the new database to your website, edit the configuration file for your Content Management System (CMS) and enter the connection information for the new database.
Warning
It is recommended that you make a copy of your website’s configuration file before editing it. This ensures that you can replace the new version of the file with the old one if your configuration fails.
For example, if you use WordPress, you will need to modify the wp-config.php configuration file in the root folder of your WordPress application, in your hosting plan’s storage space (FTP), then update the following fields:
- DB_NAME
- DB_USER
- DB_PASSWORD
- DB_HOST
For more details, or if you are using another CMS, please refer to our guide on Changing the password for a web hosting plan database.
[!primary]
Copying your database is not a migration. Your source database still exists until you delete it. This way, you can still reconfigure your website with its old database if necessary.
During the process of copying the contents of the database, you may encounter difficulties.
This means that you only have one active database. To copy your source database, you also need an active destination database. To do this, you can:
- Configure a new database available on your Web Hosting plan.
- Configure a new database on your Web Cloud Databases server.
- Order a Start SQL solution or a Web Cloud Databases database server.
This message means that a task is already in progress on your database. Go to the Ongoing tasks
{.action} tab to check this. If so, wait for the task to finish, then restart the duplication process of your database.
Your destination database is not of a sufficient size. There are two ways to resolve this:
- Order a new Start SQL database with more space.
- If you have a Web Cloud Databases server, switch to a Web Cloud Databases solution with more storage space.
This notification means that the Database Management System (DBMS) in your source database is not the same as the DBMS in your destination database.
For example, this error can occur when you use MySQL for your source database, and PostgreSQL for your destination database.
Log in to the OVHcloud Control Panel
Back up and export a database on your database server
Restore and import a database on your database server
Retrieve the backup of a web hosting plan’s database
Import a backup into a web hosting database
For specialised services (SEO, development, etc.), contact OVHcloud partners.
If you would like assistance using and configuring your OVHcloud solutions, please refer to our support offers.
Join our community of users.