Tar unexpected eof in archive tar error is not recoverable exiting now

I was attempting to untar a .tar.gz file, but came across this error: gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable:

I was attempting to untar a .tar.gz file, but came across this error:

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

The tar.gz file includes a .tar file, which when untarred results in:

tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

I tried both –ignore-zeros and –ignore-failed-read, although they both didn’t work.

Is there any way I could extract this file even if it is corrupted?

The file type in question: .tar.gz: Gzip Compressed Data, from a UNIX system.

asked Nov 5, 2012 at 11:54

iLinux85's user avatar

Check two items:

(1) Is the FILE INCOMPLETE due to a faulty download? Re-download, and use the -c option if your are using wget. (happens all the time).

(2) Does the .tar or .tar.gz filename have ILLEGAL CHARACTERS. It’s best to keep archive names simple, short, composed of letters and numbers. (happens all the time). So just rename the file. This one nailed me recently as I thought it would be convenient to include a time/date stamp as part of the archive name. BAD IDEA!

jasonwryan's user avatar

jasonwryan

70.1k33 gold badges191 silver badges224 bronze badges

answered Aug 9, 2015 at 4:20

SANDPOND's user avatar

SANDPONDSANDPOND

1411 silver badge3 bronze badges

1

You don’t. It appears the file has been truncated. How long is it? If you only have the first few bytes then you’re done.

answered Nov 5, 2012 at 13:55

psusi's user avatar

psusipsusi

16.8k3 gold badges37 silver badges47 bronze badges

are you unpacking the .tar.gz file on the same platform it was made on? there are some differences between older Unix versions of tar, such as the non-GNU versions of tar that have shipped with Solaris, and the GNU tar that ships with Linux, etc. If you’re going to unpack an archive with GNU tar, it’s best to create it with GNU tar.

how does your system look for disk space? was the disk full when you made the archive, or is it full as you attempt to unpack it?

did you create the archive with a cron job? without output redirection, cron can do funky things to archives due to limitations in the size of output it will allow to STDOUT. If you’re making an archive in cron, and you’re using -v with tar, try redirecting STDOUT to a file, and STDERR, too. See if that helps. tar -cvf archive.tar.gz /path/ 1>archive.stdout.log 2>archive.stderr.log or something like that.

answered Nov 5, 2012 at 14:24

Tim Kennedy's user avatar

Tim KennedyTim Kennedy

19k4 gold badges38 silver badges57 bronze badges

2

I had the same error.

My problem was trying to use tar to unzip before the upload was complete.

AdminBee's user avatar

AdminBee

20.8k18 gold badges47 silver badges69 bronze badges

answered Nov 30, 2022 at 20:40

Okomikeruko's user avatar

just faced this recently, solution was to rename the file (remove the _).E.g Bad file name which was causing issue MAA07-0100-0100-01AAA_show_tech_output.tgz , renaming this to MAA07-0100-0100-01AAA.tgz helped to resolve the issue.

answered Nov 23, 2018 at 9:48

fsociety's user avatar

My solution to the problem was to rename the tar archive twice. I know it does sound ridiculous, but it worked for me and saved a lot of time on rearchiving.

I had a big, 9 GB, tar gzip archive named ‘STRING152_20200221.tar.gz’ which produced the errors reported by the OP.
As advised above, I renamed it to just ‘STRING.tar.gz’. The errors persisted.
Then I renamed it back to the original name ‘STRING152_20200221.tar.gz’ and it unarchived successfully.

No manipulations with the archive except its name were done.

My tar version is ‘tar (GNU tar) 1.26’. I am also on CentOs (CentOS Linux release 7.4.1708 (Core))

answered Feb 25, 2020 at 9:39

user3804598's user avatar

Содержание

  1. unexpected EOF in .tar.gz file from get command #1791
  2. Comments
  3. qmrestore error using lzo compression
  4. jonemmons
  5. Marvin
  6. can’t restore KVM from one host to another — tar: Unexpected EOF in archive
  7. yaboc
  8. qmrestore error using lzo compression
  9. jonemmons
  10. Marvin
  11. gzip — unexpected end of file #144
  12. Comments

unexpected EOF in .tar.gz file from get command #1791

I just tried to get a large file from ipfs using the get command using both the archive and compress options:

However when I try to unarchive it I get the following error:

Also when trying to use python’s tarfile capabilities I also get errors that look like: IOError: CRC check failed 0x3b94367b != 0x1a9b23adL , if that is any help.

The text was updated successfully, but these errors were encountered:

I just tried the same thing without —compress and I’m still getting the same error.

Which version are you using? Should have been fixed in master since 23dd82f

Ah ok, I’m using ipfs version 0.3.8-dev . Not sure if I pulled after that commit, I’ll try updating and get back to you.

Ok it is all fine now, thanks.

@rht @amstocker
I’m using 0.3.11-dev and I’m still getting errors.
For example: QmSXfUAh4HfMNgBcDisZ7tbA4cRMXzuJ3BdrjAz1T5TTjw
(it’s this file, decompressed with xz and added with ipfs tar add )

This is an issue of documentation. Right now, the ipfs tar add command creates objects that can only be easily used by the ipfs tar cat command.

Further integration of ipfs tar created objects into the other commands is definitely planned, Its just taking a bit of thought to figure out how best to do it in a way that doesnt privelege one format unnecessarily. (thats not to say ipfs tar doesnt already privelege the tar format, but thats the sort of thing we want to avoid whenever we can)

Further integration of ipfs tar created objects into the other commands is definitely planned, Its just taking a bit of thought to figure out how best to do it in a way that doesnt privelege one format unnecessarily.

I see two possible ways to go:

Option (1): Transparent archives

In this case ipfs tar would not influence any other part of ipfs project: it would just be a quick way to import/export files without writing the uncompressed archive on disk.

Option (2): Smart Chunking

  • ipfs tar add detects the file boundaries in the tar file and applies a sort of pre-chunking (i.e. file headers are standalone chunks, and all the files are chunked indipendently, but keeping the flatness of the tar archive)
  • ipfs tar cat does not exist
  • ipfs get would be completely unaware of the existence of tar archives and happily download the archive as a normal file (at most, it will notice an odd chunking)

Option (1) would discard by default all the extra content that doesn’t fit in ipfs (owners, permissions, xattrs, etc.), but they could be optionally added as a special node in the dag and smartly restored by tar cat.

I’m not sure if this has been resolved, in part, by any other tickets, so forgive me if my comment isn’t relevant.

Источник

qmrestore error using lzo compression

jonemmons

Guest

I’m running ProxMox 2.1 and I have been backing up a CentOS VM for a few weeks now and I thought everything was going ok until I had an issue and tried to restore from a recent backup. I ran the qmrestore command and immediately got this error message:
new volume ID is ‘local:104/vm-104-disk-1.raw’
restore data to ‘/var/lib/vz/images/104/vm-104-disk-1.raw’ (214748364800 bytes)
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
201849344 bytes copied, 1 s, 192.00 MiB/s
starting cleanup
temporary volume ‘local:104/vm-104-disk-1.raw’ sucessfuly removed
TASK ERROR: command ‘zcat -f|tar xf /mnt/pve/VMBACKUP/dump/vzdump-qemu-102-2012_06_09-12_00_01.tar.lzo ‘—to-command=/usr/lib/qemu-server/qmextract —storage local» failed: exit code 2

I had this error before when I tried to qmrestore a OpenSuse machine but was able to fix it by doing another backup and not selecting any compression. I can’t do that for this vm because the disk are just way to large. I was able to fix the vm manually but I would really like to figure out why the backups are failing to restore.
pveversion -v
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-11-pve
proxmox-ve-2.6.32: 2.0-66
pve-kernel-2.6.32-11-pve: 2.6.32-66
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-15
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1

Thanks in advance.

Marvin

Active Member

I am running into the exact same issue. I believe the problem occurs when there is a disk in the archive that is larger than the root partition. I think that the tar script in the restore procedure uses the root partition as its extraction area. Purely speculative. I have not been able to solve this.

My root partition = local hardware RAID 72Gb
Image lvm partition = local hardware RAID 2.5Tb
Backup partition = iSCSI 250Gb

Some of my VM’s have disks that are 250Gb in size (although only 1/3 used or less.) Those are the ones that fail with «tar: Unexpected EOF in archive». It does not matter if i compress the backup or not, it cannot be restored.

Источник

can’t restore KVM from one host to another — tar: Unexpected EOF in archive

yaboc

Active Member

I have two Proxmox hosts

box1 pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)

box2 pve-manager: 2.2-24 (pve-manager/2.2/7f9cfa4c)

and i can’t move the KVM (25GB in size) over to the newer box (box2).

command vzdump 101 —compress lzo —dumpdir /back completes successfully on box 1 and then i can SCP both files
vzdump-qemu-101-2012_11_12-17_03_26.log vzdump-qemu-101-2012_11_12-17_03_26.tar.lzo to box 2

