Q100567: How to restore a Flix 6 database backup
This article provides information about how to restore a backup of a Flix database schema.
Although the Flix Server can be prompted to back up the database it's using, it currently cannot restore a backup file. This has to be done via MySQL instead.
Here are some recommendations to achieve this:
- Some communication packets sent to the MySQL server while restoring a Flix database backup will exceed MySQL’s default max_allowed_packet value of 4MB, hence resulting in a MySQL Server error during the process. To avoid this, ensure your MySQL server’s max_allowed_packet variable is set to a higher value depending on your database size (for example 130MB).
More information on MySQL’s max_allowed_packet variable, and how to set it, can be found in the MySQL documentation.
- Some data in the Flix database backup will contain \0 (null) characters, which MySQL won’t be able to process, unless the --binary-mode option is toggled on.
The required format for the MySQL command to run in order to restore a Flix database backup will be the following:
$mysql -h <host IP> -u<username> -p<password> --binary-mode=1 <schema> < <path to backup file>
Below is an example command to restore the
flix.sql backup file, located in
/home/flix_sql_backups/, to a pre-existing ‘flix’ schema, available on a database server running on IP 10.0.0.101:
$mysql -h 10.0.0.101 -umy_user -pP@ssw0rd --binary-mode=1 flix < /home/flix_sql_backups/flix.sql
NOTE: This operation may take some time, depending on the amount of data present in your Flix database backup.
You can find more information on how to install a Flix Server in the Installing and Managing Flix Server section of our documentation.
We're sorry to hear thatPlease tell us why