bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Multivolume archive. Problem on extract


From: Евгений
Subject: [Bug-tar] Multivolume archive. Problem on extract
Date: Thu, 25 May 2017 15:13:43 +0500

Hello,

I've got the bug on extract data from multivolume archive.

1)create multivolume archive - no error after that.
2)extract this archive
and got error  "tar: This volume is out of sequence (15360 - 9216 != 7680)"

Error is gone if:
If i change the size of the files;
If i change format of archive ( from posix to gnu)


This scripts reproduce the error on extraction

# cat test.sh

[ -d ./RESTORE ]  || mkdir ./RESTORE

dd if=/dev/zero of=./data1 bs=1K count=15
dd if=/dev/zero of=./data2 bs=1K count=15

echo "Create archive"
tar -c -L 10 -F ./nvs.sh -M -p -f 1 -V 1 --format posix ./data1 ./data2

echo "Extract archive"
tar -x -M -p -F ./nvs.sh -f ./1 -C ./RESTORE


# cat nvs.sh

#!/bin/bash
name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
case $TAR_SUBCOMMAND in
-c) echo create
    ;;
-d|-t|-x) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
    ;;
 *)  exit 1
esac
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD

tar version: 1.27, .129

How can I detect such archives?

Attachment: test.sh
Description: Bourne shell script

Attachment: nvs.sh
Description: Bourne shell script


reply via email to

[Prev in Thread] Current Thread [Next in Thread]