PowerShell script exchange
Post Reply
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Getting startup with PS for Veeam backups report

Post by Krishna »

Hello All,

I am looking for some help related to powershell script for backups running in my env. to report me in email for any corrupted files.
I did started writing one with cmdlet
Get-VBRBackup | Get-VBRRestorePoint | where {$_.IsRecheckCorrupted -eq 'True'} | Select Name,DisplayName,VmName,State,CreationTime,Type,ApproxSize,Algorithm,IsCorrupted,IsRecheckCorrupted

It lists the jobs running along with file status.Someone could help to put it in right way.

Thanks,
Krishna
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

Not sure what you're trying to achieve, could you elaborate?

What you've done so far is simply not enough to spot real backup corruption. What you really need is to run SureBackup jobs (with storage level corruption verification) regularly.

Thanks.
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Re: Getting startup with PS for Veeam backups report

Post by Krishna »

Hi,

Thanks for looking into. I am trying to set up an email alert to send to my mail address for any corruption of the job at file level (increment or full) happens. It should send me an email weekly so I can keep track of it.

For example - If any file incremental corrupted I need to check manually by primary or backup copy -> properties and check whether the file is Ok. So I want this to be scripted.

This is what I have figured out so far -
Add-PSSnapin VeeamPSSnapin
Get-VBRBackup | Get-VBRRestorePoint | where {$_.IsRecheckCorrupted -eq 'True'} | Select Name,DisplayName,VmName,State,CreationTime,Type,ApproxSize,Algorithm,IsCorrupted,IsRecheckCorrupted,IsConsistent,Info |ft -auto

Also trying to add Backup job name in columns output

Thanks,
Krishna
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

Like I said, you won't spot real corruption this way. Instead you will be notified in harmless situations - when a backup copy job fails to transfer all data during sync interval, etc. Thanks.
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Re: Getting startup with PS for Veeam backups report

Post by Krishna »

Ok. Could you please suggest me or walk me with steps how do I run things to report me rather than a manual intervention to check each file every day. Its painful.
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

Any particular reason why SureBackup does not work for you?

You can script Veeam Backup Validator activity. Even that in my opinion would be better in comparison with checking IsCorrupted property.

Thanks.
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Re: Getting startup with PS for Veeam backups report

Post by Krishna »

https://helpcenter.veeam.com/docs/backu ... tml?ver=95
Veeam Backup Validator utility does not work with backups stored on scale-out backup repositories.
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

And what about SureBackup? My point is that the current script cannot determine real corruption, you might as well disregard the script completely - the only "corruption" it will spot is an incomplete restore point left by backup copy job. Thanks.
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Re: Getting startup with PS for Veeam backups report

Post by Krishna »

Thanks for the info. Could you please help me how can I work with surebackup to send me weekly alerts ?

Any KB article some thing I should look into
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

How often do you run backup jobs? I assume no less than daily? If so, weekly notifications are unlikely to work in my opinion.

You will spot corruption too later - in the worst case you will be 7 days behind. So, daily notifications might be a better option.

You can either script those, querying SureBackup job and tasks sessions, using Get-VSBSession and Get-VSBTaskSession respectively, or stick to notifications generated by SureBackup job.

Thanks.
Krishna
Novice
Posts: 7
Liked: never
Joined: Jul 19, 2018 4:14 am
Full Name: Krishna Darbha
Contact:

Re: Getting startup with PS for Veeam backups report

Post by Krishna »

Thankyou Vladimir. I did dig more information however I ended up landing no where with sure backup so I reached the forum to look forward for some help.

I do not see any option where I can run test query to check to check on this.

Yes we run the backup jobs daily.
veremin
Product Manager
Posts: 20285
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting startup with PS for Veeam backups report

Post by veremin »

I did dig more information however I ended up landing no where with sure backup so I reached the forum to look forward for some help.
Have you had any problems configuring SureBackup job? If so, have you posted that on forums or reached our support team for assistance?

I'm asking since daily SureBackup job (coupled with its notification) seems to be exactly what you need.

Thanks.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 7 guests