restore single table

Asked by Andy on 2012-03-27

Docs only seem to cover restoring an entire database dump. I'm backing up all my databases to a single folder. How can I restore a single table from the mydumper backup using myloader? Or do I just have to load it up using mysql?

thanks

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Data Dumper Edit question
Assignee:
No assignee Edit question
Last query:
2012-03-27
Last reply:
2012-10-27
Domas Mituzas (domas-mituzas) said : #1

mydumper was originally designed to be loaded directly using mysql -
you probably won't need myloader then.

On Tue, Mar 27, 2012 at 12:40 PM, Andy
<email address hidden> wrote:
> New question #191868 on MySQL Data Dumper:
> https://answers.launchpad.net/mydumper/+question/191868
>
> Docs only seem to cover restoring an entire database dump.  I'm backing up all my databases to a single folder.  How can I restore a single table from the mydumper backup using myloader?  Or do I just have to load it up using mysql?
>
> thanks
>
>
> --
> You received this question notification because you are an answer
> contact for MySQL Data Dumper.

Dmitry Ilyin (idv1985) said : #2

Well, mydumper stores each table in two files: schema and data.
First files defines table structure and second inserts data to it.

So you can just truncate you table and source data file to get data back. Or, it you have dropped table source schema file then data file. Uncompress them first if they are compressed, run mysql console and execute "source /path/to file;"

Can you help with this problem?

Provide an answer of your own, or ask Andy for more information if necessary.

To post a message you must log in.