Host-based backup of VMware vSphere VMs.
Post Reply
falkob
Veeam Vanguard
Posts: 86
Liked: 31 times
Joined: Sep 28, 2017 7:47 am
Full Name: Falko Banaszak
Contact:

Sure Backup - Verify Linux Service

Post by falkob »

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, Veeam Vanguard, VMware vExpert
https://www.virtualhome.blog
PTide
Product Manager
Posts: 6428
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Sure Backup - Verify Linux Service

Post by PTide » 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
Veeam Vanguard
Posts: 86
Liked: 31 times
Joined: Sep 28, 2017 7:47 am
Full Name: Falko Banaszak
Contact:

Re: Sure Backup - Verify Linux Service

Post by falkob »

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, Veeam Vanguard, VMware vExpert
https://www.virtualhome.blog
Post Reply

Who is online

Users browsing this forum: No registered users and 70 guests