Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
mattb
Lurker
Posts: 1
Liked: 1 time
Joined: Nov 02, 2012 7:13 pm
Full Name: Matt Brummel

Feature Request - Run script at end of backup job

Post by mattb » 1 person likes this post

It would be nice to be able to run a script at the end of a backup job. This or have a backup copy feature. The idea for me would be able to automatically copy the backup to another location.
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Feature Request - Run script at end of backup job

Post by Mike Resseler »

Hi Matt,

We have received this feature request a few times. I don't believe it will be possible in v1, but this is definitively something we will keep in mind when planning v2. As for v1, in GA, you will be able to backup to a Veeam B&R repository (as target) and from there on you can use a backup copy to put it on another repository, tape, through Cloud Connect to a service provider... So at that moment, the options become endless :-)

Hope it helps

Brgds,

Mike
CharlieKPoland
Enthusiast
Posts: 26
Liked: 1 time
Joined: Dec 28, 2014 11:29 am
Contact:

Re: Feature Request - Run script at end of backup job

Post by CharlieKPoland »

I ask for the same. I want to wake up with BIOS my PC at 10pm in the evening, make Veeam Endpoint Backup and I would like to have script after the end like "shutdown -s - t 10" which would switch off my machine to the morning. Energy is more and more expensive, so there is no economical reason to have it swithed on 24 hours.
Theepan
Novice
Posts: 4
Liked: never
Joined: Dec 23, 2014 1:41 pm
Full Name: Kantheepan Rajaratnam
Contact:

Re: Feature Request - Run script at end of backup job

Post by Theepan »

I second this feature request as well.

Matt and CharlieKPoland, if you need a quick and dirty way to achieve this right now, you can do this by creating a task in Task Scheduler that triggers on event id 190 in EventLog:
Trigger: On an event
  • Log: Veeam Backup
    Source: Veeam EP
    Event ID: 190
Action: Start a program
Also if you need to retrieve the status of the backup, extract "Level" from the latest entry of event id 190 from the same source as above.

I use the following commands from a batch script to (very primitively) retieve the status:

Code: Select all

powershell -c "Get-EventLog -LogName """Veeam Backup""" -Newest 1 -Source """Veeam EP""" -InstanceId 190 | fl | Out-File "C:\Temp\VEB_status.log"
set BACKUP_STATUS=Unknown
type "C:\Temp\VEB_status.log" | find /i "EntryType" | find /i "Error" && set BACKUP_STATUS=Failed
type "C:\Temp\VEB_status.log" | find /i "EntryType" | find /i "Information" && set BACKUP_STATUS=Success
The variable BACKUP_STATUS should now contain backup status. I haven't seen any EntryType=Warning yet, so I do not check for it.
The file C:\Temp\VEB_status.log should contain the log (with details on error).

It would be easier to do it all in Powershell, but our backup reporting infrastructure is in batch :D
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Feature Request - Run script at end of backup job

Post by Mike Resseler »

Hehehe,

With guys like you all on our forums, why should we do any programming ;-)

But yeah, we heard you all loud and clear. I don't think it will be in v1, but we will put this certainly on the table for v2

Cheers

Mike
jeancharles
Enthusiast
Posts: 51
Liked: 3 times
Joined: Dec 27, 2011 9:55 am
Full Name: Jean-Charles DEMARQUE
Contact:

Pre / Post Task to backup

Post by jeancharles » 1 person likes this post

Hi,

After looking at the TrueCrypt topic, I was thinking it would be interesting to have pre / post task scripts to backup.

for TC partitions for example :

automate dismounting/changing time of TC container,
and after backup launched remount TC container.
frakka
Novice
Posts: 7
Liked: 12 times
Joined: Jan 15, 2015 11:13 am
Full Name: Matteo Fracassetti
Contact:

Re: Feature Request - Run script at end of backup job

Post by frakka »

mattb wrote:It would be nice to be able to run a script at the end of a backup job.
May be useful also for us.
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Feature Request - Run script at end of backup job

Post by Mike Resseler »

Hi guys,

As I stated above, it won't be in v1, but we are looking at it for further versions. Please keep those use-cases coming. The TrueCrypt topic is a great example of what we like to see where you would want to use the pre and post scripts for... Keep those use-cases coming ;-)

Cheers

Mike
hld123
Influencer
Posts: 10
Liked: never
Joined: Mar 17, 2015 11:50 am
Contact:

Re: Feature Request - Run script at end of backup job

Post by hld123 »

Being able to run scripts before and after would be great.

Here is another example of what we do....

send Wake on LAN to Synology NAS
wait for ping response from nas
ssh into nas
mount encrypted filesystem
backup to encrypted filesystem
unmount encrypted filesystem
shutdown nas
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Feature Request - Run script at end of backup job

Post by Dima P. »

hld123,
I wonder if your scenario can be accomplished by windows task scheduler and Endpoint daily backup schedule :wink:
hld123
Influencer
Posts: 10
Liked: never
Joined: Mar 17, 2015 11:50 am
Contact:

Re: Feature Request - Run script at end of backup job

Post by hld123 »

we only want the nas online and open as long as backup takes.
so would need to....
1. kickoff script1 giving enough time to complete ready for veeam to start
2. wait until veeam starts (unless it can be started via command line?)
3. run script two after backup finished, either estimate or watch event log for veeam finish

we've used acronis in past which simply lets you runs a batchfile/script before and after
backup.

(script1 start)
send Wake on LAN to Synology NAS
wait for ping response from nas
ssh into nas
mount encrypted filesystem
(script1 end)

now run - Veeam endpoint backup to NAS

(script2 start)
backup to encrypted filesystem
unmount encrypted filesystem
shutdown nas
(script2 end)
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Feature Request - Run script at end of backup job

Post by Dima P. »

Got it – thank you. In the existing version the only possible workaround is to use a pre job script thru the task scheduler before the daily scheduled backup. Task scheduler could initiate post job script as well – you could triggered it based on the windows event generated by Endpoint on successful backup. The list of the events will be available with the GA reslease.
apronk
Enthusiast
Posts: 76
Liked: 9 times
Joined: Mar 23, 2015 2:47 pm
Full Name: Arend Pronk
Contact:

Re: Feature Request - Run script at end of backup job

Post by apronk »

Post-script would help, here we have a lot of clients that have local Oracle databases.
Since Veeam Backup fails if ARCHIVELOG is not enabled, we have to enable it.
This in turns generates a lot of log files, so it would be nice to set a script to delete them after the backup finishes.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Feature Request - Run script at end of backup job

Post by Dima P. »

Arend,
You want to trigger post job script only? Would triggering the scrip via task scheduler work for your case?
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Feature Request - Run script at end of backup job

Post by Vitaliy S. »

apronk wrote:Since Veeam Backup fails if ARCHIVELOG is not enabled, we have to enable it.
Can you please give us a bit more info on this? What does exactly fail and what's the error message?
apronk
Enthusiast
Posts: 76
Liked: 9 times
Joined: Mar 23, 2015 2:47 pm
Full Name: Arend Pronk
Contact:

Re: Feature Request - Run script at end of backup job

Post by apronk »

Dmitry, yeah that would work.
But as far as I know I can not schedule a task that would start as soon as the Veeam Backup job finishes ?

Vitaly: Yeah, since Veeam Endpoint Backup uses the VSS Writers, Oracle's VSS Writer only works when ArchiveLog is enabled.
The Oracle VSS Writer fails if it is not, and there for Veeam backup fails.
http://docs.oracle.com/cd/B28359_01/win ... 10/vss.htm
(search for the paragraph starting with "The Oracle VSS writer supports volume-based shadow copies")
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Feature Request - Run script at end of backup job

Post by Mike Resseler »

Arend,

Actually you can schedule a task. Simply monitor for event 190, with source Veeam Endpoint Backup (in event log Veeam Endpoint Backup) and look for severity (information is good, warning is not so good, error is bad)... Then trigger whatever task you want to run

Cheers

Mike
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Feature Request - Run script at end of backup job

Post by Vitaliy S. »

Thanks for the details, I believe it would make sense to make AAIP as an optional setting when backup job is configured.
apronk
Enthusiast
Posts: 76
Liked: 9 times
Joined: Mar 23, 2015 2:47 pm
Full Name: Arend Pronk
Contact:

Re: Feature Request - Run script at end of backup job

Post by apronk »

Thanks Mike: Testing it now.

Vitaly: AAIP ?
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Feature Request - Run script at end of backup job

Post by Mike Resseler »

Arend,

AAIP= Application Aware Image Processing which is functionality we have in Backup & Replication to use VSS and to work with truncation.

Some more explanation you can find here: http://helpcenter.veeam.com/backup/80/v ... ssing.html
apronk
Enthusiast
Posts: 76
Liked: 9 times
Joined: Mar 23, 2015 2:47 pm
Full Name: Arend Pronk
Contact:

Re: Feature Request - Run script at end of backup job

Post by apronk » 1 person likes this post

Ah!, I know what it is. Just didn't know the abbreviation :)
By the way, script triggered by event works perfectly, thanks Mike!
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 36 guests