Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
lordjeffers
Influencer
Posts: 11
Liked: never
Joined: Oct 10, 2013 2:03 pm
Full Name: David Jeffery
Contact:

Printed list of tapes

Post by lordjeffers »

Hello,

I was wondering... is there a way to print a complete list of tapes? When I export tapes from my library (Quantum i80) to take offsite, I would like to include a complete hard-copy list of tapes, including media set, media pool, sequence number etc...

Other than a print screen, I can't see a way of getting this out of Veeam (I'm sure there's a powershell method though)

Thanks, and Merry Christmas!
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin » 1 person likes this post

Hi, David,

The following script should answer your requirements. It lists tapes, along with their names, barcode, mediapools and mediasets they belong to:

Code: Select all

asnp VeeamPSSnapin
Get-VBRTapeMedium |  Select-Object -Property @{N="Tape Name";E={$_.name}}, @{N="Barcode";E={$_.Barcode}}, @{N="Media Set";E={$_.MediaFamilyItem.GetMediaFamily().name}},@{N="Media Pool";E={$_.FindMediaPool().name}}
The output can be sent, then, to a text file.

Thanks.
Dima P.
Product Manager
Posts: 14726
Liked: 1706 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Printed list of tapes

Post by Dima P. »

David,

Thank you for the perfect request - I believe this type of report should be included in our Veeam One solution, so consider it is forwarded to Veeam One team for further discussion. Meanwhile, you can use the nice power shall script, which would provide all the requested info. Additionally, tape job email notifications on success will generate the list of tape barcodes successfully used during last job run, so you can use it as well (but unfortunately that’s the only info you could get from email notifications).
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

Additionally, you can get the whole list of parameters a tape medium has by using Get-Member commandlet.

Code: Select all

Get-VBRTapeMedium | get-member
The required parameters can be added to script provided above.

Thanks.
David.Hilbert
Novice
Posts: 4
Liked: never
Joined: Jan 13, 2014 7:36 pm
Full Name: David Hilbert
Contact:

Re: Printed list of tapes

Post by David.Hilbert »

I am looking to pull a report that will show me the jobs that are on each tape after a full backup is run. Is there a powershell command that i can run to get this information
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin » 1 person likes this post

Hi, David, there is a predefined report in Veeam ONE called “Tape Backups” that lists VM restore points along with the tapes they reside on; might be exactly what you're looking for.

Thanks.
David.Hilbert
Novice
Posts: 4
Liked: never
Joined: Jan 13, 2014 7:36 pm
Full Name: David Hilbert
Contact:

Re: Printed list of tapes

Post by David.Hilbert »

I saw that report and it appears to only be available in version 7. We are on version 6.5. We are not able to upgrade to 7.0 due to our hardware. Is there a way to get that report in 6.5?
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

You you're using Veeam ONE 6.5 or VB&R 6.5 or both? I'm wondering because not until version 7 has the tape functionality been introduced in both products.

Thanks.
David.Hilbert
Novice
Posts: 4
Liked: never
Joined: Jan 13, 2014 7:36 pm
Full Name: David Hilbert
Contact:

Re: Printed list of tapes

Post by David.Hilbert »

We are on Veeam backup and restore 7.0 and Veeam one 6.5
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

Got it. Unfortunately, there is no way you can use v7 reports on the older versions of Veeam ONE.
We are not able to upgrade to 7.0 due to our hardware.
Could you also elaborate what particular system requirement for Veeam ONE server makes your hardware unusable with new version?

Thanks.
David.Hilbert
Novice
Posts: 4
Liked: never
Joined: Jan 13, 2014 7:36 pm
Full Name: David Hilbert
Contact:

Re: Printed list of tapes

Post by David.Hilbert »

Veeam one aside is there anything in the Veeam B&R powershell that can get me this information?
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

I'm currently looking for PS way how the backups can be mapped to the mediums they reside on. And, apart from this script mentioned above (which lists media sets along with the corresponding tapes), I haven't been able to find anything interesting so far.

Thanks,
mariovaleri
Lurker
Posts: 2
Liked: never
Joined: Feb 03, 2014 10:46 am
Contact:

[MERGED] last used tapes

Post by mariovaleri »

hi to all, do you know if there is a "smart" way to have a list of last tapes used?
thanks a lot, Mario
foggy
Veeam Software
Posts: 21139
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: Printed list of tapes

Post by foggy »

Hello, if you mean the list of tapes used during the last job run, then it is available in the job e-mail report.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

Otherwise, if you want to get the latest written tape, then, you can use the following one-liner:

Code: Select all

Get-VBRTapeMedium | where {$_.LastWriteTime -ne $Null} | Sort-Object {$_.LastWriteTime} -Descending | Select-Object -First 1
Thanks.
mariovaleri
Lurker
Posts: 2
Liked: never
Joined: Feb 03, 2014 10:46 am
Contact:

Re: Printed list of tapes

Post by mariovaleri »

hi, thanks to all, but i thinking about something like to add a column "tape used" to the view "history/tape". in this way is easy to change last tapes used during a weekend full backup.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

