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 : '\(.*\)-.*'`
case $TAR_SUBCOMMAND in
-c) ;;
-d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
;;
*) exit 1
esac

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.

Thanks!

Patrick Varley


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.
_______________________________________________
Help-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-tar

Reply via email to