Use PS-script for remote execution during SureBackup?

PowerShell script exchange

Use PS-script for remote execution during SureBackup?

Veeam Logoby Harald » Mon Aug 24, 2015 3:00 pm

Hello all,

I'm backing up several Linux-based databases (Oracle and PostgreSQL) with Veeam, and since we had some issues with data file corruptions in the past (not caused by Veeam) I'd like to run a verification script on the VM while it is running in the vLab during the SureBackup job.
I have issued a support question for this (support ID is 01003991), but support told me that it's not possible to run remote scripts, all scripts are executed locally on the Veeam server. Support has opened a feature request for this, but in the meantime, I'm wondering if it would be possible to use powershell for this?
For example a PS script which copies a Linux shell script to the VM running in the vLab, start it, and examine the result (similar to the Linux pre-freeze/post-thaw-scripts I can add to a normal backup job)? I'm not very familiar with Powershell scripting yet, so, can someone point me in the right direction? Or is this not possible at all?

Thanks and kind regards from Germany,

Harald
Harald
Novice
 
Posts: 9
Liked: 2 times
Joined: Thu Sep 11, 2014 9:05 am
Full Name: Harald Husemann

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby v.Eremin » Mon Aug 24, 2015 3:23 pm

Aren't custom scripts executed against VMs to verify something you're looking for? Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby Harald » Wed Aug 26, 2015 4:18 pm

Hello Vladimir,

many thanks for your answer! Unfortunately custom scripts are also executed on the Veeam server and not inside the VM, as it's done for example for pre-freeze- and post-thaw-scripts. But we've found a PS module which provides SSH capabilities, so we're now developing PS scripts which will hopefully do the job.
As soon as we're having some working scripts (or given up, :-)) I will update this thread and post our experiences with this approach.

Best regards from Germany,

Harald
Harald
Novice
 
Posts: 9
Liked: 2 times
Joined: Thu Sep 11, 2014 9:05 am
Full Name: Harald Husemann

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby v.Eremin » Fri Aug 28, 2015 11:03 am

In this case, you can use something like plink to run scripts inside Linux-based VMs over SSH. Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby JuA » Mon May 23, 2016 12:17 pm

Bump :mrgreen:
JuA
Enthusiast
 
Posts: 33
Liked: 3 times
Joined: Tue Jan 20, 2015 1:25 pm
Full Name: Julien A

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby v.Eremin » Mon May 23, 2016 12:45 pm

Would you mind providing a bit more details? Do you second a request to have an ability to run test scripts directly on VMs to verify? Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby JuA » Mon May 23, 2016 1:27 pm

Hi,

Do you have more information about the scripts mentionned by Harald in his post on Aug 26, 2015 5:18 pm ?

Regards,

Julien
JuA
Enthusiast
 
Posts: 33
Liked: 3 times
Joined: Tue Jan 20, 2015 1:25 pm
Full Name: Julien A

Re: Use PS-script for remote execution during SureBackup?

Veeam Logoby v.Eremin » Mon May 23, 2016 3:42 pm

He might have talked about this custom PS module allowing you to reach remote Linux hosts via SSH using PS. However, I'm not 100% sure. Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] Error with SCRIPTS on SureBackup (VM LINUX CENTOS 7

Veeam Logoby alexandre.inacio » Fri Jul 07, 2017 5:31 pm

Hi,

I am trying to test a script with output equal to exit 0 (success) or exit 1 (failure) and I am getting the following error (7/7/2017 2:14:28 PM Error Custom script 1: name teste1.sh, failed - Failed to create process: ERROR_ALREADY_EXISTS)

My script looks like this:

#!/bin/bash
exit 0

In the POST and PRE script in the backup work well, in the surebackup script that happens this problem
alexandre.inacio
Novice
 
Posts: 3
Liked: never
Joined: Fri Jul 07, 2017 5:20 pm
Full Name: Alexandre Inacio

Re: Error with SCRIPTS on SureBackup (VM LINUX CENTOS 7)

Veeam Logoby PTide » Mon Jul 10, 2017 3:45 pm

Hi,

Surebackup scripts are executed on the VBR server, while pre-freeze/post-thaw scripts are uploaded to the linux host via ssh. Have you tried to place your script in a wrapper (.bat, .cmd, .js, .vbs, .wsf) ?

Thank you
PTide
Veeam Software
 
Posts: 3017
Liked: 245 times
Joined: Tue May 19, 2015 1:46 pm

Re: Error with SCRIPTS on SureBackup (VM LINUX CENTOS 7)

Veeam Logoby alexandre.inacio » Mon Jul 10, 2017 6:20 pm

Hi, do you have any script example to test or connect on mysql (linux server) with surebackup script?
alexandre.inacio
Novice
 
Posts: 3
Liked: never
Joined: Fri Jul 07, 2017 5:20 pm
Full Name: Alexandre Inacio

Re: Error with SCRIPTS on SureBackup (VM LINUX CENTOS 7)

Veeam Logoby PTide » Tue Jul 11, 2017 10:28 am

No, I don't have any at hand. However there is more than one workaround to execute a custom script on a remote linux host, please see Vladimir's posts about plink and PS SSH module for details.

Thank you
PTide
Veeam Software
 
Posts: 3017
Liked: 245 times
Joined: Tue May 19, 2015 1:46 pm


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests