Hi,
I'm using pax to backup some files but I get an error
I run this short bash script
here is the script
and here is the error message
pax: File name too long for ustar /Users/iainb/Library/Mail/Bundles/MailTags.mailbundle/Contents/Resources/MailTagsHeaderCellIcon.tiff
The pax man pages say that ustar (the default format) handles paths up tp 250 chars long, but the path in the error is 100 chars long. I'm quite new to bash and I don't see how I can control the length of the path, or why this error is occurring?
Any help or input is much appreciated.
I'm using pax to backup some files but I get an error
I run this short bash script
Code:
./BackupSomething.bash "/Users/iainb/Library/Mail/" "Mail"
here is the script
Code:
#! /bin/bash
set -u
set -e
#script to back things up
#pass in the file to be backed up as the 1st parameter
#and the name of the backup dir as the 2nd parameter
INFILE=$1
OUTDIR=/Volumes/LaCie\ Disk/backups/$(date +%Y)/$(date +%B)/$(date +%d\ %b\ %Y)
OUTFILE=$2
OUTPATH=$(date +%d\ %b\ %Y)\ $OUTFILE\ Backup.tar.gz
echo infile $INFILE
echo outdir "$OUTDIR"
echo outdir and outpath "$OUTDIR/$OUTPATH"
mkdir -pv "$OUTDIR"
pax -wzf "$OUTDIR/$OUTPATH" "$INFILE"
and here is the error message
pax: File name too long for ustar /Users/iainb/Library/Mail/Bundles/MailTags.mailbundle/Contents/Resources/MailTagsHeaderCellIcon.tiff
The pax man pages say that ustar (the default format) handles paths up tp 250 chars long, but the path in the error is 100 chars long. I'm quite new to bash and I don't see how I can control the length of the path, or why this error is occurring?
Any help or input is much appreciated.