tar -cvf /dev/rmt/tc2 <filename>
to
tar -cvfb /dev/rmt/tc2 16 <filename>
To read the tar archive created, the command also needs to contain the specification for the block size.
List contents of tar archive:
tar -tvfb /dev/rmt/tc2 16
Extract contents of tar archive:
tar -xvfb /dev/rmt/tc2 16
Extract specific file from the contents of tar archive:
tar -tvfb /dev/rmt/tc2 16 <filename>
If you are trying to perform backups from UNIX, any of the following commands will also work. Keep in mind that none of them use the hardware compression abilities of the 4MM DAT drive, which is the reason we use the compress command as part of the examples.
The following command can be used create a backup of the root file system:
dump.bsd 0bsf 8k 2000m /dev/rmt/tc2 /dev/dsk/c0d0s0
The following command is used to restore the backup:
restore -xyvbf 8k /dev/rmt/tc2
Create Archive:
find . -print | cpio -ocv | tcb > /dev/rmt/tc2
Read Archive:
tcb < /dev/rmt/tc2 | cpio -icv
Create Archive:
find . -print | cpio -oc | compress | tcb > /dev/rmt/tc2
Read Archive:
tcb < /dev/rmt/tc2 | compress -d | cpio -icv
Create Archive:
tar -cvf - . | dd of=/dev/rmt/tc2 obs=8kx40
Read Archive:
dd if=/dev/rmt/tc2 ibs=8kx40 | tar -xvf -
Create Archive:
tar -cvf - / | tcb > /dev/rmt/tc2
Read Archive:
tcb < /dev/rmt/tc2 | tar -xvf -