-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
List Mediums imported and exported
Hi,
is there any way to get a list of recently exported mediums (either by a job or manually). So I have a list of tapes that I should expect in the I/E slots when I go to swap them.
Also, is there a way to list all imported tapes, so I can put them in the "Free Media" poo after import.
Thanks
is there any way to get a list of recently exported mediums (either by a job or manually). So I have a list of tapes that I should expect in the I/E slots when I go to swap them.
Also, is there a way to list all imported tapes, so I can put them in the "Free Media" poo after import.
Thanks
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List Mediums imported and exported
Do you have Veeam ONE installed? Doesn't this report provide the exact information you're looking for? Thanks.
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
No, we don't have Veeam One. And I need these informations for scripting, not as a printed report.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List Mediums imported and exported
A tape object has several properties, including Location and LastWriteTime. Media you're looking for will have None as Location.Type and recent date as a LastWriteTime.
Based on this knowledge, you can create a search query similar to the following:
It's nothing but an rough example, so be aware to check it prior to sticking to it.
Thanks.
Based on this knowledge, you can create a search query similar to the following:
Code: Select all
Get-VBRTapeMedium | where {($_.Location.Type -eq "None"") -and ($_.LastWritTime -ge (Get-Date).adddays(-$DaysToCheck))}
Thanks.
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
It's something but I hoped for something more reliable.
I also need a way to get a list of tapes that belong to a full baclup and all incrementals that are based on this full. This is needed if I want to move a full set. At the moment I don't see a practical way to get that information at al.
I also need a way to get a list of tapes that belong to a full baclup and all incrementals that are based on this full. This is needed if I want to move a full set. At the moment I don't see a practical way to get that information at al.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List Mediums imported and exported
I still think that Veeam ONE (our monitoring and reporting tool) is the most practical way here, since it has all the reports you're looking for.
Otherwise, you're left with the scripting and finding the combination of required search queries working more or less reliably for you.
As to moving imported tapes, check the following example:
Thanks.
Otherwise, you're left with the scripting and finding the combination of required search queries working more or less reliably for you.
As to moving imported tapes, check the following example:
Code: Select all
Asnp VeeamPSSnapin
$ImportedMediaPool = Get-VBRTapeMediaPool -Name "Imported"
$FreeMediaPool = Get-VBRTapeMediaPool -Name "Free"
$ImportedTapes = Get-VBRTapeMedium -MediaPool $MediaPool
Move-VBRTapeMedium -Medium $ImportedTapes -MediaPool $FreeMediaPool
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
I think that's a pool for foreign tapes, not for tapes that came out of the vault and are reinserted in the library.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List Mediums imported and exported
If tapes (that have been returned from a vault) have expired already, there will be re-used during next job cycle. So, there is no need to put them in free media pool. Or am I missing something here? Thanks.
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
I have different pools and want expired media to be used by any pool who needs media. Also to achieve a better rotation because media in the incremental pool are never written full.
Our former backup solution (IBM Tivoli) rotated the media frequently to prevent that some tapes are worn out and others are barely used at all.
Our former backup solution (IBM Tivoli) rotated the media frequently to prevent that some tapes are worn out and others are barely used at all.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List Mediums imported and exported
Tape mediums have IsExpired Boolean property that you can query for that exact purpose. Thanks.
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
I could use that, but I may have to filter out pools that have expired media in them (because they don't get exported ever). Would be nice if the Import-VBRTapeMedium command would log the imported tapes in it's properties (since it already logs something, but not the tapes). Same with the export command. It logs everything but the tape names. I can see in the job log, that exported media are logged somewhere. There is just no way to access that information, as far as I can see, by scripts.
With these scripts I want to track who, when and what is put in and out of the library. And also collect information which tapesets hold the full and incremental backups for a particular week (for documentation and disaster recovery procedures).
With these scripts I want to track who, when and what is put in and out of the library. And also collect information which tapesets hold the full and incremental backups for a particular week (for documentation and disaster recovery procedures).
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
I found a (dirty) way to get the exported tapes out of the job logs.
Not a good way though, I will see what I can do with that.
Code: Select all
(Get-VBRSession -Last -Job $job).log | ? { $_.Title -like "*Exporting tape*" } | select -ExpandProperty title
-
- Expert
- Posts: 106
- Liked: 11 times
- Joined: Jun 20, 2009 12:47 pm
- Contact:
Re: List Mediums imported and exported
This is how I extract the exported tape names and IO Slot number after a tape job run.
Code: Select all
(Get-VBRSession -Last -job $job).log | ? { $_.Title -like "*Exporting tape*" } | select -ExpandProperty title | select-string -Pattern "(\d{6}L\d).*port (\d{1,2})" |select @{Name="Band";Expression=$_.matches.groups[1].value}},@{Name="IOSlot";Expression={$_.matches.groups[2].value}}
Who is online
Users browsing this forum: No registered users and 9 guests