On 2012-09-05 05:43, Alex Lucas wrote: > Dears, > > Is there a way to run a complex command or even a script on a client? > > So far I have tried two ways and failed: > 1) when a command (e.g. in "ClientRunBeforeJob") has something like > "echo test > /tmp/test.out" bacula runs it on the client as "echo" as > command and the rest as the argument. i.e. there is no /tmp/test.out > on > the client > 2) when I run "test.sh" which is in the PATH on the bacula director > it > fails, I guess because there is no identical script on the client. > > Any suggestions? > > > Thank you, > Alex > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users
Yes, use the "Client Run Before Job", and point it to a shell script that exists on the client. I use this method on my FreeBSD machines to create UFS snapshots, and mount them as read only, so I can backup the snapshots to get any open files in a consistent state, then unmount and delete the snapshots with a "Client Run After Job" script. Works like a charm, I also have some machines running PostgreSQL dumps to disk, and one running an RYSNC job, using echo commands or verbose switches within the scripts allows you to output important information into the Bacula console log so that you can easily see that the script ran successfully when checking your backup jobs. -- Thanks, Dean E. Weimer http://www.dweimer.net/ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users