2.6.1.16. Create database copy

flowchart LR subgraph hosting[Hosting account] direction LR db1[Source database] db2[New database] end db1-->|""Copy
database""|db2

  1. Open the "Databases" section.
  2. In the database menu, click "Copy database":
  3. Specify the suffix of the new database name (the prefix always matches the name of the hosting account) and click "Create and copy database".
  4. Wait for the operation to complete.

flowchart LR subgraph account[Account] direction LR subgraph hosting1[Source hosting account] direction LR db1[Source database] end subgraph hosting2[Destination hosting account] direction LR db2[New database] end db1-->|"Automatic
site transfer
(DB component)"|db2 end

Use automatic site transfer. Select only the database from all components for the transfer.

flowchart LR subgraph account[Account] direction LR subgraph hosting1[Source hosting account] direction LR db1[Source database] end subgraph hosting2[Destination hosting account] direction LR db2[Destination database] end db1-->|"Import database
(from hosting)"|db2 end

Use import database to hosting account (the "Hosting account" option).

flowchart LR db1[Source database] dump[Dump] db2[Destination database] db1-->|Export|dump dump-->|Import|db2

  1. Export the source database in any of the available methods.
  2. If necessary, make the necessary changes to the dump (for example, if the site is renamed, replace the old address in the dump with the new one).
  3. Import dump to an empty database using any of the available methods.

flowchart LR db1[Source database] db2[Destination database] db1-->|mysqldump|db2

  1. Connect to the hosting via SSH.
  2. Execute command:
    mysqldump --no-tablespaces -h host1 -u login1 --password='password1' database1 | mysql -h host2 -u login2 --password='password2' database2

    In command:

    • Instead of host1, login1, password1 and database1 use data for connecting to the source database.
    • Instead of host2, login2, password2 and database2 — data for connecting to an empty database.
    • Password must be in single quotes.
  3. Wait for the command to complete.
Content