1846588 Members
2142 Online
110256 Solutions
New Discussion

backup problems

 
Jeff Hagstrom
Regular Advisor

backup problems

We have a Roarke Data tape drive that we tar some directories to. tar -cvf /dev/rmt/2m . We are using Sony SDX1-25C tapes. We purchased a new box of 5 tapes. The area being backed up is only 17 gig. Sometimes it works and sometimes it doesn't. I used the new box of tapes and it worked all week. So we thought it might be the tapes. So we used them again, and it worked every other time. Most messages are "Can't open /dev/tty to prompt for more media.". It's asking for more tapes. Are there any log files for that I can look at? There is nothing being sent to roots mail.
6 REPLIES 6
Peter Godron
Honored Contributor

Re: backup problems

Jeff,
the Sony tapes are 25Gb native/65Gb compressed, so should be ok if you are only backing up 17Gb.
You could try a -tvf on the failed tapes and check what is attempted to be backed up when it runs out of tape.
Somebody may be mounting additional disks without your knowledge, check your cron schedule.
What does the tar -cvf command log show when you run your tar? Your /dev/rmt/2m is a no-rewind device file, correct?
Jeff Hagstrom
Regular Advisor

Re: backup problems

At the time we do back ups, there is nobody on the system and the database are brought down. What do you mean by a no-rewind device? IT won't rewind the tape before it starts to write? Is there a command that has to be given before writing to make it rewind?
TwoProc
Honored Contributor

Re: backup problems

A no rewind device would end in "n" in the device name. For example: /dev/rmt/0mn is the no-rewind device file for /dev/rmt/0m. This is the same tape drive, but if you use the "n" interface, the tape *won't* automatically rewind at the end of the operation. So, if you keep a tape in the drive and use the no-rewind interface, you'll keep appending to the tape, instead of overwriting.

Of course, when you pop the tape out, and then put it back in, it's already rewound before you start.

The command to rewind a tape is "mt -t /dev/rmt/0m rew". Of course, the /dev/rmt/0m is just an example, and you'd substitute the device name for your tape drive there.

In other words let's go over the following:

put in a tape
*position = beginning
"tar cvf /dev/rmt/0m /somefilesystem "
*position = beginning
"mt -t /dev/rmt/0m rew"
*position = beginning
"mt -t /dev/rmt/0m rew"
*position = beginning

let's do another one:
put in a tape
*position = beginning
"tar cvf /dev/rmt/0mn /somefilesystem"
*position = after tar file from last command
"tar cvf "/dev/rmt/0mn /anotherfilesystem"
*position = after tar file from last command
"mt -t /dev/rmt/0m rew"
*position = beginning"

Hopefully, you can see from above the difference. HTH.
We are the people our parents warned us about --Jimmy Buffett
radi_1
Frequent Advisor

Re: backup problems

Hi Jeff,
I have the same problem with hp DDS3 tape units on old boxes(G-class)and tar gives exactly the same error(tar:can't open /dev/tty ....etc ).
but i could not find a way around it,so i dicided to use the hp-ux command fbackup instead starting on 1/3 and see what comes up.maybe the tar command or the system need some patching
never take simple maters for granted
AshishJain_USA
Frequent Advisor

Re: backup problems

Hi Jeff

You mentioned that when you take the backup, the database is shutdown. My query is whether you are using Raw edvice for your database ?
If the answer is YES, this is where your problem lies because Raw Devices aren't a part of filesystem and your actual total usage would then be more than 17 GB.


rgds...Ashish
Peter Godron
Honored Contributor

Re: backup problems

Jeff,
I would first look what is being written to tape by use of tar -tvf /dev/rmt/2m.

Have you tried adding up the total backup spec with du -sk /dir-to-be-backed-up.

I do like radi idea of using fbackup, but is this switch of backup available to you.

Ashish idea with raw devices would suprise be, as if the raw device is not visible to the file system, how would tar know it is there to be backed up?