?
Solved

Windows 7 extract from .tar and concatenate

Posted on 2012-03-15
5
Medium Priority
?
670 Views
Last Modified: 2012-04-26
Hi,

I received a .tar MySql backup that has a folder with multiple .gz files. I need to extract each of the .gz mySql.sql files from the .tar and concatenate them. I'm on windows 7 and the Linux command I was provided is:

for file in *.sql.gz; do zcat $file | mysql $YOUR_INTERNAL_NEW_COPY_DB$; done

Hoping someone can translate this to a windows compatible batch or winRar/7Zip command.

Thx,
Fred
0
Comment
Question by:fredjonzeTwo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 14

Expert Comment

by:Geisrud
ID: 37726790
I recently used "Peazip" to work with a .tar.gz file successfully.  The site lists split/join files as a feature, though I haven't used it.  Hope that helps.

http://www.peazip.org/download-installer-p-windows.html
0
 
LVL 14

Expert Comment

by:Geisrud
ID: 37757531
Were you able to try the Peazip feature I mentioned?
0
 

Accepted Solution

by:
fredjonzeTwo earned 0 total points
ID: 37757551
I did try Peazip. The join function does not appear to be appropriate for the use I need. What I had to end up doing was extracting the 200+ separate .gz MySql tables to a directory and then use a dos command to concatenate them all. Not the one command solution I was looking for that appears to be usable in Linux.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
Six Sigma Control Plans

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question