cancel
Showing results for 
Search instead for 
Did you mean: 
harsi
Level 5

This little script may be useful to others making backups to multiple removable disks.

The main problem with this approach is that there is no place within BE's GUI and no report to find out on which of your removable disks a certain media file is present.

You have the location column within the media overview which carries the backup-to-disk-folder name where a certain media file is present however this information is not persistent, meaning it only shows the medias for the disk which is currently plugged in and vanishes for all offline b2d folders if you start an inventory job or restart BE services.

So what to do if you choose some files you want to restore from within BE and the only thing BE tells you is that these files are located on media B2D001486? Plug in one removable disk after the other, start an inventory job, and see if the media file in question appears in the device view.

This is the point where this litte script jumps in. It collects the information on which b2d-folder a media is stored and writes it into the media description field.

This way the information is made persistend and can be viewed within the GUI or a report.

Simply run the script once a day after all backups are done.

The script is written for BackupExec 2010 R2 and requires MSSQL 2008 or 2008 R2 as it uses MSSQL's native client.

Cheers.

Comments
Kiran_Bandi
Level 6
Partner Accredited

Thanks mate... It is really helpful...

BryanK7
Level 2

I'm getting the following error.  Any advice?

harsi
Level 5

Which version of MSSQL are you usgin?

Is the SQL server located on the same machine as BE itself?

Cheers.

Michael_D1
Level 2

Hello Harsi,

 

your script is exactly what I need. But I use SQL Server 2005 and I think, that is why the script dosn't work. Is it possible for you to write a script for sql 2005?

Thank you, Michael.

WATC
Level 3

The script connects to 'localhost' i.e. the server the script is running on.

If you've done a custom install are you maybe using a SQL Server instance on another server? If so, you'll either need to run the script on that server, or change the con.Open() call to use your actual servers' name.

Michael_D1
Level 2

The SQL Server instance is on the same Server.

Error see attached File.

 

Michael.

 

harsi
Level 5

That would mean to write a new script from scratch.

However the problem is not the server version but the client version.

You can try to install the new client (native client 10.0 from sqlncli.msi) which comes with SQL Server 2008 R2. It is fully compatible with SQL 2005 server.

Cheers.

eddiert
Not applicable

I suspected that the script was having a problem connecting to the server by name as the SQL instance was not the default.  I tried inserting the name as server\instance but continued to get the error above.  Here's what I did to get it to work.

Installed the SQL 2008 native client

In SQL configuration manager, SQL native client, aliases I had to create an alias, I called it bexec, to the sql instance choosing named pipes and the server name using server\instance syntax.

In the script edit line 24 replacing server=localhost with server=bexec

Now it appears to run fine.  I think it is exactly what I am looking for. I am going to put the script as a post-backup script on my jobs.  Thanks.

Version history
Last update:
‎01-18-2011 10:58 AM
Updated by: