Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
Dotmax
Influencer
Posts: 18
Liked: 3 times
Joined: Aug 17, 2016 6:49 am
Contact:

Script Pre/Post Backup in Free Edition

Post by Dotmax »

Good morning, is it possible to run a "pre bakcup script" with Veeam Agent Free Edition?

Basically i need to remove a registry key ( reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToSnapshot /v OutlookOST /f)
because i want to backup all the ost files on the client (as an option for recovering mail for small/serverless organization).
The key need to be deleted with an administrator account, so scheduling via a script with a normal user, didn't work.
Additionally, if I manually remove the key, every "some" days it get recreated (not sure if is outlook or some windows updates)

So the idea is to let veeam agent service run the script (with adminstrator or system privileges) just before making the backup.

Thank you
Max
Mildur
Product Manager
Posts: 10086
Liked: 2688 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Script Pre/Post Backup in Free Edition

Post by Mildur »

Hi Max

Pre-Freeze and Post-Thaw Scripts are possible with our Veeam Agent for Server Editions. Guest Processing is required for such scripts which is only available with the Server edition.
Pre-Job and Post-Job Scripts are only available in combination with a Veeam Backup & Replication server.
The key need to be deleted with an administrator account, so scheduling via a script with a normal user, didn't work.
You could use windows task scheduler to run your script with a specific admin user. Let the script run 30min before the backup starts.

Best,
Fabian
Product Management Analyst @ Veeam Software
azpets
Enthusiast
Posts: 25
Liked: 7 times
Joined: Dec 05, 2020 4:08 pm
Full Name: A.Z. SRL
Contact:

Re: Script Pre/Post Backup in Free Edition

Post by azpets »

Dotmax wrote: May 11, 2023 9:37 am Good morning, is it possible to run a "pre bakcup script" with Veeam Agent Free Edition?
No. As stated before, including the script pre or post backup is a payed feature.

But yes. You can write a script that do what you need, than launch Veeam Agent with the options reported into the backup settings, than do what needed AFTER the end of the backup.

This script should be run via Task Scheduler (or whatever is the current name for Microsoft Windows) and maybe need some tricks and quirks to let it run without a desktop interaction and overrides the schedule of Veeam. Which is refined for some things but can't do other things.
Nils
Enthusiast
Posts: 49
Liked: 7 times
Joined: Jun 18, 2013 8:12 am
Full Name: Nils Petersen
Contact:

Re: Script Pre/Post Backup in Free Edition

Post by Nils »

I'm running a task scheduler job 5 minutes before Veeam is scheduled:

Code: Select all

rem ### put pre backup stuff here  ###
rem prompt for backup HDD etc.
echo Wait for Veeam Agent to start...
:waitforveeamstart
timeout >nul /t 10
tasklist | find >nul /i "VeeamAgent.exe" || goto waitforveeamstart
echo Veeam seems to be running.
timeout >nul /t 120
:waitforveeamdone
timeout >nul /t 10
tasklist | find >nul /i "VeeamAgent.exe" && goto waitforveeamdone
echo Veeam is done.
rem ### put post backup stuff here ###
rem eject backup HDD etc.
Dotmax
Influencer
Posts: 18
Liked: 3 times
Joined: Aug 17, 2016 6:49 am
Contact:

Re: Script Pre/Post Backup in Free Edition

Post by Dotmax »

Mildur wrote: May 11, 2023 9:54 am
Pre-Freeze and Post-Thaw Scripts are possible with our Veeam Agent for Server Editions. Guest Processing is required for such scripts which is only available with the Server edition.
Pre-Job and Post-Job Scripts are only available in combination with a Veeam Backup & Replication server.
Maybe a little Off-Topic:
The use of Veeam Agent Paid Version (workstation or server) is only possible with a B&R server installed?
Or you can apply a valid license to a standalone veeam agent?


@nils:
Thank you for your code snippet.
I till try with whe standard window scheduler, launching it with administrator privileges.



Thank you
Max
Mildur
Product Manager
Posts: 10086
Liked: 2688 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Script Pre/Post Backup in Free Edition

Post by Mildur »

Hi Max

You can install a VUL license directly on the standalone agent.

Best,
Fabian
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests