Discussions specific to the VMware vSphere hypervisor
Post Reply
falkob
Service Provider
Posts: 66
Liked: 20 times
Joined: Sep 28, 2017 7:47 am
Full Name: Falko Banaszak
Contact:

Sure Backup - Verify Linux Service

Post by falkob » Nov 15, 2018 8:37 am

Hello community !

I was wondering if anyone already wrote a script for testing a linux service.

My goal is the following:

- Run a Sure Backup Job for a specific Linux VM
- Have a custom script which checks the status of a specific service (systemctl status specific_service)
- If the specific service is running, the Sure Backup should be successfull
- If the specific service is not running, the Sure Backup should be failed

From my understanding so far, i need to create a custom script for this Job which connects to the VM and checks the service.

Sure_Backup_Linux.bat (added in the job)

Code: Select all

"C:\temp\putty.exe -ssh root@IP.V4.Address -m C:\Sure_Backup_Scripts\Script\sure_linux_test.sh
sure_linux_test.sh (triggered by putty with -m)

Code: Select all

#!/bin/bash
systemctl status service
I have not tried it until now, i just want to know if iam on the right track.

And of course, how can i "tell Veeam" if the output of the "status" is running that the SureBackup Job is successful. Also the other way with a failed one.

Thank you very much !

Best Regards

Falko
VCP6.5-DCV, VCP6-DCV, VMCE, VMCA, VMware vExpert
https://www.virtualhome.blog

P.Tide
Product Manager
Posts: 5265
Liked: 459 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Sure Backup - Verify Linux Service

Post by P.Tide » Nov 15, 2018 11:04 am 1 person likes this post

Hi,

Haven't tested though, but your approach looks like it should work.

Please check these two threads for additional considerations: thread-1, thread-2

Thanks!

falkob
Service Provider
Posts: 66
Liked: 20 times
Joined: Sep 28, 2017 7:47 am
Full Name: Falko Banaszak
Contact:

Re: Sure Backup - Verify Linux Service

Post by falkob » Nov 15, 2018 1:01 pm

Hey PTIde,

thank you for the answer.

I will test it and provide feedback to share it with the community.

Best Regards !

Falko
VCP6.5-DCV, VCP6-DCV, VMCE, VMCA, VMware vExpert
https://www.virtualhome.blog

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Vitaliy Kazakov and 20 guests