As mentioned, for now you can rely on tape job email report that includes barcodes and names of all tapes that were used in the corresponding job session. Also, thank you for the feedback; much appreciated.
PJ-BNE
Lurker
Posts: 2
Liked: never
Joined: Feb 12, 2014 1:09 am
Contact:

Re: Printed list of tapes

Post by PJ-BNE »

v.Eremin wrote:Otherwise, if you want to get the latest written tape, then, you can use the following one-liner:

Code: Select all

Get-VBRTapeMedium | where {$_.LastWriteTime -ne $Null} | Sort-Object {$_.LastWriteTime} -Descending | Select-Object -First 1
Thanks.
I've been attempting to create a script very similar to this but instead of the most recently written tape, I am looking for any tape that has been written to in the last x days. Unfortunately I don't know a whole lot about PowerShell so I thought I'd see if anyone else had any suggestions.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin » 1 person likes this post

The following script returns the list of tapes that have been written within last 7 days. Instead of 7, you can type whatever number you want to:

Code: Select all

Get-VBRTapeMedium | where {($_.lastwritetime -ne $null) -and (((Get-Date) - $_.lastwritetime).days -le 7)} | Sort-Object {$_.LastWriteTime} -Descending
Thanks.
PJ-BNE
Lurker
Posts: 2
Liked: never
Joined: Feb 12, 2014 1:09 am
Contact:

Re: Printed list of tapes

Post by PJ-BNE »

Thanks. That works perfectly and is simpler than the approach I was taking.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

Also, you can add Select-Object method in order to output only chosen parameters (barcode, name, last write time) of tape mediums, instead of outputting all of them:

Code: Select all

Get-VBRTapeMedium | where {($_.lastwritetime -ne $null) -and (((Get-Date) - $_.lastwritetime).days -le 7)} | Sort-Object {$_.LastWriteTime} -Descending | Select-Object -Property @{N="Tape Name";E={$_.name}}, @{N="Barcode";E={$_.Barcode}}, @{N="Last Write Time";E={$_.LastWriteTime}}
Thanks.
raj.patel
Lurker
Posts: 2
Liked: never
Joined: May 29, 2014 2:44 pm
Contact:

Re: Printed list of tapes

Post by raj.patel »

Hi All,

Im new to Veeam powershell scripting. Im trying to get a script to run daily to advises me which tapes I need to export.

I wish to report on the last write time and check if the location is online
Get-VBRTapeMedium | where {($_.lastwritetime -ne $null -and $_.LocationEx -like "Online") -and (((Get-Date) - $_.lastwritetime).days -le 7)} | Sort-Object {$_.LastWriteTime} -Descending | Select-Object -Property @{N="Tape Name";E={$_.name}}, @{N="Barcode";E={$_.Barcode}}, @{N="Last Write Time";E={$_.LastWriteTime}}

This below script works but im not sure why because all im doing is replacing the variable "offline with "online"
Get-VBRTapeMedium | where {($_.lastwritetime -ne $null -and $_.LocationEx -like "offline") -and (((Get-Date) - $_.lastwritetime).days -le 7)} | Sort-Object {$_.LastWriteTime} -Descending | Select-Object -Property @{N="Tape Name";E={$_.name}}, @{N="Barcode";E={$_.Barcode}}, @{N="Last Write Time";E={$_.LastWriteTime}}

Is there a way to export this media automatically based on a script like the above?

Thank you
Gostev
Chief Product Officer
Posts: 31814
Liked: 7302 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Printed list of tapes

Post by Gostev » 1 person likes this post

We are adding this report into the next version of Veeam ONE.
This new report will list all tapes, and their retention.
raj.patel
Lurker
Posts: 2
Liked: never
Joined: May 29, 2014 2:44 pm
Contact:

Re: Printed list of tapes

Post by raj.patel »

Hi All,

I managed to get my script working please find below

----Used to give you tapes to export ----
Get-VBRTapeMedium | where {($_.lastwritetime -ne $null -and $_.IsOnline -eq $True) -and (((Get-Date) - $_.lastwritetime).days -le 7)} | Sort-Object {$_.LastWriteTime}

----Used to give you tape to import----
Get-VBRTapeMedium | Where-Object { $_.IsOverwriteProtectionPeriodOver() -eq $True -and $_.LocationEx -like "Offline"}

I have written smtp emails for each and these run on a windows scheduled task.

Im currently working on a script to export the media to mailslot / I/E slot so there will be no need for user interaction
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

Tape medium can be ejected and exported via the following commandlets. Eject-VBRTapeMedium and Export-VBRTapeMedium, accordingly. Thanks.
yitzchok.berger
Influencer
Posts: 11
Liked: never
Joined: Mar 29, 2015 9:43 am
Full Name: Yitzchok Berger
Contact:

Re: Printed list of tapes

Post by yitzchok.berger »

How could we take this one step further and add the job(s) that used specific tapes.

Ideally, I'm looking for the following:

Barcode VM Count Job Name Date Written
--------- ------------ ---------------- ----------------
XX1111 4 Oracle Servers 20-APR-2015 11:00 PM
20 App Servers 21-APR-2015 01:00 AM

XX2222 15 Web Servers 21-APR-2015 03:00 AM
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Printed list of tapes

Post by veremin »

There is a topic speaking about how to list tapes used by corresponding job; might be worth reviewing. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests