PowerShell script exchange
Post Reply
grigatkis
Influencer
Posts: 14
Liked: 2 times
Joined: Nov 30, 2020 11:29 am
Contact:

Set drive cleaning on Tape Library

Post by grigatkis »

Hi,

I'm trying to figure out how to set the 'Perform drive cleaning automatically' tag on a tape library with powershell commands.

As far as I can tell, it's not possible to do it using the Get-VBRTapeLibrary / Set-VBRTapeLibrary commands.

Does anyone have an idea (or the correct command) for me?

Thanks
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set drive cleaning on Tape Library

Post by david.domask » 1 person likes this post

Hey @grigatkis,

Sorry, looks like it might be a Feature Request. Even with .NET methods, this value is set as a Read-Only property, so it's not editable there.

Can I ask, is the goal mainly to ensure that it just doesn't get accidentally turned off by someone or why does this value need to be set programmatically?
David Domask | Product Management: Principal Analyst
grigatkis
Influencer
Posts: 14
Liked: 2 times
Joined: Nov 30, 2020 11:29 am
Contact:

Re: Set drive cleaning on Tape Library

Post by grigatkis »

We're trying to automate setup as much as possible and that is one of very few bits of our tape backup 'default config' that I couldn't figure out how to automate setting.

(Also, it's annoyingly easy to forget if you're in a hurry while setting up a Veeam server.)


PS: The other bits being how to change the rescan time on a GFS job and how to set the 'process the most recent restore point' button.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set drive cleaning on Tape Library

Post by david.domask »

Got it! Regrettably, looks like there's just not an official way to do it right now.

If you're feeling brave and really have a need to check this frequently, you can flip the bit in the [Tape.Changers] table with Invoke-SQLCMD as part of your setup script; of course, please note this comes with no support and no guarantee that it will work/keep working ;) Veeam Support won't be able to troubleshoot items determined to be related to this, so do this at your own risk with the above understanding.
David Domask | Product Management: Principal Analyst
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Set drive cleaning on Tape Library

Post by matteu »

Hello,

I try to perform the same task today. Is there a method today ?
What is the unofficial cmdlet for it ?

Thanks
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set drive cleaning on Tape Library

Post by david.domask »

Hi!

At this time I do not see that it's different in v12.1
David Domask | Product Management: Principal Analyst
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Set drive cleaning on Tape Library

Post by matteu »

OK,
So, it's on the table tape.changers the value of auto_cleaning to set to true value right ?
I did test it seems to work but I just want to be sure there is no other place to update.

Thanks
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set drive cleaning on Tape Library

Post by david.domask »

@matteu correct, that should be the only place that it must be set.
David Domask | Product Management: Principal Analyst
matteu
Veeam Legend
Posts: 725
Liked: 118 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Set drive cleaning on Tape Library

Post by matteu »

Thanks for your answer
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests