It would be great of course if you could implement it in ispconfig directly
Such a script requires actions as root user, so it has to be be splitted into a interface part where you can define the settings like remote server IP, root password and database login. The interface part then writes the config data as an action to the sys_remoteaction and a server side plugin must be registered for the action event and start the migration. So there is no need for a additional database table for such a job. The new action framework has been added in SVN and will be part of 3.0.5.
A SQL query to insert a action might look like this:
$sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
(int)$this->form->dataRecord['server_id'] . ", " .
time() . ", " .
"'backup_restore', " .
"'".$backup_id."', " .
"'pending', " .
Instead of the $backup_id you can also add several parameters as serialized array.
For the server side plugin, see new backup plugin as example for using the actions framework: