> 
> The iPhone answer is yes :)
> 
> Have a look at the exchange plugin in src/win32/filed/plugins.
Basically you
> just return 'more' at the end of each file to tell bacula that there
is
> another file and it will call your backupfile routine again.
> 

Longer answer now I'm back at my computer...

If you wanted the following structure (I know nothing about afs so this
might be wrong but the idea should still hold):
/afs/user.aaa/
/afs/user.aaa/dir1/
/afs/user.aaa/dir1/file1
/afs/user.aaa/dir1/file2
/afs/user.aaa/dir2/
/afs/user.aaa/dir2/file1
/afs/user.aaa/dir2/file2
/afs/user.bbb/
/afs/user.bbb/dir1/
/afs/user.bbb/dir1/file1

Then you handle startBackupFile as normal, but at endBackupFile, return
bRC_More on all except the last file. Bacula will just keep calling you
until it sees something other than bRC_More.

You want to return the directories last though, with type FT_DIREND, eg:
/afs/user.aaa/dir1/file1
/afs/user.aaa/dir1/file2
/afs/user.aaa/dir1/
/afs/user.aaa/dir2/file1
/afs/user.aaa/dir2/file2
/afs/user.aaa/dir2/
/afs/user.aaa/

Which is the same as Bacula proper does it.

Can Bacula not just back up the mounted afs directory or are there some
shortcomings in doing so that you think would be best accomplished with
a plugin?

I've never used baculaAddInclude, but the Exclude is useful if the
plugin is 'instead of' some existing regular filesystem files, eg if you
had a MySQL plugin that backed up the database, it would tell bacula to
exclude the files that made up the database (eg /var/lib/mysql/* or
wherever they happen to reside), so you didn't have to manually exclude
them from the fileset. Not sure it would apply to AFS.

James

> Sent from my iPhone
> 
> On 05/07/2010, at 19:27, "Jakub Witkowski" <j...@wszib.edu.pl> wrote:
> 
> > Hi,
> >
> > Is it possible to generate multiple "virtual files" from a single
> > plugin invocation? For example using:
> > Plugin="afsplugin:/afs:cellname:user.*"
> > to generate backup entries:
> > /afs/user.aaa
> > /afs/user.aab
> > /afs/user.aac
> > etc.
> >
> > Reading through fd_plugins.{h|c} I noticed baculaAddInclude, but
it's
> > comment seems to suggest it can only generate entries for the
classic
> > file walker, not the plugin itself.
> >
> > The reason I'm asking about this is because this would allow to
bridge
> > Bacula to AFS backup api in a fairly clean and minimalistic way,
while
> > the alternative seems to be to fork the whole FD, gut it and replace
the
> > file walking code with AFS calls.
> >
> > Thanks,
> >
> > Jakub Witkowski.
> >
> >
------------------------------------------------------------------------
----
> --
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > _______________________________________________
> > Bacula-devel mailing list
> > Bacula-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
> 
>
------------------------------------------------------------------------
------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to