tar write error

photographer24

Registered
Hello everyone,

I have a problem with the tar command. What I want to achieve is to make a backup of some files on one external hard drive (which has a capacity of 1TB and is formatted as FAT) to another external hard drive (500GB, FAT), and compress it in some way (preferably bzip2 to save space). To do this, I am using this command:

/Volumes/FOTOS $ tar cjfv /Volumes/fotobackup/fotos-20130209.tar.bz2 Fotos/

The files are mostly JPEG, some CR2 (Canon RAW), some MOV and THM and some CR2.xmp (created by darktable).

The problem is that, after a certain file, I get an error message like:
a Fotos/2013/02/07/IMG_1578.CR2tar: Write error
and tar terminates. I tried moving that file out of that directory, but then it happens with the next file (even if it's in another directory, so even moving away everything from 2013/02/07/ after the last working file didn't help).

It always happens after the same file, even if I try several times. I'm on OS X 10.8.2 on a Mid 2012 13 inch MacBook Air with German-language localization. It hasn't worked when using gzip instead of bzip2 either.

Do you have any idea how I could prevent this error and make it work? I would be very grateful.
 
Last edited:
Maximum FAT file size is 2GB, so I guess your problem is with the file system. Format the disk to exfat on Windows XP (or 7 or 8). OS X supports exfat, which allows much larger files (127 PB vs 2GB).
 
Maximum FAT file size is 2GB, so I guess your problem is with the file system. Format the disk to exfat on Windows XP (or 7 or 8). OS X supports exfat, which allows much larger files (127 PB vs 2GB).
Thank you for your response, this makes sense and really seems to be the cause. But according to some web research, it seems that it's actually 4 GiB rather than 2 (which is also where it stops working according to the Finder's file size indication).

Is it also possible to use UDF rather than exFAT? I did some web research and it seems that it's supported natively by all major platforms including Linux and FreeBSD, but it's intended mainly for optical drives - anyone here with some experience in using UDF hard drives? Are there any major limitations or problems?
 
Back
Top