but when i perform qmrestore vzdump-qemu-101-2012_11_12-17_03_26.tar.lzo 101 on box 2

extracting archive ‘/home/vzdump-qemu-101-2012_11_12-17_03_26.tar.lzo’
extracting ‘qemu-server.conf’ from archive
extracting ‘vm-disk-ide0.raw’ from archive
Formatting ‘/var/lib/vz/images/101/vm-101-disk-1.raw’, fmt=raw size=32768
new volume ID is ‘local:101/vm-101-disk-1.raw’
restore data to ‘/var/lib/vz/images/101/vm-101-disk-1.raw’ (26843545600 bytes)
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
868219392 bytes copied, 15 s, 55.13 MiB/s
starting cleanup
temporary volume ‘local:101/vm-101-disk-1.raw’ sucessfuly removed
command ‘zcat -f|tar xf /home/vzdump-qemu-101-2012_11_12-17_03_26.tar.lzo ‘—to-command=/usr/lib/qemu-server/qmextract» failed: exit code 2

I know that there’s one thread that mentions the cause for this could be that the / partition which restore uses as workspace to extract the KVM is lower than the size of KVM, but in this case KVM is 25GB and my df -h on box2 is

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/pve-root 95G 2.5G 88G 3% /
/dev/mapper/pve-data 1.7T 254G 1.5T 15% /var/lib/vz

Any ideas what could be happening over there ? Thanks in advance.

Источник

qmrestore error using lzo compression

jonemmons

Guest

I’m running ProxMox 2.1 and I have been backing up a CentOS VM for a few weeks now and I thought everything was going ok until I had an issue and tried to restore from a recent backup. I ran the qmrestore command and immediately got this error message:
new volume ID is ‘local:104/vm-104-disk-1.raw’
restore data to ‘/var/lib/vz/images/104/vm-104-disk-1.raw’ (214748364800 bytes)
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
lzop: : Compressed data violation
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
201849344 bytes copied, 1 s, 192.00 MiB/s
starting cleanup
temporary volume ‘local:104/vm-104-disk-1.raw’ sucessfuly removed
TASK ERROR: command ‘zcat -f|tar xf /mnt/pve/VMBACKUP/dump/vzdump-qemu-102-2012_06_09-12_00_01.tar.lzo ‘—to-command=/usr/lib/qemu-server/qmextract —storage local» failed: exit code 2

I had this error before when I tried to qmrestore a OpenSuse machine but was able to fix it by doing another backup and not selecting any compression. I can’t do that for this vm because the disk are just way to large. I was able to fix the vm manually but I would really like to figure out why the backups are failing to restore.
pveversion -v
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-11-pve
proxmox-ve-2.6.32: 2.0-66
pve-kernel-2.6.32-11-pve: 2.6.32-66
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-15
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1

Thanks in advance.

Marvin

Active Member

I am running into the exact same issue. I believe the problem occurs when there is a disk in the archive that is larger than the root partition. I think that the tar script in the restore procedure uses the root partition as its extraction area. Purely speculative. I have not been able to solve this.

My root partition = local hardware RAID 72Gb
Image lvm partition = local hardware RAID 2.5Tb
Backup partition = iSCSI 250Gb

Some of my VM’s have disks that are 250Gb in size (although only 1/3 used or less.) Those are the ones that fail with «tar: Unexpected EOF in archive». It does not matter if i compress the backup or not, it cannot be restored.

Источник

gzip — unexpected end of file #144

Sometimes I get the following error:
gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Exiting with failure status due to previous errors
! Failed to unpack Plack-Test-ExternalServer-0.01.tar.gz: no directory
! Failed to fetch distribution Plack-Test-ExternalServer-0.01

I am not quite sure if that’s not problem with my installation/OS/gzip actually. It happens only sometimes and if I run second time cpanm Some::Module the install process completes without errors.

The text was updated successfully, but these errors were encountered:

Closing. Reopen if there’s a way to reproduce reliably. Otherwise I think it’s a problem with the unstable internet downloads.

I’m probably missing something, but the manual shows a usage of «cpanm —mirror

/minicpan —mirror-only».
It seems that wget is used to try and fetch the archive.

When not using «—mirror-only», I’m getting «Fetching nothing/authors/id/P/PH/PHRED/Apache-DBI-1.11.tar.gz . OK», even when the argument to —mirror doesn’t exists.

when no file is being actually fetched, you’ll get the same errors as above (tar and gzip complaining)

