1850784 Members
3893 Online
104055 Solutions
New Discussion

Auto eject on a tape

 
SOLVED
Go to solution
Ian Warner
Trusted Contributor

Auto eject on a tape

How do I get a Surestore dat 40 drive to eject it's tape when a backup has finished?
I am running 11.11.

Ta

Ian Warner
Why did anyone invent unix?
6 REPLIES 6
Simon Hargrave
Honored Contributor

Re: Auto eject on a tape

You don't say how you're backing up (omniback, netbackup, fbackup,cpio, tar) however to rewind and eject a tape, you use: -

mt -f /dev/rmt/0mn offl
Ian Warner
Trusted Contributor

Re: Auto eject on a tape

Using SAM to run a scheduled backup


Ian
Why did anyone invent unix?
MarkSyder
Honored Contributor

Re: Auto eject on a tape

If you use /dev/rmt/0mn it automatically ejects the tape.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Simon Hargrave
Honored Contributor
Solution

Re: Auto eject on a tape

The SAM automated backup runs an fbackup via cron, using the sam script /usr/sam/lbin/br_backup

There are 3 ways to approach this:-

1. Create your own backup script which will perform the fbackup with your graph directly, then issue the mt offl command at the end of your script. This would be the best option.

2. Copy the br_backup script to an alternate location and edit it to include an offl. Change the crontab entry to point to this. Do NOT edit the file in-situ. It will be overwritten when SAM patches are later put on the server.

3. If you know your backups are always finished by a certain time, eg 7am, add an extra crontab at this time to run the offl. This however is not ideal eg if backups run late they will fail.
Darren Prior
Honored Contributor

Re: Auto eject on a tape

Hi Ian,

Just a reminder that as you are using fbackup via SAM's br_backup script that you cannot use a no-rewind device file.

regards,

Darren.
Calm down. It's only ones and zeros...
Fred Martin_1
Valued Contributor

Re: Auto eject on a tape

If you are using a shell script as I am, the method would be:

mt -t rew offl

I have a DLT drive so "offl" doesn't physically eject the tape, but the effect is the same. Software sees the tape as being ejected.

I don't recall if our DAT drive used to eject the tape physically - but I think it did.
fmartin@applicatorssales.com