RESOLUTION
Plesk Expand tracks the history of all operations and saves it in its DB.
The responsible tables are "tm_task" and "tm_action". These tables can
grow a lot.
Actually, it is not mandatory to dump "tm_action" table content and it is
not mandatory to dump "tm_task" table content where the "period" field is not
zero.
Here is a sample shell script to be used instead of the mysqldump utility to dump 'expand' DB:
#!/bin/bash
# -----------------------------------------------------------------
# don't forget to set right mysql user/password!
# -----------------------------------------------------------------
MYSQL_ADMIN_USER="admin" ## use you real user name instead
MYSQL_ADMIN_PASSWORD="setup" ## use you real password instead
LOGIN_DATA="-u$MYSQL_ADMIN_USER -p$MYSQL_ADMIN_PASSWORD"
MYSQLDUMP="mysqldump $LOGIN_DATA"
EXPAND_DB="expand"
for table in `mysql $LOGIN_DATA expand -Bs -e 'show tables'`; do
case $table in
tm_task) $MYSQLDUMP '--where=period>0' $EXPAND_DB
"$table";;
tm_action) $MYSQLDUMP --no-data $EXPAND_DB "$table";;
*) $MYSQLDUMP $EXPAND_DB "$table";;
esac
done
Using this script the dumping process will take about several minutes.
IMPORTANT NOTE:
Unlike Plesk which uses MyISAM tables, Plesk Expand uses InnoDB tables to
keep referential integrity of database. When mysqldump produces a dump
file, tables can be listed there not in the order which they were originally
created. So, some tables can refer to tables which are not created yet.
It means that restoring process would fail due to referential integrity
restrictions.
To avoid this it is recommended to use this trick:
add command
SET FOREIGN_KEY_CHECKS=0;
to the very beginning of the SQL dump file. It would disable referential
integrity checks while you do restoring.