Can you set tapes to be appendable until a certain time?

Everything about backing up to tape

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby Dima P. » Fri Dec 20, 2013 2:56 pm 1 person likes this post

Yes, we described your scenario specifically: 'hours' should not be counted in retention - only 'days'.
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby cffit » Fri Dec 20, 2013 3:14 pm

Thank you, that's very helpful.
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby cffit » Thu Dec 26, 2013 3:19 pm

I'm finding that if I have a media pool with a 14 day retention, and I run a backup on say Wednesday at 8:05AM, that tape cannot be written to again exactly 14 days later at 8:05AM. Can someone let me know how I can view the retention date of the tape and when it is available to be overwritten? If I need to use powershell or sql queries that is ok. Thanks.
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby v.Eremin » Thu Dec 26, 2013 4:54 pm

There are two parameters might be helpful in your case. The first one is .lastwritetime (tape medium) that indicates the time tape was written last time, the second one is .Options.OverwritePeriod.value (media pool) that shows the overwrite period of media pool. Combining them together, you can the date when the tape will be overwritten.

So to say,

Code: Select all
$Tape.lastwritetime + $MediaPool.Options.OverwritePeriod.value = necessary information.


If you need any assistance with scripting stuff, don't hesitate to let me know.

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

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby cffit » Thu Dec 26, 2013 5:04 pm

I know for certain that the statement made indicating that the overwrite protection pertained to days only and the hours in the day didn't matter is not correct. From my experience, a tape that is in a media pool set to protect for 14 days, and is first written to at 8:05AM on day, cannot be overwritten until exactly 14 days (336 hours) from the time the initial job ENDS, the second job STARTS or the last job FINISHES. I cannot quite pinpoint it yet, but I can say for 100% certainty that it doesn't work the way d.popov explained in this thread (not to blame or sound negative, just to clear things up).

I don't understand how to get the values from the powershell commands above. The code you put isn't really what I'd type in is it? You are just giving me variables? So what exactly would I type in if my tape barcode was A705L5?
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby v.Eremin » Thu Dec 26, 2013 9:40 pm

I was trying to give you some hints how the whole process can be scripted. The first variable is a tape medium that can be gotten using Get-VBRTapeMedium command, the second one is a media pool that can be gotten using Get-VBRTapeMediaPool command.

At the moment, I don't have an access to the console. But once I will be in the office tomorrow, I will be able to provide a script example.

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

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby Dima P. » Fri Dec 27, 2013 10:40 am

Christensen,
Thank you for the heads up! I am really sorry it does not work as expected for your scenario. To figure out what went wrong and pass this information to QA department for the investigation, would you be so kind to provide me with the detailed information on your current configuration:

- "Monday Increment" media pool configuration: how many tapes in the pool, media set creation option
- Backup to tape job settings: Backup files (tape job is linked to backup job or to repository), do you use eject/export in the Options step and what is job schedule

From the conversation above I understood that you are using two media pools one for weekly full’s another for daily increments – is that correct? Could you, please, clarify when the tape in the question was actually retired?

Thank you.
Dima P.
Veeam Software
 
Posts: 6242
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby v.Eremin » Fri Dec 27, 2013 10:57 am

The following script should answer your requirements. It lists tape mediums, along with, their barcodes, names, mediapools they belong to, etc. Using two parameters mentioned above, the script also show the overwrite dates:

Code: Select all
Get-VBRTapeMedium | where {$_.FindMediaPool().name -ne "Free"} |  Select-Object -Property @{N="Name";E={$_.Name}}, @{N="Barcode";E={$_.Barcode}},@{N="Media Pool";E={$_.FindMediaPool().name}},@{N="Retention";E={$_.FindMediaPool().Options.OverwritePeriod.value}}, @{N="Last write";E={$_.LastWriteTime}}, @{N="Overwrite date";E={$_.lastwritetime + $_.FindMediaPool().Options.OverwritePeriod.ToTimeSpan()}}


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

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby cffit » Fri Dec 27, 2013 3:36 pm

Thank you v.Eremin, that's exactly what I needed. And it shows me when overwrite protection is set. It takes the time of when the last job finished writing to the tape and then adds on the retention period to that.

To clarify d.popov, this is a simplified example of what I was doing:

I have incremental tapes that run each weekday, and they were part of a media pool that had a 7 day retention. When my Monday jobs ran, they started at 8:00AM and finished around 9:30AM. With a 7 day retention, this means that the first Monday my job ran at 8:00AM and finished at 9:30AM. But then the next Monday, that tape was not writeable until 9:30AM. So when my job ran at 8:00AM it would complain that it needed a tape, but then would eventually start running 9:30AM when the overwrite protection ran out. So then it would run from 9:30AM to 11AM. Then the next week it couldn't run until 11AM, etc,etc.

As I understood from your explanation before, and what you confirmed with dev, when my tape ran on Monday at 8AM with a 7 day retention set on the media pool, the tape would be overwriteable the next Monday at midnight because the retention just applied to days and it didn't matter what time of day the last backup ran.

So with all this said, I just set the retention to be 6 days and that way my tapes become available about 22.5 hours ahead of time. My one worry about this was that other tapes would become unprotected during my backups (since each day the next day's tape would become available at 9:30AM), but I think VEEAM will continue to use the tape that it starts with at 8AM.

Thanks for all your help guys.
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby dualdj1 » Thu Jan 02, 2014 9:45 pm

Just wanted to add a bump for hopefully establishing an append period on media set. Would be a nice added feature.

Someone mentioned setting media set creation daily/weekly. I currently have mine set to create friday at noon, before the backups run for the weekend. I kicked off a job today, that didn't run over the weekend, and went to pull my tapes from 2 weeks ago, only to find veeam had grabbed one of the tapes with free space to use on my current job. So it appears having tapes in a different media set, won't prevent them from being appended.

For clarification, if you want to pass to the devs, here's exactly what happened.

Started a tape dupe job.
Veeam allocated an unused tape from the Free pool, and apparently created a new media set, named VEEAM Full 1/2/2014 12:23PM (my media pool is set to Fridays at Noon for new media set, and no jobs had run since last friday).
Once the first tape was full, Veeam allocated a tape from the previous week's backup, that had available space, on media set VEEAM Full 12/22/2013 9:01AM.
Job continued running, tape doesn't appear to have been overwritten, just appended to.

Not sure if this is a bug or what the deal is. Normally I wouldn't have run into this, but I wasn't able to pull the tapes from the previous week before starting the current week's job. But it sounds like VEEAM should not use a tape from another media set than the job started with, correct?
dualdj1
Enthusiast
 
Posts: 43
Liked: 4 times
Joined: Tue Feb 05, 2013 6:56 pm
Full Name: Jason K. Brandt

Re: Can you set tapes to be appendable until a certain time?

Veeam Logoby v.Eremin » Tue Jan 07, 2014 7:23 am

Thank you v.Eremin, that's exactly what I needed. And it shows me when overwrite protection is set. It takes the time of when the last job finished writing to the tape and then adds on the retention period to that.

Yep, this is the way it works. Also, you can run Get-Member command in order to see what particular parameters a tape medium has. If need be, the required parameters can be included to the provided script.

@dualdj1

As mentioned above, once the retention period is over, even if it has some data written, the tape should be overwritten, not appended to. So, if you're seeing different behaviour, you can open a case with our support team and let them investigate it directly.

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

Previous

Return to Tape



Who is online

Users browsing this forum: No registered users and 6 guests