• Blog
    • Oracle EBS ERP
      • DBA
      • Developer
      • Application
    • Db2 Database
    • MySQL
  • About Me
  • Skills
  • Education
  • Employment
  • Contact

Extract & restore single mysql table from backup of database

  • Home
  • Extract & restore single mysql table from backup of database

When DBA take backup of full database table and if developer need any one table to restore at that time need to take below action to restore single table in existing database.

Step 1 : gunzip the backup of mysql database through linux command 

gunzip -f DATABASENAME.sql.gz

Step 2 : Get the location of backup file and execute below command to extract the sql of table

./extract_sql.pl -t TABLENAME -r /PATH/BACKUPFILENAME.sql > /PATH/RESTOREFILENAME.sql

Step 3 : Import sql file which is got from extracted sql file using above command

mysql -u USERNAME-p PASSWORD TABLENAME< /PATH/RESTOREFILENAME.sql
or
mysql -u USERNAME-p -P PORT -h HOSTIPADDRESS -D DATABASENAME < /PATH/RESTOREFILENAME.sql
or
mysql> use DATABASENAME;
mysql> source RESTOREFILENAME.sql;
Tags
Extract & restore single mysql table, mysql, restore single table from full backup
Categories
  • Application
  • Db2 Database
  • DBA
  • Developer
  • MySQL
  • Oracle EBS ERP
o
  • Extract & restore single mysql table from backup of databaseSaturday - September 04, 2021
© 2019 KS is proudly powered by Kapil Savaliya.