backup report

PowerShell script exchange

backup report

Veeam Logoby leeg123 » Wed Dec 26, 2012 2:28 am

Although a former assembly language coder back in my day, I am extremely new at PowerShell. Ive managed to figure out enough to be dangerous
Anyway so far I’ve browsed through several scripts that I had found for backup reports, but I must say, the daily email notification that veeam generates will definitely work for me.
My question, is there any way to manually generate a similar backup report using PowerShell? Does the daily backup report that gets emailed to us ever get saved to the local veeam server. Maybe we can just reuse that file.
The ultimate goal is for us to combine a post activity job script that will
1 copy the backup files onto removable hard disks via Robocopy
2 email us a daily backup report and include the robocopy log file

We figured out already how to email the log file that robopy generates , but we wanted to combine that email with the veeam backup report. I would prefer not to have two emails per customer, but instead a single email with the daily backup report, and include the robocopy log file as well

Any help would certainly be appreciated.

Thanks

Lee
leeg123
Enthusiast
 
Posts: 36
Liked: 1 time
Joined: Mon Dec 13, 2010 12:50 am
Full Name: lee garet

Re: backup report

Veeam Logoby Vitaliy S. » Wed Dec 26, 2012 7:54 am

Hi Lee,

leeg123 wrote:Anyway so far I’ve browsed through several scripts that I had found for backup reports, but I must say, the daily email notification that veeam generates will definitely work for me.

Are you referring to daily backup job status report that is generated by our Backup Enterprise Manager?

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19539
Liked: 1097 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: backup report

Veeam Logoby v.Eremin » Wed Dec 26, 2012 8:40 am

Hi, Lee.

There are topics that might help you in your understanding how to script the process.

Two topics regarding PowerShell reporting.

viewtopic.php?f=26&t=13422
viewtopic.php?f=26&t=8925

Note: You can input the body of your code responsible for sending Robocopy-logs to one of the scripts mentioned in these topics, thus, you’ll meet your expectations of having single email with the daily report.

PowerShell and Robocopy.

viewtopic.php?f=2&t=1093

Note: Please, be aware that you can only specify *cmd,*exe or *bat files as the job post-activity. So, you’ll have to either convert you powershell script into a batch file (powershell-script-in-a-bat-file) or just execute your PowerShell script from a batch file, using the following command:

Code: Select all
Powershell.exe -File C:\YourScript.ps1


Additionally, this is the way how you can set a post-job activity by the means of PowerShell:

Code: Select all
asnp VeeamPSSnapin

$Job = Get-VBRJob | ?{$_.Name –eq “Name of the your job”}
$jo = $job.GetOptions()
$jo.PostJobCommand.Enabled = $True
$jo.PostJobCommand.Commandline = "D:\Test.bat"
$job.SetOptions($jo)

Note: “D:\Test.bat” is just an example; you should input your own directory, where your bat-file is located

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


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests