0

Possible Duplicate:
Can I restore a single table from a full mysql mysqldump file?

Anyone know if you can import a specific table from a full MySQL dump? My client requests that his database is dumped every hour and we keep the SQL hourly backups of the past 3 days or so just incase.

EDIT: MySQL running on Windows Server

Community
  • 1
  • 1
superjaz1
  • 436
  • 4
  • 11
  • http://stackoverflow.com/questions/1013852/can-i-restore-a-single-table-from-a-full-mysql-mysqldump-file – piokuc Dec 11 '12 at 11:11
  • 4
    Well, sorry to hear you're on Windows. In this case I would advice to install Cygwin and use the methods described in answers to the other question – piokuc Dec 11 '12 at 11:20

2 Answers2

0

Maybe it would be easier to just backup / dump the specific table?

I use this: http://www.dwalker.co.uk/phpmysqlautobackup/

Highly recommended :) - you can pass in an array of specific tables to export.

jeremyj11
  • 589
  • 1
  • 5
  • 15
  • My client requires that the whole database is backed up on the hour although I might look into storing the backup as an SQL file per table via mysqldump rather than one big SQL file – superjaz1 Dec 11 '12 at 12:28
0

I am guessing that you are dumping the entire database for recovery purposes if the entire system fails, so you want to keep doing that.

However, it won't take much additional time to also dump the individual file after you've dumped the entire database. Just write a second mysqldump command of the form

mysqldump -u xxx -pxxx database_name table_name > database.table.yyyymmdd.sql

and you'll have your table in a file by itself anytime you need it.

D Mac
  • 3,727
  • 1
  • 25
  • 32