PowerShell script exchange
Post Reply
Harald
Enthusiast
Posts: 37
Liked: 20 times
Joined: Sep 11, 2014 9:05 am
Full Name: Harald Husemann
Contact:

Use PS-script for remote execution during SureBackup?

Post by Harald »

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
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

Aren't custom scripts executed against VMs to verify something you're looking for? Thanks.
Harald
Enthusiast
Posts: 37
Liked: 20 times
Joined: Sep 11, 2014 9:05 am
Full Name: Harald Husemann
Contact:

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

Post by Harald »

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
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

In this case, you can use something like plink to run scripts inside Linux-based VMs over SSH. Thanks.
JuA
Enthusiast
Posts: 54
Liked: 6 times
Joined: Jan 20, 2015 1:25 pm
Full Name: Julien A
Contact:

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

Post by JuA »

Bump :mrgreen:
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
JuA
Enthusiast
Posts: 54
Liked: 6 times
Joined: Jan 20, 2015 1:25 pm
Full Name: Julien A
Contact:

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

Post by JuA »

Hi,

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

Regards,

Julien
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin »

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.
alexandre.inacio
Novice
Posts: 3
Liked: never
Joined: Jul 07, 2017 5:20 pm
Full Name: Alexandre Inacio
Contact:

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

Post by alexandre.inacio »

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
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

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

Post by PTide »

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
alexandre.inacio
Novice
Posts: 3
Liked: never
Joined: Jul 07, 2017 5:20 pm
Full Name: Alexandre Inacio
Contact:

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

Post by alexandre.inacio »

Hi, do you have any script example to test or connect on mysql (linux server) with surebackup script?
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

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

Post by PTide »

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
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 8 guests