startVerifyFile(bpContext *ctx, struct save_pkt *sp)
This entry point is called only if your plugin is a plugin options during a Verify Job (level Data), and it is called when Bacula encounters a regular file in the data stream. Called when beginning the verify of a file. Here Bacula provides you with a pointer to the save_pkt structure and you must fill in this packet with the “attribute” data of the file.
struct save_pkt {
int32_t pkt_size; /* size of this packet */
char *fname; /* Full path and filename */
char *link; /* Link name if any */
struct stat statp; /* System stat() packet for file */
int32_t type; /* FT_xx for this file */
uint32_t flags; /* Bacula internal flags */
bool portable; /* set if data format is portable */
char *cmd; /* command */
struct restore_object restore_obj; /* Info about restore object */
struct plugin_object plugin_obj; /* Plugin Object */
const plugin_metadata *plug_meta; /* Metadata packet provided by plugin */
uint32_t delta_seq; /* Delta sequence number */
char *object_name; /* Object name to create */
char *object; /* restore object data to save */
int32_t object_len; /* restore object length */
int32_t index; /* restore object index */
int32_t pkt_end; /* end packet sentinel */
};
The second argument is a pointer to the save_pkt structure for the file to be backed up. The plugin can use the fields of the save_pkt. (mostly fname, link, statp, type).
Once the verify has begun, Bacula will call your plugin at the pluginIO entry point to “write” the data to be backed up.
Possible Next Steps
Go back to Plugin EntryPoints.
Go back to Bacula FD Plugin API.
Go back to Developer Guide.