?
Solved

Windows 7 extract from .tar and concatenate

Posted on 2012-03-15
5
Medium Priority
?
690 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
  • 2
3 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
Today as you open your Outlook, you witness an error message: “Outlook is using an old copy of your Outlook Data File…”. Probably, Outlook is accessing an old OST file.
Six Sigma Control Plans
Progress

850 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