Comprehensive data protection for all workloads
Post Reply
faisalmali
Influencer
Posts: 19
Liked: never
Joined: Aug 22, 2024 1:18 pm
Full Name: Faisal Muujahid Ali
Contact:

Running scripts on Linux server

Post by faisalmali »

Hello Dears ,

I have a backup job with multiple linux servers I want to run a script to take a mysql xtradb backup and be stored in a specific path on the server.

When trying to configure the job I found that I can add a pre job script but when I click browse it seems to be browsing my veeam vbr itself and not my linux server.

I also noticed I can configure the script in the application aware processing but also when I click browse it checks the veeam vbr itself? do I store my script on the VBR server?

So My question here is how do I configure my job so that my scripts runs on my linux machine.

Any help is greatly appreciated.
Mildur
Product Manager
Posts: 10345
Liked: 2763 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Running scripts on Linux server

Post by Mildur »

Hello Faisal

I assume you are asking for VM level backups.

There are two kinds of scripts. Job-Scripts (Pre-Job and After-Job) and Snapshot (Pre-Freeze and Post-Thaw Scripts).
Job-Scripts run on the backup server. And Snapshot Scripts run directly on the protected virtual machines.

What you need are the Snapshot scripts. You must configure them in the "Guest processing / application aware processing" settings in your backup job. The script is stored on the backup server and copied to the virtual machine when the backup job starts processing the VM. The Pre-Freeze script will be executed before the VM Snapshot is created and the Post-Thaw will be executed directly after the VM Snapshot was created.

The same concept exists for managed Veeam Agent backups. Veeam Agent for Linux would also allow you to create application consistent backups of your MySQL server.

Best,
Fabian
Product Management Analyst @ Veeam Software
faisalmali
Influencer
Posts: 19
Liked: never
Joined: Aug 22, 2024 1:18 pm
Full Name: Faisal Muujahid Ali
Contact:

Re: Running scripts on Linux server

Post by faisalmali »

Thanks Fabian will be testing it today.
faisalmali
Influencer
Posts: 19
Liked: never
Joined: Aug 22, 2024 1:18 pm
Full Name: Faisal Muujahid Ali
Contact:

Re: Running scripts on Linux server

Post by faisalmali »

Hello Fabian ,

Do I need to create a user to run the script I added it the Guest processing it sucessfully pushes my script to the server however it fails to execute.

Also how can I disable the Mysql guest processing?

Thanks
Mildur
Product Manager
Posts: 10345
Liked: 2763 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Running scripts on Linux server

Post by Mildur » 1 person likes this post

Yes, as documented in the help center article I have provided in my last comment. The account requires root permission ad the script must be in the SH file format.

https://helpcenter.veeam.com/docs/backu ... ml?ver=120
When the job starts, Veeam Backup & Replication uploads scripts to the VM guest OS and executes them under the account specified in the Guest OS credentials section of the job settings.

- Scripts for Linux VMs are uploaded over SSH or VIX API/vSphere Web Services if the SSH connection fails. Scripts are executed from the /tmp directory. If you use Renci or Rebex SSH library, and the Elevate account privileges automatically check box is selected for the user that you have specified in Guest OS credentials, the scripts will first be uploaded to the /home/<username> and then moved to /tmp.
Best,
Fabian
Product Management Analyst @ Veeam Software
faisalmali
Influencer
Posts: 19
Liked: never
Joined: Aug 22, 2024 1:18 pm
Full Name: Faisal Muujahid Ali
Contact:

Re: Running scripts on Linux server

Post by faisalmali »

Hi Fabian ,

Thanks again for your help the backup works now and its running the script as intended.

I have just two more questions.

1- Do I need to keep the scripts or is it possible to remove thiem from VBR server since its copied to the target machine?
2- If I do have to keep them what is the best practice to secure these scripts as it contains sensitive data?

Thank you
Mildur
Product Manager
Posts: 10345
Liked: 2763 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Running scripts on Linux server

Post by Mildur » 1 person likes this post

Hello Faisal

1.) Yes, the script must stay on your backup server
2.) I assume you mean sensitive data as "credentials"?

For question 2, I have asked a colleague from the linux team because I'm not that experienced in scripting and linux myself.

Realistically, your entire backup server contains sensitive data. :)
If someone gains administrative access to the backup server, they could easily export stored credentials or restore data from any of the protected machines.

Therefore, it is crucial to ensure that no unauthorized users have direct access to the operating system of your backup server. They should only use a remote console from a separate machine. Additionally, user accounts which use the backup console to access the backup server should be protected by multi-factor authentication (MFA), and RDP access to the backup server should be strictly prohibited.

Best,
Fabian
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 102 guests