Problem
When restoring an SCO OpenServer Release 5.0 filesystem or directory structure using 'tar -x' onto an SCO Open Server 3.0 server, I receive the error:
tar: ./<dir_name>/<fname> - cannot create
tar: cannot make directory ./<dir_name>/<fname>This error will occur even if the subdirectory structure already exists on the 3.0 system.
Cause
SCO OpenServer 5.0 includes a new tar(C) binary. This new version
of tar adds the ability to follow symbolic links and archive new
directory structure information. The older versions of tar cannot
follow the symbolic links and cannot use the new directory
information. Old versions of tar(C) will attempt to create the
subdirectory, but instead will fail and generate a 0 byte file
with the subdirectory's name.This problem does not manifest itself if there are only files
on the tar(C) media to be restored. Empty files will be created,
but empty subdirectories will not appear. Solution
1. Use the '-P' flag when you generate the 5.0 tar(C) media to
preserve compatibility with older UNIX versions. This will prevent
tar(C) from following symbolic links when restoring on an older
version.The tar command can be given on any other options or flags that are desired.
Example:5.0 System tar(C) floppy creation:
cd /u/data
tar cvP6 ./*
3.0 System restore:
cd /u/<dir_name>
tar xv62. If you have a tar(C) archive that was created in SCO OpenServer
Release 5.0.0 without using the '-P' toggle, you may use the -w
flag for tar(C) to restore on an 3.0 System. This will prompt you
before extracting each file allowing you to bypass the entries for
the directories.3. One other solution is to cd directly into the subdirectory
on SCO OpenServer 5.0.0 and generate a backup of files only. The
tar(C) restore on older releases does not have a problem restoring
files only.