-
- Enthusiast
- Posts: 32
- Liked: 3 times
- Joined: Nov 06, 2017 12:55 pm
- Full Name: Yannick Metz
- Contact:
Inventory and erase tape automaticly
Hello,
i am using a script that does an inventory and an erase before every tape job starts.
I had some issues with it and the support said custom scripts are not supported.
Can anyone give me a supported script for my case?
The powershell script looks like this:
Add-PSSnapin VeeamPSSnapin
$tape = Get-VBRTapeMedium –library “Tape LTO-6 Week” | where {$_.location.type –eq “drive”}
Start-VBRTapeInventory –library „tape –LTO-6 Week” –wait
Erase-VBRTapeMedium –Medium $tape
Thanks and best regards
Y
i am using a script that does an inventory and an erase before every tape job starts.
I had some issues with it and the support said custom scripts are not supported.
Can anyone give me a supported script for my case?
The powershell script looks like this:
Add-PSSnapin VeeamPSSnapin
$tape = Get-VBRTapeMedium –library “Tape LTO-6 Week” | where {$_.location.type –eq “drive”}
Start-VBRTapeInventory –library „tape –LTO-6 Week” –wait
Erase-VBRTapeMedium –Medium $tape
Thanks and best regards
Y
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Inventory and erase tape automaticly
What exact issues do you have? Firstly I'd start with changing the line order (line 3 and 2), so tape discovery happens after library inventory. Thanks.
-
- Enthusiast
- Posts: 32
- Liked: 3 times
- Joined: Nov 06, 2017 12:55 pm
- Full Name: Yannick Metz
- Contact:
Re: Inventory and erase tape automaticly
Some times the script only inventories the the tape but does not erase it,
some times it does nothing
or it inventories it but removes it from catalog so that i have to move it in the mediapool again.
support could not help very much.
so the discovery starts in the erase task? It will try to erase the old tape and not the new tape i just put in the drive
Thank you
some times it does nothing
or it inventories it but removes it from catalog so that i have to move it in the mediapool again.
support could not help very much.
so the discovery starts in the erase task? It will try to erase the old tape and not the new tape i just put in the drive
Thank you
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Inventory and erase tape automaticly
Nope, you should assign tape to variable after inventory, not after. I think this is the root cause of the issues experienced.so the discovery starts in the erase task?
Inventory updates information regarding tape device and tapes present in it. So, that's why this step should be first:
Code: Select all
Add-PSSnapin VeeamPSSnapin
Start-VBRTapeInventory –library „tape –LTO-6 Week” –wait
$tape = Get-VBRTapeMedium –library “Tape LTO-6 Week” | where {$_.location.type –eq “drive”}
Erase-VBRTapeMedium –Medium $tape
-
- Enthusiast
- Posts: 32
- Liked: 3 times
- Joined: Nov 06, 2017 12:55 pm
- Full Name: Yannick Metz
- Contact:
Re: Inventory and erase tape automaticly
Thank you. Works fine!
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Inventory and erase tape automaticly
You're welcome. Good to know that changing the line order has done the trick for you. Thanks.
Who is online
Users browsing this forum: No registered users and 18 guests