-
- Enthusiast
- Posts: 26
- Liked: 3 times
- Joined: Apr 15, 2011 2:15 pm
- Full Name: Mark Smith
- Location: Devon, UK
- Contact:
Veeam Tape Inventory
I might be missing an option in the new v7 console but I am trying to set up a scheduled inventory of the tape drives (standard drives, no robotic library) so that when our Helpdesk put in the new daily tapes they don't have to manually inventory the drives. My logic is that all the jobs kick in at 2am so if I got the system to do an inventory at 1am the jobs would know what is in the drives and the jobs would run as expected.
Any ideas on what I can do, or am I missing the obvious menu?
Any ideas on what I can do, or am I missing the obvious menu?
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
You can write a simple PS script that will get corresponding tape drives and inventory a tape medium that is put into it. After that, you can schedule (via Windows Scheduler) this script to run at a given time:
Thanks.
Code: Select all
asnp VeeamPssnapin
foreach ($Drive in Get-VBRTapeDrive)
{
$Drive.TapeMedium | Start-VBRTapeInventory
}
-
- Enthusiast
- Posts: 26
- Liked: 3 times
- Joined: Apr 15, 2011 2:15 pm
- Full Name: Mark Smith
- Location: Devon, UK
- Contact:
Re: Veeam Tape Inventory
Thanks for that, sounds just what I was looking for. Do you know if there is a way I can rename the drives themselves in VBR as the two I have both come up with the same name and it would be good to be able to identify which is which:
Code: Select all
PS C:\Windows\system32> Get-VBRTapeDrive
IsLocked : False
Model : IBM ULTRIUM-HH5 SCSI Sequential Device
State : Loaded
LoadedMedia : Daily1A
DeviceId : f5869f4a-acc9-4446-9d03-02cfe0ef28b8
Enabled : True
Library : IBM ULTRIUM-HH5 SCSI Sequential Device
Address : 0
Location : Veeam.Tape.Model.TapeMediumLocation
LoadedTapeMediumId : 74879492-3b1a-43f0-8a28-7db925458e64
TapeMedium : Daily1A
InternalState : Veeam.Tape.Model.DbTapeDrive
IsLocked : False
Model : IBM ULTRIUM-HH5 SCSI Sequential Device
State : Empty
LoadedMedia :
DeviceId : dda137c0-c6f3-4fb4-ac4f-517d53f2bc56
Enabled : True
Library : IBM ULTRIUM-HH5 SCSI Sequential Device
Address : 0
Location : Veeam.Tape.Model.TapeMediumLocation
LoadedTapeMediumId : 00000000-0000-0000-0000-000000000000
TapeMedium :
InternalState : Veeam.Tape.Model.DbTapeDrive
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Hi, Mark. It seems impossible to change this setting through either GUI or PS. However, as the drives in question have different device ID, by the means of which they can be easily distinguished.
Thanks.
Thanks.
-
- Enthusiast
- Posts: 26
- Liked: 3 times
- Joined: Apr 15, 2011 2:15 pm
- Full Name: Mark Smith
- Location: Devon, UK
- Contact:
Re: Veeam Tape Inventory
I noticed that but wasnt sure how to call it via that, I am trying to run the code simular to what you were suggesting but a single job for each drive. I am running
Which works perfectly but only calls the first drive, do you know how I can reference it via ID ?
Code: Select all
Start-VBRTapeInventory -Library "IBM ULTRIUM-HH5 SCSI Sequential Device"
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
From my perspective, something like this should meet your expectations.
Drive#1
Drive#2
Thanks.
Drive#1
Code: Select all
asnp VeeamPSSnapin
$Drive1 = Get-VBRTapeDrive | Where {$_.deviceid -eq "f5869f4a-acc9-4446-9d03-02cfe0ef28b8"}
$Drive1.TapeMedium | Start-VBRTapeInventory
Code: Select all
asnp VeeamPSSnapin
$Drive2 = Get-VBRTapeDrive | Where {$_.deviceid -eq "dda137c0-c6f3-4fb4-ac4f-517d53f2bc56"}
$Drive2.TapeMedium | Start-VBRTapeInventory
-
- Enthusiast
- Posts: 26
- Liked: 3 times
- Joined: Apr 15, 2011 2:15 pm
- Full Name: Mark Smith
- Location: Devon, UK
- Contact:
Re: Veeam Tape Inventory
You are a start, that is perfect! thanks a lot.
-
- Enthusiast
- Posts: 26
- Liked: 3 times
- Joined: Apr 15, 2011 2:15 pm
- Full Name: Mark Smith
- Location: Devon, UK
- Contact:
Re: Veeam Tape Inventory
Star even!
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Thanks, Mark, for your kind words. Should any additional help be needed, don't hesitate to let us know.
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
Hello !
I'm trying to do a similar thing with the script, however, when the tape was used by our previous backup software (Backup Exec 2010), the file to tape job stays on the waiting tape status.
What should I do to correct this ?
Thanks !
Jean
I'm trying to do a similar thing with the script, however, when the tape was used by our previous backup software (Backup Exec 2010), the file to tape job stays on the waiting tape status.
Code: Select all
Add-PSSnapin VeeamPSSnapin
Get-VBRTapeDrive | Start-VBRTapeInventory
$tape = Get-VBRTapeMedium | Where-Object {$_.IsOnline -like "True"}
$tape.MarkAsFree()
Start-VBRJob -Job "NameOfJob" -FullBackup
Eject-VBRTapeDrive -Drive "Tape0"
What should I do to correct this ?
Thanks !
Jean
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
You mean, the script provided above doesn't seems to work, right?
If my memory serves me well, the tape that has data written to it by different backup software is automatically assigned to "Unrecognized" media pool. So, within the script you can try to examine "Unrecognized" Media Pool, see whether there is a cassette there, then, move this cassette to "Free" Media Pool or even erase it, and, finally, execute the given tape job.
Thanks.
If my memory serves me well, the tape that has data written to it by different backup software is automatically assigned to "Unrecognized" media pool. So, within the script you can try to examine "Unrecognized" Media Pool, see whether there is a cassette there, then, move this cassette to "Free" Media Pool or even erase it, and, finally, execute the given tape job.
Thanks.
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
The script will work except if the tape was used by another software.
I've tried to move a tape from unrecognised media pool to my default media pool but I get a confirmation message in powershell that I can't get rid of...
I think that I used this cmdlet :
Move-VBRTapeMedium
Thanks in advance !
Jean
I've tried to move a tape from unrecognised media pool to my default media pool but I get a confirmation message in powershell that I can't get rid of...
I think that I used this cmdlet :
Move-VBRTapeMedium
Thanks in advance !
Jean
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Have you tried to add -Confirm:$false parameter to the end of line? This way, you shouldn't get confirmation message.
Thanks.
Thanks.
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
Oups, I tried -Confirm $false...
It works perfectly with -Confirm:$false
I'm just starting with Powershell... Sorry for this and thanks for your help !
It works perfectly with -Confirm:$false
I'm just starting with Powershell... Sorry for this and thanks for your help !
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
No problem, you can get most of information regarding Veeam PS snapin, using our online Help Center, as well as, the corresponding subforum. Thanks.
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
Here's my script now.
It works !
It that can help someone :
So the script will check which tape is online, move it to the wanted media pool, mark it as free, start the backup job to tape and eject the tape when done.
Enjoy !
Jean
It works !
It that can help someone :
Code: Select all
Add-PSSnapin VeeamPSSnapin
Get-VBRTapeDrive | Start-VBRTapeInventory
$tape = Get-VBRTapeMedium | Where-Object {$_.IsOnline -like "True"}
Move-VBRTapeMedium -Medium $tape -MediaPool "Your Media Pool" -Confirm:$false
$tape.MarkAsFree()
Start-VBRJob -Job "Your Backup Job to Tape" -FullBackup
Eject-VBRTapeDrive -Drive "Tape0"
Enjoy !
Jean
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
From my perspective, as long as, "add tapes from free media pool" option is selected in the media pool settings, you can, probably, remove the line responsible for moving tape to the given media pool. Also, if "eject media once the job finishes" options is ticked in the setting of the tape job, you remove "ejection" line, as well.
Anyway, I glad to hear that you've finally nailed it.
Thanks.
Anyway, I glad to hear that you've finally nailed it.
Thanks.
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
The line moving the tape to the correct media pool is there to avoid problems when the tapes where used with another software (Backup Exec in my case).
Without it, the job is waiting for a tape because it's sitting in the unrecognised media pool...
The "eject media once the job finishes" button never worked for me...
I may have to retest it (don't know if I have tested it since RTM version)...
Without it, the job is waiting for a tape because it's sitting in the unrecognised media pool...
The "eject media once the job finishes" button never worked for me...
I may have to retest it (don't know if I have tested it since RTM version)...
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
You might want to test this functionality again. This time with the latest product version, as the said issue should have been fixed in the first patch.The "eject media once the job finishes" button never worked for me. I may have to retest it (don't know if I have tested it since RTM version)...
Thanks.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Feb 26, 2014 4:42 am
- Full Name: Jed Parkes
- Contact:
Re: Veeam Tape Inventory
I'm having this same issue.jgl75 wrote:The line moving the tape to the correct media pool is there to avoid problems when the tapes where used with another software (Backup Exec in my case).
Without it, the job is waiting for a tape because it's sitting in the unrecognised media pool...
Does anyone know how to move media (that was used with Backup Exec) from unrecognised media pool to correct media pool?
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
Have you tried my script ?
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
I'm wondering whether you want to preserve the data written by BE or just overwrite the mediums used previously by BE. In latter case, you can either erase the tapes or mark them as free to move the tapes to the Free media pool.jed-hyper wrote:Does anyone know how to move media (that was used with Backup Exec) from unrecognised media pool to correct media pool?
Thanks.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Feb 26, 2014 4:42 am
- Full Name: Jed Parkes
- Contact:
Re: Veeam Tape Inventory
I just want to overwrite the mediums used previously by BE.
I have tried the script but i get this error Move-VBRTapeMedium command
I have tried the script but i get this error Move-VBRTapeMedium command
Code: Select all
PS C:\Users\Administrator> Move-VBRTapeMedium -Medium $tape -MediaPool "Media Pool All" -confirm:false
Move-VBRTapeMedium : Cannot convert 'System.String' to the type 'System.Management.Automation.SwitchParameter'
required by parameter 'Confirm'.
At line:1 char:71
+ Move-VBRTapeMedium -Medium $tape -MediaPool "Media Pool All" -confirm:false
+ ~~~~~
+ CategoryInfo : InvalidArgument: (:) [Move-VBRTapeMedium], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,Veeam.Backup.PowerShell.Command.MoveVBRTapeMedium
-
- Influencer
- Posts: 24
- Liked: 5 times
- Joined: Oct 02, 2013 6:23 am
- Contact:
Re: Veeam Tape Inventory
You have to use : -Confirm:$false
The dollar sign must be there.
The dollar sign must be there.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Yep, you seem to have missed dollar sign that is required for confirmation switch. Also, you need a script only if you want to move mediums in automatic fashion. Otherwise, the said process can be done manually.
Be aware, that provided script marks every online tape as free, not only tapes belonging to "Unrecognized" pool. So, if I were you, I would use something like this:
Thanks.
Be aware, that provided script marks every online tape as free, not only tapes belonging to "Unrecognized" pool. So, if I were you, I would use something like this:
Code: Select all
$MediaPool = Get-VBRTapeMediaPool -Name "Unrecognized"
$FreeMediaPool = Get-VBRTapeMediaPool -Name "Free"
$Mediums = $MediaPool | Get-VBRTapeMedium
Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool -Confirm:$false
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Feb 26, 2014 4:42 am
- Full Name: Jed Parkes
- Contact:
Re: Veeam Tape Inventory
Damn i typed previous post wrong, i was doing it with the $ and getting that error. Any ideas what i'm doing wrong?
Code: Select all
PS C:\Users\Administrator> $MediaPool = Get-VBRTapeMediaPool -Name "Unrecognized"
PS C:\Users\Administrator> $FreeMediaPool = Get-VBRTapeMediaPool -Name "Free"
PS C:\Users\Administrator> $Mediums = $MediaPool | Get-VBRTapeMedium
PS C:\Users\Administrator> Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool -Confirm:$false
Move-VBRTapeMedium : Method not found: 'Void Veeam.Tape.Core.TapeMedium.Clean()'.
At line:1 char:1
+ Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Move-VBRTapeMedium], MissingMethodException
+ FullyQualifiedErrorId : System.MissingMethodException,Veeam.Backup.PowerShell.Command.MoveVBRTapeMedium
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Hmmm, I tested this script in my environment and everything seems to have worked properly.
As a side option you can change the name of second media pool and see whether it makes any difference. It appears that you want to move all unrecognized tapes to the media pool named "Media Pool All", right? If so, try the following example:
Thanks.
As a side option you can change the name of second media pool and see whether it makes any difference. It appears that you want to move all unrecognized tapes to the media pool named "Media Pool All", right? If so, try the following example:
Code: Select all
asnp VeeamPSSnapin
$MediaPool = Get-VBRTapeMediaPool -Name "Unrecognized"
$MediaPool2 = Get-VBRTapeMediaPool -Name "Media Pool All"
$Mediums = $MediaPool | Get-VBRTapeMedium
Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool2 -Confirm:$false
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Feb 26, 2014 4:42 am
- Full Name: Jed Parkes
- Contact:
Re: Veeam Tape Inventory
Yeah trying to move all unrecognised tapes.
Still no luck should i call tech support about this or is there something else i should try?
Still no luck should i call tech support about this or is there something else i should try?
Code: Select all
PS C:\Users\Administrator> asnp VeeamPSSnapin
PS C:\Users\Administrator> $MediaPool = Get-VBRTapeMediaPool -Name "Unrecognized"
PS C:\Users\Administrator> $MediaPool2 = Get-VBRTapeMediaPool -Name "Media Pool All"
PS C:\Users\Administrator> $Mediums = $MediaPool | Get-VBRTapeMedium
PS C:\Users\Administrator> Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool2 -Confirm:$false
Move-VBRTapeMedium : Method not found: 'Void Veeam.Tape.Core.TapeMedium.Clean()'.
At line:1 char:1
+ Move-VBRTapeMedium -Medium $Mediums -MediaPool $MediaPool2 -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Move-VBRTapeMedium], MissingMethodException
+ FullyQualifiedErrorId : System.MissingMethodException,Veeam.Backup.PowerShell.Command.MoveVBRTapeMedium
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam Tape Inventory
Strange behaviour, indeed. As I have said, the script seems to be working properly in my environment.
You can contact support team and let them investigate it directly.
However, if I were, I would try to reinstall PS snap-in first, as "method not found" very specific error, indicating inconsistencies in versions, etc.
Thanks.
You can contact support team and let them investigate it directly.
However, if I were, I would try to reinstall PS snap-in first, as "method not found" very specific error, indicating inconsistencies in versions, etc.
Thanks.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Feb 26, 2014 4:42 am
- Full Name: Jed Parkes
- Contact:
Re: Veeam Tape Inventory
Fixed it. I had
1. Installed Version 7
2. Installed Version 7 Patch 3 update
3. Ran the Version 7 install again and added the PS snap-in
Then i got the error System.MissingMethodException,Veeam.Backup.PowerShell.Command.MoveVBRTapeMedium
I had to run the Version 7 Patch 3 update again and that fixed the issue.
1. Installed Version 7
2. Installed Version 7 Patch 3 update
3. Ran the Version 7 install again and added the PS snap-in
Then i got the error System.MissingMethodException,Veeam.Backup.PowerShell.Command.MoveVBRTapeMedium
I had to run the Version 7 Patch 3 update again and that fixed the issue.
Who is online
Users browsing this forum: No registered users and 4 guests