Article ID: 5300, created on Jun 4, 2008, last review on May 11, 2014

  • Applies to:
  • Plesk Billing


Before making any major changes to your system, including upgrades or any direct database work, we strongly recommend that you back up your database. The following is a method for accomplishing this.

Backing up the Database

The process of backing up the database involves using the command mysqldump. The steps are fairly typical, except that you need to ensure that the character set is UTF-8. To do that, the argument --default-character-set=utf8 may be passed to both mysql and mysqldump as demonstrated below:

  1. On the command line, move to the directory in where you would like to store the database. It is recommended that you store this some place that is not outside accessible, as your database contains a lot of sensitive data.
  2. Then run the following:

    mysqldump --default-character-set=utf8 -uusername database_name -p | gzip > dump.sql.gz

    where username is the username for the Plesk Billing database and database_name is the name of the Plesk Billing database.

  3. You will be prompted for your database password. Enter it, and a backup will be created in the current directory.

Restoring the database

You only need to restore the database if something went wrong while you were upgrading or making changes, and you need to "start over" from scratch.

  1. Navigate to the directory where you stored your database backup.
  2. From the command line, run the following:

    gunzip -c dump.sql.gz | mysql --default-character-set=utf8

08b3edb77202fffdd656b40acff117c1 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF