Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Export a database

This guide explains how to backup or export a MySQL/MariaDB database via the Infomaniak Manager or via SSH.

 

Export a database via the Manager

To export an Infomaniak database:

  1. Click here to access your site management on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the site concerned:
  3. Click on the chevron to the right of Databases in the left sidebar menu.
  4. Click on Databases in the left sidebar menu.
  5. Click on the action menu to the right of the object concerned in the table that appears.
  6. Click on Export (or on Download a backup):
  7. Click on the export method and choose the database to download from the dropdown menu.
  8. Click on the Next button:
  9. Click on any desired instructions:
    1. Compression Gzip
    2. Drop Table
    3. Create Table if not exists
    4. Insert ignore into
  10. Click on the Export button.

 

Export a database via SSH

If you cannot export the database via the console or if the database is large:

  1. If necessary, create an FTP SSH account.
  2. Connect to the server via SSH (need help?).
  3. Customize and run the following SSH command:

    # Usage: mysqldump --host=[hostname] -u [username] --password=[password] [database_name] --no-tablespaces > [output_file.sql]
    mysqldump --host=db_host -u db_user --password=db_password db_name --no-tablespaces > backup.sql
  4. Wait for the SSH command to run (the terminal may freeze for a few seconds).
  5. Connect to the server via an FTP software/client.
  6. Download the generated SQL file.

 

Additional help

  • Example of command to execute at step 3 of the second procedure:

    # Example with standard credentials
    mysqldump --host=abcd.xyz.infomaniak.com -u abcd_test --password=your_secret_password abcd_test --no-tablespaces > backup.sql
  • Refer to this other guide if you are looking for information related to the MySQL server, database username and password.

Has this FAQ been helpful?