Discussions specific to the Microsoft Hyper-V hypervisor
Post Reply
JaxIsland7575
Veeam Vanguard
Posts: 388
Liked: 105 times
Joined: Apr 27, 2015 1:59 pm
Full Name: Ryan Jacksland
Location: NY, USA
Contact:

Pre-Backup Script

Post by JaxIsland7575 » Mar 08, 2019 3:44 pm

I am trying to restart the VSS service on a server being backed up with VBR 9.5 U4. I have gone through a few attempts but so far they are all failing.

I created a .bat file with:
cd "C:\tools\PSTools"
PsService.exe \\servername restart vss

This file works locally or from the VBR server, but when I integrate it into the backup job it fails after 15 minutes of timing out. I am not sure how I can get this to restart the service prior to the backup running.
VMCE v9

PTide
Product Manager
Posts: 5339
Liked: 468 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Pre-Backup Script

Post by PTide » Mar 08, 2019 4:55 pm

Hi,

It's not quite clear what you are referring to as "pre-backup" - is it pre-freeze or pre-job?

Thanks!

JaxIsland7575
Veeam Vanguard
Posts: 388
Liked: 105 times
Joined: Apr 27, 2015 1:59 pm
Full Name: Ryan Jacksland
Location: NY, USA
Contact:

Re: Pre-Backup Script

Post by JaxIsland7575 » Mar 08, 2019 4:58 pm

Edit Job -> Storage -> Advanced -> Scripts -> Run the following script before the job:
In there I selected the batch file from the local drive of the VBR server.
VMCE v9

PTide
Product Manager
Posts: 5339
Liked: 468 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Pre-Backup Script

Post by PTide » Mar 08, 2019 5:14 pm

Those scripts are run from the same service account that Veeam Backup Service is running under. Does the account have enough permissions to be able to restart VSS on the target server?

Thanks

JaxIsland7575
Veeam Vanguard
Posts: 388
Liked: 105 times
Joined: Apr 27, 2015 1:59 pm
Full Name: Ryan Jacksland
Location: NY, USA
Contact:

Re: Pre-Backup Script

Post by JaxIsland7575 » Mar 08, 2019 5:36 pm

I added the service account as a local administrator on the server and ran the backup again. Same issue with the "Running pre-job script" just times out after 15 mins. I tried searching the logs and only found:

[08.03.2019 10:53:25] <01> Warning Pre-job script timed out
[08.03.2019 10:53:25] <01> Warning Pre-job script timed out
VMCE v9

PTide
Product Manager
Posts: 5339
Liked: 468 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Pre-Backup Script

Post by PTide » Mar 08, 2019 5:48 pm

Then I would suggest to echoing to file before and after each action in that script just to figure out where exactly it hangs, and if it starts at all.

Thanks

JaxIsland7575
Veeam Vanguard
Posts: 388
Liked: 105 times
Joined: Apr 27, 2015 1:59 pm
Full Name: Ryan Jacksland
Location: NY, USA
Contact:

Re: Pre-Backup Script

Post by JaxIsland7575 » Mar 08, 2019 6:08 pm

I have a log file created and now the script runs in an instant and says its successful but the service on the server is not restarted. No errors logged in the file either.
VMCE v9

JaxIsland7575
Veeam Vanguard
Posts: 388
Liked: 105 times
Joined: Apr 27, 2015 1:59 pm
Full Name: Ryan Jacksland
Location: NY, USA
Contact:

Re: Pre-Backup Script

Post by JaxIsland7575 » Mar 13, 2019 2:27 pm

To fix this, I created a batch file on the VM being backed up.

Code: Select all

sc \\servername stop vss
timeout /T 10 /nobreak
sc \\servername start vss
I edited the backup job to point to that file via a UNC path, ran the job and it worked. Needed to walk away from the issue and come back, simple answer after looking at it again.

Thanks for the help!
VMCE v9

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests