I was recently tasked with backing up data from an Xserve to a NAS device on Linux. I chose an IRIX host to perform the task because it was used in a very limited fashion and would not be missed. I chose tar for the backup because it was "non-destructive" and did not have the file limitations of cp or dd. I set up a cron job that at midnight would run the tar command:
tar cf - /hosts/xserve/Volumes/xraid/current/jobname | (cd /hosts/hammer/vol8/backup/jobname; tar xf -)
Under IRIX, this command sucessfully copies the target files into standard input one at a time. The output (a tarball in standard input) is piped to the landing directory and then extracted.
For some reason, this command does not work with the Xserver on OSX Panther. The result: the original files are currupted and there is no backup. This seems to be limited to image files. It was originally noted in jpeg files but can also be seen in non-compressed image files. It appears the Maya and Boujou files are not corrupted.
The error is hidden by the cron (no shell is opened) but when I tested the failure I got this report:
x /hosts/xserver/Volumes/xraid/Employees/John/johntest.0001.jpg 276330 bytes, 544 blockstar: /hosts/xserve/Volumes/xraid/Employees/John/johntest.001.jpg: file changed size
The resultant is a corrupted original that either does not open in say Photoshop or has a bit slip (partial image dropping to noise). Tests showed that this command worked correctly on two SGIs through the automount and worked correctly with an SGI to the Linux NAS via automount and amd. It would appear the cause is Apple's implementation of NFS, the NFS mount function and a remote tar command.
What could have been done to prevent this? First - NEVER ASSUME! I assumed that since this command worked in IRIX which is a BSD/UNIX V hybrid and that tar is open source that Apple UNIX (also a BSD/UNIX V hybrid) would not have any issue. Second - TEST TEST TEST! I performed a short test of the script command on a series of non data files (touch fname.0001.test ...). I should have copied data to a test point and used it.
tar cf - /hosts/xserve/Volumes/xraid/current/jobname | (cd /hosts/hammer/vol8/backup/jobname; tar xf -)
Under IRIX, this command sucessfully copies the target files into standard input one at a time. The output (a tarball in standard input) is piped to the landing directory and then extracted.
For some reason, this command does not work with the Xserver on OSX Panther. The result: the original files are currupted and there is no backup. This seems to be limited to image files. It was originally noted in jpeg files but can also be seen in non-compressed image files. It appears the Maya and Boujou files are not corrupted.
The error is hidden by the cron (no shell is opened) but when I tested the failure I got this report:
x /hosts/xserver/Volumes/xraid/Employees/John/johntest.0001.jpg 276330 bytes, 544 blockstar: /hosts/xserve/Volumes/xraid/Employees/John/johntest.001.jpg: file changed size
The resultant is a corrupted original that either does not open in say Photoshop or has a bit slip (partial image dropping to noise). Tests showed that this command worked correctly on two SGIs through the automount and worked correctly with an SGI to the Linux NAS via automount and amd. It would appear the cause is Apple's implementation of NFS, the NFS mount function and a remote tar command.
What could have been done to prevent this? First - NEVER ASSUME! I assumed that since this command worked in IRIX which is a BSD/UNIX V hybrid and that tar is open source that Apple UNIX (also a BSD/UNIX V hybrid) would not have any issue. Second - TEST TEST TEST! I performed a short test of the script command on a series of non data files (touch fname.0001.test ...). I should have copied data to a test point and used it.