When we usually speak about backups, we normally refer to backing up the complete database using mysqldump utility. But at-times as webmasters, we may come across situations when just one table if found to be corrupt and only that needs to be restored.
In such a situation, the following procedure can come in handy.
Backing up a table in MySQL
mysqldump -u -p databasename tablename > tablename.sql
Example : mysqldump psa BackupsScheduled > BackupsScheduled.sql -u admin -p`cat /etc/psa/.psa.shadow`
Restoring table from MySQL
mysql -u -p databasename < tablename.sql
Example : mysql psa < BackupsScheduled.sql -u admin -p`cat /etc/psa/.psa.shadow`
It’s simple. But if you still face a problem with this OR need any assistance, please feel free to get in touch with us.