Cloning a database copies it to a new database, on the same server or on another server. Use it to give a staging site its own copy of the production data, or to move a database to a separate database server. The original database stays as it is. Database cloning is available on all paid plans.
Step by step
Open the server and go to Databases.
Click the three dots next to the database and choose Clone.
Pick the server to clone to. You can pick the same server or another server or database server, as long as it runs the same database type. A MySQL database can go to MySQL servers, MariaDB to MariaDB and PostgreSQL to PostgreSQL.
Enter a name for the new database. It can't exist on the target server yet, and it may only contain letters, numbers and underscores.
Optionally, fill in a user and password. Ploi creates that user for the new database. You need both fields for this, a user without a password is skipped.
Leave Clone data ticked to copy the contents. Untick it if you only need the tables without their rows.
Tick My database is bigger than 4GB for large databases. See below.
Click Start.
Both databases show a cloning status until the copy is done.
Database users
Ploi doesn't copy the users of the original database. Either create one in the clone form, or add one to the new database afterwards. Then update your application's .env or configuration file with the new database name, user and password.
How the copy works
Ploi makes a dump with mysqldump or pg_dump and imports it into the new database. Writes that happen after the dump started are not in the copy.
To another server, Ploi zips the dump, sends it to the target server with rsync over SSH and imports it there. It removes the dump files from both servers afterwards. For MySQL and MariaDB this dump uses --single-transaction, so the tables stay writable and your site keeps running.
On the same server, Ploi pipes the dump straight into the new database. For MySQL and MariaDB, mysqldump locks the tables of the original database until it has read them, so writes from your site wait during that time. On a large database behind a busy site, clone at a quiet moment. PostgreSQL does not block writes during a dump.
Databases over 4GB
The zip step can't handle files over 4GB. Tick My database is bigger than 4GB and Ploi sends the dump uncompressed. That transfer takes longer, and the source server needs room for the full dump.
Requirements for cloning to another server
Both servers run the same database type.
The source server has at least 100 MB free, plus room for the dump itself. The clone refuses to start below 100 MB.
The source server can reach the SSH port of the target server. If a firewall at your hosting provider or on the target server blocks that, the transfer fails.
rsync is installed on both servers. Ploi installs it when it is missing.
When the versions differ, for example MySQL 8.4 on the source and 8.0 on the target, Ploi imports the dump as is and notes the difference in the log. Most dumps import fine, but a feature the older version doesn't know stops the import.
If something goes wrong
When a clone fails, Ploi emails the server owner with the error, and the server logs contain the full output of the dump and import. The new database may already exist on the target server by then, so delete it before you try again with the same name.
Cloning a whole site
For a WordPress site you can clone the files and the database together, and Ploi updates wp-config.php and the URLs for you. See How do I clone a site?