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, where db.sql is the dump file, table_name is the necessary table, db_name is the name of the database:
# cat db.sql | sed -n '/-- Table structure for table table_name/,/-- Table*/p' | mysql -uadmin -pcat /etc/psa/.psa.shadow db_name