useing a dat on solaris 8

Posted on 2003-02-25
Medium Priority
Last Modified: 2013-12-27
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

Question by:thedogeater
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 18

Accepted Solution

liddler earned 200 total points
ID: 8015524
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.


Assisted Solution

Otetelisanu earned 200 total points
ID: 8015618
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


Expert Comment

ID: 8022265
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)
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

LVL 38

Assisted Solution

yuzh earned 200 total points
ID: 8023768
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.



Expert Comment

ID: 8025570
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 http://www.oreilly.com/unixbr/ for more info on the book.

--- M
LVL 18

Expert Comment

ID: 10425949
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

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question