useing a dat on solaris 8

How do I access my dat tape drive
on my UNIX box?

I need to know the way to write files to it
and how to recover them. I am running Solaris 8.

Should I just use tar and write to the device?
how do I determine the device name. What is the
best way.

How do I control the tape rewind and forward

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

assuming you've done a boot -r to build the device tree, the default device is /dev/rmt/0.  tar should work fine, as it uses this devices as default.
mt fsf (magnetic tape fast forward)
mt rew (magnetic tape rewind)
mt offline (magnetic tape eject)
mt fsf 2 (fast forward two volumes, if you've used ufsdump to write / , /usr, /var, /opt to a dat this would move you the begining of the /var volume on the tape.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
1. tape drive connect and on
2. drvconfig (start as root)
3. mt -f /dev/rmt/0n status
4. if OK then start tar or other command(ufsrestore)
5. mt -f /dev/rmt/1n status

I assume that you can see the tape drive. (Another user stated to use <drvconfig> that use forgot to also issue <devlinks> and then <tapes>.  This method is depricated.)

For Solaris 8 and newer, use one step <devfsadm>.

Once you can see the tape ( mt -f /dev/rmt/0n status ) with a tape in the drive.

Now to answer your question as to the method used for copiying data to and fro your tape.

I would suggest ufsdump to backup your system.

I would suggest ufsrestore to resotre your system(read the man page especially concerning the -i option for interactrive restore)
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Here's what you can do to use your tape drive:

   Assume you want to use the non-rewind tape device /dev/rmt/0n
   Information about tape device can be found:

   You can use tar, usfdump, cpio, dd to copy date to the tape.

   The base tape operation command is the "mt" command

     Tape rewind:
     # mt -f /dev/rmt/0n rewind
     Print Tape status
     # mt -f /dev/rmt/0n status  
     forword the tape over count EOF mark (x times)
     # mt -f /dev/rmt/0n fsf x

     man mt
     for more details


     use tar to backup files to the tape:
     tar -cvf /dev/rmt/0n file-names
     To verify what's on the tape (assume tar format)
     mt -f /dev/rmt/0n rewind
     tar -tvf /dev/rmt/0n
     to restore (assume the file name use related path)
     cd /myrestore-dir
     tar xvf /dev/rmt/0n
     man tar
     to learn more details.

     PS: tar is not suitable for system level backup, not for copy special files, such as device files etc. for normal file is ok.

     For system level backup and restore, use ufsdump and ufsrestore.

     eg: backup a file system to the tape:
          /usr/sbin/ufsdump 0cf /dev/rmt/0n /export
          will dump the whole /export file system to tape.

         To verify what's on the tape:
         mt -f /dev/rmt/0n rewind
         ufsrestore tvf /dev/rmt/0n
         To restore it:
         mt -f /dev/rmt/0n rewind
         cd /myrestore-dir
         /usr/sbin/ufsrestore xvf /dev/rmt/0n

         do a man ufsdump and ufsrestore to learn more.


I agree with yuzh.  I just wanted to add that you may want to buy/go to a bookstore and look at O'Reilly's "Unix Backup & Recovery" book (1999, W. Curtis Peterson author) if you are going to be doing any significant work in backup and recovery.  There is a LOT of good stuff in there.  You can look at for more info on the book.

--- M
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Points split liddler, Otetelisanu & yuzh

Please leave any comments here within the next four days.


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.