Standalone backup agents for Linux, Mac, AIX & Solaris workloads on-premises or in the public cloud
Post Reply
VAB
Enthusiast
Posts: 25
Liked: 3 times
Joined: Jan 09, 2024 10:07 am
Full Name: VAB
Contact:

[SOLARIS] How to pass parameters to a pre/post job script?

Post by VAB »

Hello all!

I am trying to pass parameters to pre and post job scripts. The backup job is created on the CLI. The creation command looks like this:

Code: Select all

/usr/sbin/veeamconfig job create --blockSize 8192 --compressionLevel 4 --includeDirs /var/tmp --prejob "/var/tmp/script_pre job starts" --postjob "/var/tmp/script_post job ends" --name backup-test_var_tmp --repoName "My Repo"
Running the scripts fails:

Code: Select all

[21.05.2024 13:44:52.032] <     2> lpbcomm|   Executing custom script: [/var/tmp/script_pre job starts]. Arguments: [] ok.
[21.05.2024 13:44:52.098] <     2> vmb    |   [SessionLog][warn] Failed to execute pre-job script.
[21.05.2024 13:44:52.100] <     2> lpbcore| ERR |Failed to execute pre-job script.
[21.05.2024 13:44:52.100] <     2> lpbcore| >>  |Failed to execute [/var/tmp/script_pre job starts]. errno [2]: No such file or directory
Obviously, the entire string passed to --prejob including all whitespace is assumed to be the script name. The "Arguments: []" output hints at the option to pass parameters. How do I do that? The parameters are static, they do not need to change between job runs.

Thanks,
VAB
rovshan.pashayev
Veeam Software
Posts: 405
Liked: 83 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: [SOLARIS] How to pass parameters to a pre/post job script?

Post by rovshan.pashayev »

Hello VAB,

Pre & post job options do not accept parameters, just path to the script. You will need to customise your scripts.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
VAB
Enthusiast
Posts: 25
Liked: 3 times
Joined: Jan 09, 2024 10:07 am
Full Name: VAB
Contact:

Re: [SOLARIS] How to pass parameters to a pre/post job script?

Post by VAB »

Hi Rovshan!

Thank you for your quick reply. I half-expected that answer already, so it is no big deal. However, it would make life easier if I could just reuse one script and pass things like the job name as an argument. Maybe you could accept this as an RFE? :-)

Thanks,
Volker
rovshan.pashayev
Veeam Software
Posts: 405
Liked: 83 times
Joined: Jul 03, 2023 12:44 pm
Full Name: Rovshan Pashayev
Location: Czechia
Contact:

Re: [SOLARIS] How to pass parameters to a pre/post job script?

Post by rovshan.pashayev » 1 person likes this post

Hi VAB,

Thank you for your suggestion. You have been heard.
Rovshan Pashayev
Analyst
Veeam Agent for Linux, Mac, AIX & Solaris
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests