[Top][All Lists]

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

[Help-tar] Help with TAR new-volume-script

From: Patrick Varley
Subject: [Help-tar] Help with TAR new-volume-script
Date: Tue, 10 Oct 2006 02:49:38 -0700 (PDT)

I am just writing because I am trying to use TAR in Ubuntu in order to backup a large amount of data (about 40 GB).  I want to break it down into 2 GB files.  I have no problems getting the multi-part functionality to work, but I want to use a script so I don't have to type in a new filename every minute.

I have tried to use the one in the TAR documentation, which should just automatically add volume labels to the new files as each part finishes.  It is:
     #! /bin/sh
echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.

name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
-c) ;;
-d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
*) exit 1

echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&3

But it is not working. When one part finished, the script starts, but then halts, saying:

Preparing volume of .
expr: syntax error
tar: `increment' command failed
tar: Error is not recoverable: exiting now
I am not sure how to fix this, but any help would be greatly appreciated.


Patrick Varley

How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.
reply via email to

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