@shiponi it’s normal that even when mirror-only option is used, cpanm copies the file to a working directory. I don’t see what problem you’re trying to describe.

I’ve straced it, and I’m getting this:
execve(«/usr/bin/wget», [«/usr/bin/wget», «—retry-connrefused», «dist/authors/id/P/PH/PHRED/Apach», «-q», «-O», «Apache-DBI-1.11.tar.gz»], [/* 31 vars */]) = 0

The command line was: cpanm -l perl5 —mirror dist -n Apache::DBI

@shiponi please describe the problem more clearly — what you were trying to do, what you expected and what happened.

I was hoping I can use «—save-dists» to create a local repository of perl packages, and then use «—mirror» to use that directory instead of fetching everything using the internet.

Well, that still doesn’t describe what is your problem. If you still have an issue to report, make a new one with the reproducible steps and clearer description.

If all you want is to build a local mirror out of saved distributions, there are several tools on CPAN that does this, among all i can recommend OrePAN.

ok. from the beginning 🙂

cpanm -l perl5 —save-dists dist -n Apache::DBI
that works fine. I get the modules installed under perl5 and the tarball under dist (with full CPAN hierarchy)

I’m then removing the perl5 directory, and try this:
cpanm -l perl5 —mirror dist -n Apache::DBI

I’m getting this (like the original poster):

I haven’t tried, but you probably should use —mirror file://$PWD/dist instead. The mirror URL has to begin with file:// or / to be recognized as a file path.

I’ll try that. Thanks

TLDR: I’m unsure if this is a cpanm bug/issue, but it is a noisy error.

I ran into the same issue, let’s try to get to the cause of it.

To state the error again:

I ran strace on «PERL_CARTON_MIRROR=https://partial.mirror.company.org carton install» that had this behaviour:

After the fail, Crypt::CBC gets installed from the next mirror.

As stated earlier, it’s not a major issue, but since it’s harmless I’d suggest hiding it. E.g. skip the unpack if the file is empty.

I hope this helps, thanks for providing us with this cpanm 👍

I have run into this issue as well and have tried to test various scenarios. I have narrowed it down to it happening when using —mirror with cpanm like so:

The issue arise when a requirement in the cpanfile does not exist at the mirror (which only hold company-internal packages), since we mean to fetch the «publically available» dependencies directly from CPAN. What is strange is that the cpanm-log will show loglines as follows:

While the webserver serving the internal PAN logs as follows:

In the filesystem in the .cpanm/work/ -directory a tar.gz-file is created. This varies between bein zero bytes or a couple of bytes depending on if cpanm was run with —no-lwp , —no-wget or without any such arguments.

Note that cpanm thinks the file was fetched without incident ( OK ) while it clearly was not. Expected behaviour would as I see it be that it would detect that the fetch failed, discard the empty-ish file and try to fetch from CPAN since we did not use the —mirror-only -option.

Is this enough to dig further and does this warrant reopening the issue?

Источник

Тема: проблема с архивом  (Прочитано 8814 раз)

0 Пользователей и 1 Гость просматривают эту тему.

не знаю куда написать, решил сюда.

скачал игруху. файлом SpaceChem_1012_incl_key.tar.gz

распаковываю. Пишет

gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

решил с под венды попробывать.

архив открывается. во вложенном архиве 4 файла. ридми, сериал, деб и инсталляшник для 64битки.

Почитал ридми, копирую на внешник деб. Переношу на линукс — на внешнике нет такого файла.

ничего путнего не на гуглил…

или все же Unexpected EOF in archive говорит о том, что архив битый?


Записан


Не самый большой знаток, но ИМХО действительно битый архив.

или все же Unexpected EOF in archive говорит о том, что архив битый?

Попытайтесь проделать то же самое от root-а. Народ устверждает, что это может помочь.


Записан

Matuntu Best new (12.04), Kubuntu 14.04


чё то не хочет…
а вот если с терминала, то …
root@biomet:/media/3Q HDD External/REZ# gzip SpaceChem_1012_incl_key.tar.gz
gzip: SpaceChem_1012_incl_key.tar.gz has 1 other link  — unchanged


Пользователь решил продолжить мысль: Июль 23, 2012, 18:58:41


а вот ещё…

root@biomet:/media/3Q HDD External/REZ# md5sum -c SpaceChem_1012_incl_key.tar.gz
md5sum: SpaceChem_1012_incl_key.tar.gz: не найдено верно составленных строк контрольных сумм MD5

я что не верно делаю?

« Последнее редактирование: Июль 23, 2012, 18:58:41 от Владимир Юрганов »


Записан


я что не верно делаю?

Видимо, Вы всё делаете правильно. А проблема скорее всего действительно в архиве.


Записан

Matuntu Best new (12.04), Kubuntu 14.04


эх… а хотелось поииграться


Записан


не знаю куда написать, решил сюда. …
или все же Unexpected EOF in archive говорит о том, что архив битый?

EOF это End Of File  начиная с сотворения файлового мира принятое обозначение того что файл закончился (служебный символ) при его отсутствии однозначно недокачанный файл, то есть  скачанный с ошибкой, что и есть битый


Записан

© ivm 1991 — настоящее время. All Rights Reserved.
OS Matuntu-Best/Matuntu-Trusty/Matuntu-TT64-M16


не знаю куда написать, решил сюда. …
или все же Unexpected EOF in archive говорит о том, что архив битый?

EOF это End Of File  начиная с сотворения файлового мира принятое обозначение того что файл закончился (служебный символ) при его отсутствии однозначно недокачанный файл, то есть  скачанный с ошибкой, что и есть битый

умеешь же ты, Игорь, убить надежды. )))
два раза скачивал с торрентов…


Записан


root@biomet:/media/3Q HDD External/REZ# gzip SpaceChem_1012_incl_key.tar.gz
gzip: SpaceChem_1012_incl_key.tar.gz has 1 other link  — unchanged

   Распаковка архива *.tar.gz выполняется командой

tar xvfz *.tar.gz

# md5sum -c SpaceChem_1012_incl_key.tar.gz
md5sum: SpaceChem_1012_incl_key.tar.gz: не найдено верно составленных строк контрольных сумм MD5

   Параметр -c подразумевает, что будет указан файл со значением контрольной суммы. Если нужно просто посчитать и вывести в стандартный вывод, параметр -c указывать не надо:

md5sum SpaceChem_1012_incl_key.tar.gz


Записан


скачал другую версию игры, уставилось без проблем. скорее всего — проблема закачки.
тему можно закрывать


Записан


Comments

@thbeh

@bacongobbler
bacongobbler

changed the title
example-php

«tar: Unexpected EOF in archive» when pushing an app

Jun 4, 2014

Xe

pushed a commit
that referenced
this issue

Aug 19, 2014

Ref #785

This will break builds if the corresponding slugbuilder patch is not
merged first.

Xe

pushed a commit
that referenced
this issue

Aug 19, 2014

Ref #785

This will break builds if the corresponding slugbuilder patch is not
merged first.

@Xe
Xe

mentioned this issue

Aug 19, 2014

Xe

pushed a commit
that referenced
this issue

Aug 20, 2014

Ref #785

This will break builds if the corresponding slugbuilder patch is not
merged first.

Xe

pushed a commit
that referenced
this issue

Aug 20, 2014

Ref #785
Ref #1641

This will break builds if the corresponding slugbuilder patch is not
merged first.

Xe

pushed a commit
that referenced
this issue

Aug 20, 2014

Ref #785
Ref deis/slugbuilder#9

This will break builds if the corresponding slugbuilder patch is not
merged first.

Xe

pushed a commit
that referenced
this issue

Aug 20, 2014

Ref #785
Ref deis/slugbuilder#9

This will break builds if the corresponding slugbuilder patch is not
merged first.

Xe

pushed a commit
that referenced
this issue

Aug 21, 2014

Ref #785
Ref deis/slugbuilder#9

This will break builds if the corresponding slugbuilder patch is not
merged first.

hoodcanaljim

Posts: 312
Joined: 2006/02/05 17:49:10

[SOLVED] gzip: stdin: unexpected end of file

Hi

I preparation for upgrading my desktop machine from 5.7 to 6.2 I am backing up my /home files and /etc directories. But there are problems with the tar files I am creating. When run the following tar command and then try to get a listing of that file it shows this error.

[code]
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
[/code]
This is the command used to create the file
[code]
tar -cvzf /media/disk-1/ZZ.linux.d/pri/pri.music.tgz /home/music
[/code]

When I run the command
[code]
ls -R /home/music | wc -l
[/code]
it returns 2080

When I run the command
[code]
tar -tzvf /media/disk-1/ZZ.linux.d/pri/pri.music.tgz | wc -l
[/code]
it returns 721 and the above error.

Am I looking at apples and oranges??
Is there a way to get tar to explain the errors??

It would appear there is something in the directory being tar’ed that creates the error because tar’ing the /etc directory and listing that tar gives no errors.

