List:General Discussion« Previous MessageNext Message »
From:(Hal Date:May 19 2011 2:54pm
Subject:Re: Restore only one database or one table
View as plain text  
>>>> 2011/05/19 12:43 +0200, Johan De Meersman >>>>
Uhh. I'm a bit fuzzy today, but I really don't see how a tab-separated dump will help
split off tables or databases :-)


To answer the original question, though; the technically accurate answer is "yes, you
can". It's made "easy" because mysqldump conveniently dumps database-per database and
table-per table. It's a bugger to do, however, because if you take a monolithic dump you
need to open the whole dumpfile in a text editor and copy the data you want to another
file or straight to the MySQL commandline. Good luck with your 250G backup :-)

You can use sed or awk to look for markers and split the file up that way. You'd be much
better off in the future to dump database-per-database, and if you think you need it
table-per-table. 's Not all that hard, just script to loop over the output of show
databases and show tables. Probably plenty of scripts on the internet that do exactly
that.
<<<<<<<<
"mysqldump" allows both monolithic dump and table-by-table dump--or is that irrelevant?

Thread
Restore only one database or one tableAdarsh Sharma19 May
  • Re: Restore only one database or one tableMichael Dykman19 May
    • Re: Restore only one database or one tableSuresh Kuna19 May
      • Re: Restore only one database or one tableAdarsh Sharma19 May
        • Re: Restore only one database or one tableSuresh Kuna19 May
          • Re: Restore only one database or one tableJohan De Meersman19 May
            • Re: Restore only one database or one tableAdarsh Sharma19 May
              • Re: Restore only one database or one tableEric Bergen19 May
                • Re: Restore only one database or one tablePrabhat Kumar19 May
            • Re: Restore only one database or one tablehsv20 May