Announcement

Collapse
No announcement yet.

How to backup single table via MySQLDump?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to backup single table via MySQLDump?

    I am totally aware that to backup whole database MySQLDump function is handy but what if only one table gets corrupt? I only want to restore that table from backup.

  • #2
    In that kind of situation you can use the following steps to backup and restore a single mysql table using mysqldump function:

    For backup: Mysqldump u p databasename tablename > tablename.sql

    For example:

    Mysqldump psa BackupsScheduled > BackupsScheduled.sql u admin p cat /etc/psa/.psa.shadow
    Restoration: Mysql u p databasename < tablename.sql

    For Example:

    Mysql psa < BackupsScheduled.sql u admin p cat /etc/psa/.psa.shadow
    Thats all, easy isnt it?

    Comment

    Working...
    X