• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Backup fails to restore MySQL views properly

Patrick Mulvany

New Pleskian
I am getting backups failing to restore properly with Plesk even though they appear to complete cleanly.

Running the following command :-
/usr/local/psa/bin/pleskrestore --restore ~/backup.tar -level all -map ~/restore.map

Appears to work fine.

However if you have any views in your schema that cross schemas these may fail to restore.
e.g. schema1 has a view pointing at a table in schema2 this may fail.

I am not certain of the exact sequence of what is happening as I am restoring multiple schema.

I do know that a mysqldump of all the databases is able to handle this scenario as it creates temporary tables during the main schema generation and then once all the temp and real tables in all the schemas are created replaces the temp tables with views.

Based on this I am guessing that Plesk backups up the databases individually and then restores them either one at a time or in parallel.

If this is the case is there anyway of forcing the sequence of database restores other than doing them as individual manual restores one at a time? i.e. Restore schema1 then schema2 then all the others there order does not matter.

This still would not cover the more complex scenarios which mysqldump can handle (i.e. schema1 has a view on schema2 and vice versa) but it would minimise the amount of repair work required.

My current work around is to manually do a database dump and then extract the temporary tables and views from the mess.
mysqldump -uadmin -p --no-data --no-create-db --no-tablespaces --all-databases > all-schema.sql

Any ideas welcome

Paddy


Parallels Plesk Panel version 9.0.1

MySQL ... Various versions 5.1.37-5.1.52
 
Back
Top