Tape Inventory Job?

Everything about backing up to tape

Tape Inventory Job?

Veeam Logoby mhaug » Wed Oct 02, 2013 7:12 pm

I have a 17 Tape loader with my tape set getting swapped out weekly.
I would like to have Veeam automatically inventory my media set after I swap tapes.
How do I accomplish this?
mhaug
Influencer
 
Posts: 11
Liked: 2 times
Joined: Tue Mar 02, 2010 3:23 pm

Re: Tape Inventory Job?

Veeam Logoby Gostev » Wed Oct 02, 2013 7:47 pm

Probably the best way to do this, is schedule a PowerShell script that initiates tape inventory job weekly at a certain time. Thanks!
Gostev
Veeam Software
 
Posts: 21390
Liked: 2349 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Tape Inventory Job?

Veeam Logoby mhaug » Wed Oct 02, 2013 7:49 pm

I noticed a post covering this, I will give this a try.
Hoping that this counts towards a feature request.

Thanks

Matt
mhaug
Influencer
 
Posts: 11
Liked: 2 times
Joined: Tue Mar 02, 2010 3:23 pm

Re: Tape Inventory Job?

Veeam Logoby mhaug » Wed Oct 02, 2013 7:56 pm

Just to verify, I will only have to run this script one time for EACH new set of weekly tapes, correct?
Once they have all been inventoried, the next time that set is loaded and a job kicks off, Veeam will recognize them?
mhaug
Influencer
 
Posts: 11
Liked: 2 times
Joined: Tue Mar 02, 2010 3:23 pm

Re: Tape Inventory Job?

Veeam Logoby Dima P. » Thu Oct 03, 2013 9:55 am

Matt,

You perform inventory on tapes when you load them into the drive, then backup to tape is performed and all the information about this media is collected into tape catalogue which is stored inside Veeam server database. Pass some time if this media is loaded into the drive again Veeam B&R need to recognize it i.e. read meta data placed on media during backup to tape job. In order to do that you would need to run inventory job each time you load tape into tape library.

Currently we are looking in how we could improve the importing process and possibly implement auto import feature into Veeam B&R.
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Tape Inventory Job?

Veeam Logoby v.Eremin » Thu Oct 03, 2013 10:16 am

Though, be aware that previously provided script was related to standalone drive inventory. In case of tape library, you should use something different:

Code: Select all
asnp VeeamPSSnapin
$Library = Get-VBRTapeLibrary -name "Name of tape library"
$Library | Start-VBRTapeInventory


Hope this helps.
Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Tape Inventory Job?

Veeam Logoby mhaug » Fri Oct 04, 2013 3:06 pm 2 people like this post

I modified the script you provided and it is working perfectly.
Thank You to all who have responded, I appreciate the help.
Additionally, I am quite pleased with the file copy to tape job, it is cleaner and is perfect for replacing BackUp Exec.

Matt
mhaug
Influencer
 
Posts: 11
Liked: 2 times
Joined: Tue Mar 02, 2010 3:23 pm

Re: Tape Inventory Job?

Veeam Logoby v.Eremin » Fri Oct 04, 2013 3:07 pm

You’re welcome. Feel free to contact us, should any additional help be needed.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Tape Inventory Job?

Veeam Logoby Rainer Schmitt » Mon Nov 18, 2013 3:06 pm

Same Problem. Thanks for solving.
Rainer Schmitt
Lurker
 
Posts: 1
Liked: never
Joined: Mon Nov 18, 2013 2:53 pm

Re: Tape Inventory Job?

Veeam Logoby Luka » Thu Mar 13, 2014 3:01 pm

Hi

That script worked perfectly for me for a couple of weeks and it suddenly stopped working. I am getting the error below in ps

The script:

Code: Select all
asnp VeeamPSSnapin
$Library = Get-VBRTapeLibrary -name "FSC FibreCAT TX08 2.02"
$Library | Start-VBRTapeInventory

The error I am getting

Code: Select all
Get-VBRTapeLibrary : Exception has been thrown by the target of an invocation.
At C:\Veeam Scripts\auto-tape-inventory.ps1:2 char:30
+ $Library = Get-VBRTapeLibrary <<<<  -name "FSC FibreCAT TX08 2.02"
    + CategoryInfo          : NotSpecified: (:) [Get-VBRTapeLibrary], TargetIn
   vocationException
    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Veea
   m.Backup.PowerShell.Command.GetVBRTapeLibrary

Start-VBRTapeInventory : Cannot validate argument on parameter 'Library'. The a
rgument is null. Supply a non-null argument and try the command again.
At C:\Veeam Scripts\auto-tape-inventory.ps1:3 char:34
+ $Library | Start-VBRTapeInventory <<<<
    + CategoryInfo          : InvalidData: (:) [Start-VBRTapeInventory], Param
   eterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.Po
   werShell.Command.StartVBRTapeInventory
Luka
Influencer
 
Posts: 20
Liked: never
Joined: Fri Feb 21, 2014 12:27 pm

Re: Tape Inventory Job?

Veeam Logoby v.Eremin » Thu Mar 13, 2014 3:14 pm

Can you confirm that the library with the said name still exists? Also, have you performed product update recently? There was a case where something went wrong with component upgrade, and this resulted in user's inability to use previously written scripts.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Tape Inventory Job?

Veeam Logoby Luka » Thu Mar 13, 2014 3:24 pm

Hi

Yes that library still exists under same name

This is the result I am getting after running the script

Code: Select all
Get-VBRTapeLibrary : Exception has been thrown by the target of an invocation.
At C:\Veeam Scripts\test.ps1:2 char:34
+ $Library = Get-VBRTapeLibrary <<<<  -name "FSC FibreCAT TX08 2.02"
    + CategoryInfo          : NotSpecified: (:) [Get-VBRTapeLibrary], TargetIn
   vocationException
    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Veea
   m.Backup.PowerShell.Command.GetVBRTapeLibrary


A few weeks ago I has some issue with the tabe library shown in the Veeam software and one of member of your team asked me to run the SQl script, Also some other scripts were run by your technical teeam member to clear the error in our SQL DBase. The issue was sorted, but wonder if that could affect the

Code: Select all
Select *
Into #Temp
From [VeeamBackup].[dbo].[Tape.devices] where name in
(SELECT name FROM [VeeamBackup].[dbo].[Tape.devices] d1 GROUP BY name HAVING COUNT(name) = 2)

Declare @id uniqueidentifier

While (Select Count(*) From #Temp where state = '1') > 0
Begin

Select top 1 @id = id From #Temp where state = 1;
update #temp
set serial_number=(select serial_number from #Temp where state = '0' and name = (SELECT name FROM #Temp where id =@id))
where state = '1' and name = (SELECT name FROM #Temp where id =@id)

Delete from [VeeamBackup].[dbo].[Tape.devices] Where state = 0 and name = (SELECT name FROM #Temp where id =@id)
Delete from #Temp Where id = @id
End
Luka
Influencer
 
Posts: 20
Liked: never
Joined: Fri Feb 21, 2014 12:27 pm

Re: Tape Inventory Job?

Veeam Logoby v.Eremin » Fri Mar 14, 2014 8:39 am

Not sure what might have gone wrong, but you can try to reinstall PS snap-in, as indicated in the referenced thread.

Otherwise, you can raise this issue with support team and let them investigate it directly.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to Tape



Who is online

Users browsing this forum: No registered users and 6 guests