From: Eric Bollengier Date: Wed, 20 Jan 2010 15:24:45 +0000 (+0100) Subject: Add Bvfs notes X-Git-Tag: Release-5.0.0~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c46a6cd670c31dc6356a4a89d1d31ac70efcb85;p=bacula%2Fdocs Add Bvfs notes --- diff --git a/docs/manuals/en/developers/gui-interface.tex b/docs/manuals/en/developers/gui-interface.tex index 2733cda9..218f5af5 100644 --- a/docs/manuals/en/developers/gui-interface.tex +++ b/docs/manuals/en/developers/gui-interface.tex @@ -24,7 +24,7 @@ exception of dbcheck and bscan). This is because at some point I would like to add user level security and access. If we have code spread everywhere such as in a GUI this will be more difficult. The other advantage is that any code you add to the Director is automatically available to both the tty console program -and the GNOME program. The major disadvantage is it increases the size of the +and the WX program. The major disadvantage is it increases the size of the code -- however, compared to Networker the Bacula Director is really tiny. \subsection{GUI Interface is Difficult} @@ -98,5 +98,35 @@ Then the read\_and\_process\_input routine looks like the following: For a GUI program things will be a bit more complicated. Basically in the very inner loop, you will need to check and see if any output is available on the -UA\_sock. For an example, please take a look at the GNOME GUI interface code -in: \lt{}bacula-source\>/src/gnome-console/console.c +UA\_sock. For an example, please take a look at the WX GUI interface code +in: \lt{bacula-source/src/wx-console} + +\section{Bvfs API} +\label{sec:bvfs} + +To help developers of restore GUI interfaces, we have added new \textsl{dot + commands} that permit browsing the catalog in a very simple way. + +\begin{itemize} +\item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update + the Bvfs cache in the catalog. You need to run it before any access to the + Bvfs layer. + +\item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command + will list all directories in the specified \texttt{path} or + \texttt{pathid}. Using \texttt{pathid} avoids problems with character + encoding of path/filenames. + +\item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command + will list all files in the specified \texttt{path} or \texttt{pathid}. Using + \texttt{pathid} avoids problems with character encoding. +\end{itemize} + +You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of +data that will be displayed. + +\begin{verbatim} +* .bvfs_update jobid=1,2 +* .bvfs_update +* .bvfs_lsdir path=/ jobid=1,2 +\end{verbatim}