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
-
- Enthusiast
- Posts: 40
- Liked: 2 times
- Joined: Dec 13, 2010 12:50 am
- Full Name: lee garet
- Contact:
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: backup report
Hi Lee,
Thanks!
Are you referring to daily backup job status report that is generated by our Backup Enterprise Manager?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.
Thanks!
-
- Product Manager
- Posts: 20414
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: backup report
Hi, Lee.
There are topics that might help you in your understanding how to script the process.
Two topics regarding PowerShell reporting.
http://forums.veeam.com/viewtopic.php?f=26&t=13422
http://forums.veeam.com/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.
http://forums.veeam.com/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:
Additionally, this is the way how you can set a post-job activity by the means of PowerShell:
Note: “D:\Test.bat” is just an example; you should input your own directory, where your bat-file is located
Hope this helps.
Thanks.
There are topics that might help you in your understanding how to script the process.
Two topics regarding PowerShell reporting.
http://forums.veeam.com/viewtopic.php?f=26&t=13422
http://forums.veeam.com/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.
http://forums.veeam.com/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
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)
Hope this helps.
Thanks.
Who is online
Users browsing this forum: No registered users and 2 guests