---------- Forwarded message ----------
From: John Drescher <dresche...@gmail.com>
Date: Tue, Jun 7, 2011 at 7:30 PM
Subject: Re: [Bacula-users] Director Control Protocol
To: Tim Gustafson <t...@soe.ucsc.edu>


On Tue, Jun 7, 2011 at 6:52 PM, Tim Gustafson <t...@soe.ucsc.edu> wrote:
>> Can't you spawn bconsole from the web application? That is what most
>> of the other web apps do.
>
> I thought of that, but the interaction to get a simple bit of data out that 
> way seems to be rather difficult to parse.  Consider getting the status of a 
> given client:
>
> 1. Connect to the bacula-dir server via SSH
> 2. Run bconsole
> 3. Wait for a prompt
> 4. Enter "status"
> 5. Wait for a prompt
> 6. Enter "3"
> 7. Parse the list of client presented and figure out which option represents 
> the client you want
> 8. Enter the number you parsed from step 7
> 9. Parse the output of that command into a program-usable form
>
> I'm hoping that there might be a protocol that cuts out all the screen 
> parsing and instead lets me just do something like:
>
> 1. Connect to the bacula-dir daemon
> 2. Authenticate
> 3. Send a command like "show status client blah.foo.bar-fd"


What about
echo "show status client=ClientName" | bconsole

jmd0 ~ # echo "show status client=jmd0" | bconsole
Connecting to Director jmd0:9101
1000 OK: jmd0-dir Version: 5.1.14 (24 February 2011)
Enter a period to cancel a command.
show status client=jmd0
Resource status not found
You have messages.

John



-- 
John M. Drescher

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to