Re: [Bacula-users] Director Control Protocol
Hi, 2011/6/8 Sean Clark smcl...@tamu.edu 1. Connect to the bacula-dir daemon 2. Authenticate 3. Send a command like show status client blah.foo.bar-fd and have that return machine-parse-able status information, rather than human-readable information. You can skip the parse the list of clients step by just sending status client=blah.foo.bar-fd directly to bconsole, but I personally would also love to see more easily machine-parseable output - just adding to bconsole's commands themselves an out=xml or out=json or similar modifier that returns the information in an easier to parse form instead of the default human readable form would be extremely useful to me. There are a dot command like: * .status client=client [header, running, ...] which simplify a bconsole interaction. bye -- Radosław Korzeniewski rados...@korzeniewski.net -- 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
Re: [Bacula-users] Director Control Protocol
Il 07/06/2011 18:35, Tim Gustafson ha scritto: Hi, I was wondering if there is any documentation anywhere on the protocol that bconsole uses to connect to the director and issue commands? I've built a web interface to the Bacula configuration files, and I would like to add the ability to reload the configuration and/or start or cancel jobs from that web interface as well. If it's not well documented, I'll just tcpdump the connection between bconsole and the director itself and try to reverse-engineer it, but I was hoping that it was actually documented somewhere. BTW: I don't need comments about re-inventing the wheel - I know there are other web-based Bacula tools out there; I built this one with specific organizational needs in mind. All I want to know is if the protocol between bconsole and the director is documented somewhere. I did find some documentation on the protocols for director-fd, direcdtor-sd and fd-sd, but nothing about bconsole-director. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tim Gustafsont...@soe.ucsc.edu Baskin School of Engineering 831-459-5354 UC Santa Cruz Baskin Engineering 317B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- 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 I may sound silly, but have you tried looking at the source code ? -- Marcello Romani -- 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
Re: [Bacula-users] Director Control Protocol
On 06/07/2011 05:52 PM, Tim Gustafson wrote: Can't you spawn bconsole from the web application? That is what most of the other web apps do. [...] 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 and have that return machine-parse-able status information, rather than human-readable information. You can skip the parse the list of clients step by just sending status client=blah.foo.bar-fd directly to bconsole, but I personally would also love to see more easily machine-parseable output - just adding to bconsole's commands themselves an out=xml or out=json or similar modifier that returns the information in an easier to parse form instead of the default human readable form would be extremely useful to me. (I wrote a web-interface script that talks to bconsole. Getting the response isn't really that hard, but I do end up going through a series of regex's to pick out the individual bits of information that I want from the output, which is obviously kind of a pain.) -- 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
Re: [Bacula-users] Director Control Protocol
On Tue, Jun 7, 2011 at 12:35 PM, Tim Gustafson t...@soe.ucsc.edu wrote: Hi, I was wondering if there is any documentation anywhere on the protocol that bconsole uses to connect to the director and issue commands? I've built a web interface to the Bacula configuration files, and I would like to add the ability to reload the configuration and/or start or cancel jobs from that web interface as well. If it's not well documented, I'll just tcpdump the connection between bconsole and the director itself and try to reverse-engineer it, but I was hoping that it was actually documented somewhere. BTW: I don't need comments about re-inventing the wheel - I know there are other web-based Bacula tools out there; I built this one with specific organizational needs in mind. All I want to know is if the protocol between bconsole and the director is documented somewhere. I did find some documentation on the protocols for director-fd, direcdtor-sd and fd-sd, but nothing about bconsole-director. Can't you spawn bconsole from the web application? That is what most of the other web apps do. John -- 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
Re: [Bacula-users] Director Control Protocol
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 and have that return machine-parse-able status information, rather than human-readable information. Really, it's just a matter of cleaner code. I -could- do it by running bconsole and using a send/expect type system, but it seems like there ought to be a better way. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tim Gustafsont...@soe.ucsc.edu Baskin School of Engineering 831-459-5354 UC Santa Cruz Baskin Engineering 317B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- 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