Articles in this section

How to restore specific tables from a customer's database dump on Plesk for Linux?

kb: how-to Plesk for Linux

Question

How to restore specific tables from a customer's database dump?

Answer

To restore a particular table from the customer's database dump the command below can be used:

  1. Connect to the Plesk server via SSH.
  2. Execute command below: 

    # cat db.sql | sed -n '/-- Table structure for table table_name/,/-- Table*/p' | mysql -uadmin -pcat /etc/psa/.psa.shadow db_name

Where:

db.sql is the dump file

table_name is the necessary table

db_name is the name of the database

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.