Comprehensive data protection for all workloads
Post Reply
Tecbil
Influencer
Posts: 19
Liked: 2 times
Joined: Apr 08, 2016 6:20 am
Full Name: Fabio Di Taranto
Contact:

Pre-Job Script

Post by Tecbil » Aug 16, 2016 6:12 am

Hi everyone

I'm trying to run a pre-job script to remote shutdown a virtual machine inside the domain before backing it up but it just won't work.
The .bat-file I've created looks like this:

shutdown.exe -m \\[computername] -s -f -t 1

If I run the script manually with the domain-admin-account it works fine so it seems that Backup & Replication does not have the rights to shutdown the remote-computer. Anyone knows how I can give it the rights so the script will be executed at the target machine?

Thanks

v.eremin
Product Manager
Posts: 16375
Liked: 1355 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-Job Script

Post by v.eremin » Aug 16, 2016 10:12 am

What happens if you execute manually the very same script again, but this time under Veeam service account? Thanks.

Tecbil
Influencer
Posts: 19
Liked: 2 times
Joined: Apr 08, 2016 6:20 am
Full Name: Fabio Di Taranto
Contact:

Re: Pre-Job Script

Post by Tecbil » Aug 16, 2016 1:29 pm

The veeam service account? You mean the user with whom I log in to manage backup & replication? It's a memeber of the domain admin group and it works fine this way.

v.eremin
Product Manager
Posts: 16375
Liked: 1355 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-Job Script

Post by v.eremin » Aug 16, 2016 1:35 pm

Nope, the one under which Veeam-related services are running.

Tecbil
Influencer
Posts: 19
Liked: 2 times
Joined: Apr 08, 2016 6:20 am
Full Name: Fabio Di Taranto
Contact:

Re: Pre-Job Script

Post by Tecbil » Aug 16, 2016 4:17 pm

Oh, now I got you. When I try to run it with the local system account (that's the "user" the veeam backup service is running on) it says "permission denied" in the command prompt.

v.eremin
Product Manager
Posts: 16375
Liked: 1355 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-Job Script

Post by v.eremin » Aug 16, 2016 4:24 pm

Account lacks required permissions - this is the reason why automatically executed pre-job script fails. Thanks.

Tecbil
Influencer
Posts: 19
Liked: 2 times
Joined: Apr 08, 2016 6:20 am
Full Name: Fabio Di Taranto
Contact:

Re: Pre-Job Script

Post by Tecbil » Aug 16, 2016 4:38 pm

Do you know how I can give the "System" the rights to execute that batch file successfully?
Or is it better to run the Veeam-Service as a user that has these rights?

v.eremin
Product Manager
Posts: 16375
Liked: 1355 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-Job Script

Post by v.eremin » Aug 16, 2016 5:00 pm

Or is it better to run the Veeam-Service as a user that has these rights?
This. Thanks.

Tecbil
Influencer
Posts: 19
Liked: 2 times
Joined: Apr 08, 2016 6:20 am
Full Name: Fabio Di Taranto
Contact:

Re: Pre-Job Script

Post by Tecbil » Aug 17, 2016 10:06 am

ok, i did it and it works now. thank you.

v.eremin
Product Manager
Posts: 16375
Liked: 1355 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Pre-Job Script

Post by v.eremin » Aug 17, 2016 10:48 am

Pre/Post job scripts are executed under account specified for Veeam-specific services. Thus, everything started to work, as soon as you granted it required permissions.

Glad to hear that you're up and running now.

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 72 guests