On 01/05/2017 04:32 PM, 74cmonty wrote:
> Hi,
>
> I want this command to be executed (as root):
> su tstadm -c \"/usr/sap/TST/HDB00/exe/hdbsql -t -U BKPOPERATOR 'BACKUP DATA
> INCREMENTAL USING FILE
> ('/usr/sap/TST/HDB00/backup/data/backup-incr-TST-bareos-schedule');'\"
>
> When I define a related Run Script
> ClientRunBeforeJob = "su tstadm -c \"/usr/sap/TST/HDB00/exe/hdbsql -t -U
> BKPOPERATOR 'BACKUP DATA
> INCREMENTAL USING FILE
> ('/usr/sap/TST/HDB00/backup/data/backup-incr-TST-bareos-schedule');'\""
> this is interpreted incorrectly.
Hi THX,
it's expected behavior. You gave into single quote:
'BACKUP DATA INCREMENTAL USING FILE ('
and
');'
So you need to change the quotes. I think it's not needed to use
quotes for string parameters in bareos config.
e.g.
ClientRunBeforeJob = su tstadm -c "/usr/sap/TST/HDB00/exe/hdbsql -t -U
BKPOPERATOR 'BACKUP DATA
INCREMENTAL USING FILE
(\"/usr/sap/TST/HDB00/backup/data/backup-incr-TST-bareos-schedule\");'"
or
ClientRunBeforeJob = "su tstadm -c \"/some/path/to/the/script/backup.sh\""
on client machine# cat /some/path/to/the/script/backup.sh
/usr/sap/TST/HDB00/exe/hdbsql -t -U BKPOPERATOR 'BACKUP DATA
INCREMENTAL USING FILE
("/usr/sap/TST/HDB00/backup/data/backup-incr-TST-bareos-schedule");'
Cheers,
Luf
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.