Controll what date is backed up to tape

Everything about backing up to tape

Re: Controll what date is backed up to tape

Veeam Logoby McClane » Wed May 04, 2016 12:10 pm

I think you misunderstand me. I don't need the reports to print out, I need the data of what is on which tape to automaticly move tapes around. For example to export the tapes with the full backup of one job in week 23 and all its incrementals after.
Even in the GUI its not clear to see that the incrementals after a full backup belong to that full backup.
Yes, with a printed report I could handpick the tapes and export them, but this can lead to mistakes and I can't automate it.

Oh, i forgot: In the GUI I can't even see the tape names on which the fulls and incrementals are. I would have to find the media set and collect the tape names from there. So there is no way in the GUI to export a tape job from a specific run. Only way would be to start restore process for all backup jobs in the tape job, which will show me which tapes it will need, which I could copy and paste. That's not practical. It would be great to get exactly that output from a powershell command. That would make me happy. Something like
Code: Select all
Get-VBRTapeMedium -job $tapejob -LastFull
or
Get-VBRTapeMedium -job $tapejob -date 11-04-2016 -IncludeIncrementals
McClane
Enthusiast
 
Posts: 91
Liked: 10 times
Joined: Sat Jun 20, 2009 12:47 pm

Re: Controll what date is backed up to tape

Veeam Logoby v.Eremin » Wed May 04, 2016 1:13 pm

While tapes written on certain date can be gotten quite easily by querying LastWriteTime property (Get-VBRTapeMedium | where {$_.LastWriteTime -eq $Date}), there is no easy way in PS to get tapes content.

Something for us to think about in future product versions.

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

Re: Controll what date is backed up to tape

Veeam Logoby McClane » Wed May 04, 2016 1:42 pm

Yes, i am currently working with dates. But I use CreationTime instead of LastWriteTime because a job could last longer than 24 hours. But that is not reliable because if the backup fails and maybe restarted the next day, I am in trouble. I would need to program the whole logic to find the next successful backup and go from there.

Here are 2 examples of what I am playing around with:
1. Get tape media of a tape job with all sessions from the last Saturday (which is the day for a synthetic full) and the following 6 days incrementals (if one per day, failure if there were more)
Code: Select all
 ([veeam.backup.core.cbackupsession]::GetSessionsForJob($job.id) |sort CreationTime  | ? { (get-date $_.CreationTime -Format "MM-dd-yyyy") -ge $PreviousSaturday }|select -first 7 ).auxdata


2. Find the last synthetic full on tape for a backup to tape job
Code: Select all
(Get-VBRTapeBackup -Name "Archiv on Tape").getpoints() |? { $_.Algorithm -eq "full" } | sort CreationTime  | select -last 1


Maybe someone has other ideas to get better information.
I am still looking for a way to get the session id for the restore point that Get-VBRTapeBackup will show me. That way I would get the tape name from the restore point. But the output does not show any link to the session.
McClane
Enthusiast
 
Posts: 91
Liked: 10 times
Joined: Sat Jun 20, 2009 12:47 pm

Previous

Return to Tape



Who is online

Users browsing this forum: No registered users and 5 guests