Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Backup Exec 2010, Import tape to Library partition

Created: 20 Nov 2012 | 2 comments

Hi all,

I'm having a problem setting up the following.

We have a backup scheme set up that during the week we have a daily backup and in the weekend a job where the tape needs to be ejected and stored outside of the office.

We have about 10 locations where there are no admins locally present.

So far so good, when the weekly job finishes and the tape exports to the mailslot and there is a seperate job to unlock the library.

The problem now is that I want to import a new tape that will be inserted by the user who has the responsibility to change the tapes.

The weekly backups are set to use a tape in a partition that contains 8 slots. I know it is possible to schedule an import job to a specific slot.

But is it also possible to let it import to any available slot within the partition?

Comments 2 CommentsJump to latest comment

Colin Weaver's picture

Currently the import job crated in the console requires a nominated slot.

I have done some research with BEMCLI and you can script a way to go to first empty slot (in a library) not sure you can do same thing with a partition as I was not looking into that at the time. It is possible that the Partition is seen as a named device that you can  use in place of LIB1 below. Problem is I am not sure how you work out the device name for the partition.

1) Make sure Powershell is installed on the media server and that you can run the Backup Exec Management Command Line Interface (BEMCLI)
2) Create a scripts folder somewhere on a harddisk of the media server (I tested with D:\scripts)
3) In this folder create a text file called import.ps1 (make sure it does not have a .txt extension after the ps1)
4) In this file enter the following 4 lines
$library = Get-BERoboticLibraryDevice "LIB1"
$slot = $library|Get-BERoboticLibrarySlot|where-object{$_.Media-like ""}|select-object -first 1
$slot|Submit-BEImportMediaJob -InventoryAfterImport

5) Change the LIB1 entry in the second line to match the name of your library as seen in the Storage section of the Backup Exec console before saving the file.
6) Also in the folder create a .bat file containing the following two lines
powershell.exe d:\scripts\import.ps1
7) Edit the first line in the batch file so that path to the ps.1 file is correct before saving
8) Then configure the Windows Task scheduler to run the .BAT file once a day as required. Note you might want to make sure a tape is in a mailslot and then run the . bat file directly to test operation.

Note 1: The above command will detect the first empty tape slot - however might also detect a slot containing a tape with no label, as such try to make sure all tapes are labeled (barcodes might automatically label the media)
Note 2: Neither myself or the developer that assisted me with the commands had access to a library with a mailslot so please feedback on if this does meet requirements

We also had feedback from one customer as follows

"When I execute the script manually, I see the message that it’s not allowed to execute unsigned scripts.
So I changed the settings:

Set-ExecutionPolicy RemoteSigned"

Finally you have to be aware of the content of and allow a 20minute time gap  for it to work and you may also have to do this

1) Run Beutility.exe from the Backup Exec program files folder
2) Accept the warning as it starts
3) Open "All Backup Exec Servers" you should see your media server listed
4) Right click on your media server and select Edit Configuration
5) Change the "Media Insert Alert" to Yes or OK
6) Click OK
7) Close Beutility

pkh's picture

Since you are using BE 2010, you can use my BEMCMD script to import

When you upgrade to BE 2012 which uses BEMCLI, you can use my other script to do the automatic import