Untar multipart tarball on Windows
Asked Answered
P

8

7

I have a series of files named filename.part0.tar, filename.part1.tar, … filename.part8.tar.

I guess tar can create multiple volumes when archiving, but I can't seem to find a way to unarchive them on Windows. I've tried to untar them using 7zip (GUI & commandline), WinRAR, tar114 (which doesn't run on 64-bit Windows), WinZip, and ZenTar (a little utility I found).

All programs run through the part0 file, extracting 3 rar files, then quit reporting an error. None of the other part files are recognized as .tar, .rar, .zip, or .gz.

I've tried concatenating them using the DOS copy command, but that doesn't work, possibly because part0 thru part6 and part8 are each 100Mb, while part7 is 53Mb and therefore likely the last part. I've tried several different logical orders for the files in concatenation, but no joy.

Other than installing Linux, finding a live distro, or tracking down the guy who left these files for me, how can I untar these files?

Phonetic answered 24/3, 2009 at 19:33 Comment(0)
M
4

Install 7-zip. Right click on the first tar. In the context menu, go to "7zip -> Extract Here".

Works like a charm, no command-line kung-fu needed:)

EDIT: I only now noticed that you mention already having tried 7zip. It might have balked if you tried to "open" the tar by going "open with" -> 7zip - Their command-line for opening files is a little unorthodox, so you have to associate via 7zip instead of via the file association system built-in to windows. If you try the right click -> "7-zip" -> "extract here", though, that should work- I tested the solution myself (albeit on a 32-bit Windows box- Don't have a 64 available)

Marital answered 24/3, 2009 at 19:40 Comment(2)
Thanks! Yeah, I did try 7zip via the context menu as well as via the command line, but it didn't help. I even uninstalled the 64-bit version of 7zip and installed the 32-bit version, thinking, what the heck. That didn't work either.Phonetic
7zip is very picky when it comes to file names. The first file must have the ending .tar.001 or .tar.01. The next files are .tar.002 and so on. This is completely different to what Linux $split creates. It starts with 0 and does not add the "."!Latif
T
3

1) download gzip http://www.gzip.org/ for windows and unpack it
2) gzip -c filename.part0.tar > foo.gz
gzip -c filename.part1.tar >> foo.gz
...
gzip -c filename.part8.tar >> foo.gz
3) unpack foo.gz

worked for me

Torpedo answered 3/9, 2013 at 15:7 Comment(0)
C
1

As above, I had the same issue and ran into this old thread. For me it was a severe case of RTFM when installing a Siebel VM . These instructions were straight from the manual:

cat \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.1of3 \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.2of3 \
OVM_EL5U3_X86_ORACLE11G_SIEBEL811ENU_SIA21111_PVM.tgz.3of3 \
 | tar xzf –

Worked for me!

Collation answered 22/8, 2011 at 15:14 Comment(2)
No! cat is not usually a name of any internal or external command on WINDOWS without installing Cygwin. Files can be concatenated by binary copy on Windows: copy /b file1 file2 file3 destination.Polder
The syntax for copy is copy /b file1+file2+file3 destination. Anyway, it did not work for me, only the content of the first file was untared.Imperishable
I
0

The tar -M switch should it for you on windows (I'm using tar.exe).

tar --help says:

-M, --multi-volume             create/list/extract multi-volume archive
Inherence answered 24/3, 2009 at 19:43 Comment(1)
Thanks! I found a copy of tar.exe for 32-bit Windows and ran it with the -M switch as you suggested, but it wouldn't recognize the file as a multi-volume set, and simply extracted the same folders from just the first part. I'm beginning to think the file is corrupted.Phonetic
S
0

I found this thread because I had the same problem with these files. Yes, the same exact files you have. Here's the correct order: 042358617 (i.e. start with part0, then part4, etc.)

Concatenate in that order and you'll get a tarball you can unarchive. (I'm not on Windows, so I can't advise on what app to use.) Note that of the 19 items contained therein, 3 are zip files that some unarchive utilities will report as being corrupted. Other apps will allow you to extract 99% of their contents. Again, I'm not on Windows, so you'll have to experiment for yourself.

Enjoy! ;)

Sinnard answered 16/7, 2010 at 17:34 Comment(1)
I'm curious, how did you manage to figure out the part files order?Langelo
A
0

This works well for me with multivolume tar archives (numbered .tar.1, .tar.2 and so on) and even allows to --list or --get specific folders or files in them:

#!/bin/bash
TAR=/usr/bin/tar
ARCHIVE=bkup-01Jun
RPATH=home/user
RDEST=restore/
EXCLUDE=.*
mkdir -p $RDEST
$TAR vf $ARCHIVE.tar.1 -F 'echo '$ARCHIVE'.tar.${TAR_VOLUME} >&${TAR_FD}' -C $RDEST --get $RPATH --exclude "$EXCLUDE"

Copy to a script file, then just change the parameters:

  • TAR=location of tar binary
  • ARCHIVE=Archive base name (without .tar.multivolumenumber)
  • RPATH=path to restore (leave empty for full restore)
  • RDEST=restore destination folder (relative or absolute path)
  • EXCLUDE=files to exclude (with pattern matching)

Interesting thing for me is you really DON'T use the -M option, as this would only ask you questions (insert next volume etc.)

Allanallana answered 9/6, 2021 at 7:48 Comment(0)
Y
0

Hello perhaps would help. I had the same problems ... a save on my web site made automaticaly in Centos at 4 am create multiple file in multivolume tar format (saveblabla.tar, saveblabla.tar1.tar, saveblabla.tar2.tar,etc..)

after downloading this file on my PC (windows) i can't extract them with both windows cmd or 7zip (unknow error).

I thirst binary copy file to reassemble tar files. (above in that thread) copy /b file1+file2+file3 destination

after that, 7zip worked !!! Thanks for you help

Yonit answered 28/9, 2022 at 8:32 Comment(1)
Do you know that this question has already been answered 13 years ago with approved solution ? Perhaps could you improve your solution in order to provide something better than the other answers. Thanks.Fortress
P
0

Download bash. Then do cat fname.tar.gz.?? > combinedfile.tar.gz and then use winrar or 7zip again.

Poultice answered 20/6, 2023 at 12:49 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.