Thanks
Jim


pschaff

Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: gzip: stdin: unexpected end of file

Post

by pschaff » 2012/01/05 03:38:55

The difference in line count is no surprise and is due to the difference in handling of directories in «ls -l» versus «tar -tv». The «-» is optional on tar options — a bit of an oddity. What happens if you omit it? Nothing in my test.
[code]
[build@poq1 ~]$ ls -R rpmbuild/
rpmbuild/:
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS tmp

rpmbuild/BUILD:

rpmbuild/BUILDROOT:

rpmbuild/RPMS:
x86_64

rpmbuild/RPMS/x86_64:

rpmbuild/SOURCES:

rpmbuild/SPECS:

rpmbuild/SRPMS:

rpmbuild/tmp:
test
[build@poq1 ~]$ tar zcf test.tgz rpmbuild/
[build@poq1 ~]$ tar ztvf test.tgz
drwxrwxr-x build/build 0 2011-12-14 07:26 rpmbuild/
drwxrwxr-x build/build 0 2011-12-21 17:48 rpmbuild/RPMS/
drwxr-xr-x build/build 0 2012-01-04 22:26 rpmbuild/RPMS/x86_64/
drwxrwxr-x build/build 0 2012-01-04 22:26 rpmbuild/SRPMS/
drwxrwxr-x build/build 0 2012-01-04 22:27 rpmbuild/SPECS/
drwxr-xr-x build/build 0 2012-01-04 22:27 rpmbuild/tmp/
-rw-rw-r— build/build 0 2012-01-04 22:27 rpmbuild/tmp/test
drwxr-xr-x build/build 0 2012-01-03 13:33 rpmbuild/BUILDROOT/
drwxrwxr-x build/build 0 2012-01-04 22:27 rpmbuild/BUILD/
drwxrwxr-x build/build 0 2012-01-04 22:27 rpmbuild/SOURCES/
[build@poq1 ~]$ tar ztvf test.tgz | wc -l
10
[build@poq1 ~]$ tar -ztvf test.tgz | wc -l
10
[build@poq1 ~]$ ls -R rpmbuild/ | wc -l
26
[build@poq1 ~]$
[/code]Perhaps you are right about the content of the archive being the issue, but I don’t know what would cause that.


User avatar

TrevorH

Site Admin
Posts: 32532
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: gzip: stdin: unexpected end of file

Post

by TrevorH » 2012/01/05 09:34:26

[quote]
hoodcanaljim wrote:

This is the command used to create the file
[code]
tar -cvzf /media/disk-1/ZZ.linux.d/pri/pri.music.tgz /home/music
[/code]
[/quote]

Are you sure that this command actually completes successfully and creates the archive? The only time I’ve seen things like you report is when the target file resides on a filesystem that runs out of space…


gerald_clark

Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

[SOLVED] gzip: stdin: unexpected end of file

Post

by gerald_clark » 2012/01/05 14:54:08

If the disk in /media is VFAT, the tar file may be too big.


hoodcanaljim

Posts: 312
Joined: 2006/02/05 17:49:10

Re: gzip: stdin: unexpected end of file

Post

by hoodcanaljim » 2012/01/05 17:11:55

If the limit on a VFAT drive is 4.0g then that is the problem. I was able to copy all the files onto the external drive, 12g of them. But the tar files are stopped at 4.0g.

Thanks
Jim


gerald_clark

Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: gzip: stdin: unexpected end of file

Post

by gerald_clark » 2012/01/05 17:25:45

That’s the problem.
You could pipe the tar command through split.


hoodcanaljim

Posts: 312
Joined: 2006/02/05 17:49:10

Re: gzip: stdin: unexpected end of file

Post

by hoodcanaljim » 2012/01/05 23:10:36

Thanks for all the help.

I am past this problem since I copied all the files onto to backup drive. I should be good to install 6.2 and reload files as required.

Thanks again Trevor, Gerald and Phil
Jim

This could be marked SOLVED.


User avatar

AlanBartlett

Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: [SOLVED] gzip: stdin: unexpected end of file

Post

by AlanBartlett » 2012/01/06 01:22:57

Thank you for reporting back.

[quote]
This could be marked SOLVED.
[/quote]
Done, as requested. :-)


Понравилась статья? Поделить с друзьями:
  • Qfil sahara server fail как исправить
  • Tar skip error
  • Qcamain10x64 sys как исправить
  • Tar exe error exit delayed from previous errors
  • Pyuic5 error in input file not well formed invalid token line 1 column 1