image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
LinkBack Thread Tools
  #1  
Old June 15th, 2007, 07:08 AM
Registered User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
yogaboy is on a distinguished road
Question Pax won't archive long paths

Hi,

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.
Reply With Quote
  #2  
Old June 15th, 2007, 04:38 PM
Registered User
 
Join Date: Mar 2005
Posts: 267
Thanks: 0
Thanked 6 Times in 6 Posts
artov is on a distinguished road
I have not used pax, so I do not know its limits. You might like to try either
tar or cpio (cpio is the backup system Unix systems normally use; with addition
to dumps etc.)

I noticed you use Lacie for your backup device. I have also Lacie for backups. However, I use rdiff-backup. With it I can take incremental backups, but the result is copy of the source hierarchy (the increments are stored on some different place). Also, it has support to Mac file attributes.
Reply With Quote
  #3  
Old June 19th, 2007, 07:08 AM
Registered User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
yogaboy is on a distinguished road
Thanks, I will give it a look. Sorry I didn't reply earlier, my access to internet has been severely limited since I moved into a new place, and I got the shakes and sweats - I'm an addict!

Thanks again.
Reply With Quote
Reply

Bookmarks

Thread Tools

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright 2000-2010 DigitalCrowd, Inc.