LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-02-2006, 03:30 AM   #1
RGummi
Member
 
Registered: Nov 2005
Posts: 90

Rep: Reputation: 15
tar error


Hello,

now I have a script that uses multi volumes. In some cases a get an error "tar: Fehler beim Beenden, verursacht durch vorhergehenden Fehler". Does anyone know what this is?

here my script

#! /bin/sh

#############################################################
# Script for backup a big directory
# OS: Linux
# Date: 01.09.2006
# License: GPL
# Version: 1.0
#############################################################

src=~/data/Jukebox
backup=~/backup/jukebox
name=jukebox
# blocksize in MByte
blocksize=4600

# for extracing use tar -xvMf ~/backup/jukebox/jukebox_$date.001.tar -F ~/bin/jukebox_backup
# cd "$src"
# tar -xvMf "$backup/$name_yymmdd.001.tar" -F "$0" .

####################################################################
# use multi volume feature of tar
# advantage: every tar file is usefull without the others,
# only for splitted files the next file(s) is(are) used.
# disadvantage: we can not use compression
####################################################################

if [[ $TAR_ARCHIVE = "" ]]; then
date=$(date +%y%m%d)
cd "$src"
tar -cvL$((blocksize*1000)) -f "$backup/$name"_"$date.001.tar" -F "$0" .
else
# called from tar
echo "###" Volume $TAR_VOLUME of $TAR_ARCHIVE
name=${TAR_ARCHIVE%.*.*}
if [[ $((TAR_VOLUME)) -lt 100 ]]; then
volume=0$TAR_VOLUME
if [[ $((TAR_VOLUME)) -lt 10 ]]; then
volume=0$volume
fi
else
volume=$TAR_VOLUME
fi

echo "$name.$volume.tar" >&3
fi
 
Old 09-02-2006, 04:22 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The 'error' that tar shows is not the actual error, but a message that an error has occurred.
The actual error should be shown earlier during the creation of the archive and holds the key to the problem. Without that error I don't think we can help.

Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
getting error during "tar -xvzf filename.tar.gz" b0nd Linux - Newbie 11 04-23-2005 08:50 PM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 12:35 AM
Error while installing package.tar.tar isone Linux - Software 2 11-03-2003 11:58 AM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration