plugin development: bareosfd.bRC_Skip

16 views
Skip to first unread message

Philippe

unread,
Mar 24, 2022, 6:39:12 AM3/24/22
to bareos...@googlegroups.com

Hi all,


currently I'm playing around with Bareos 21.0.0 and python3-plugins to
backup virtual files like git repositories that get packed using 'git
bundle create …', saving the command's output.

Full backups work fine.

For incremental backups I check the repository mtimes against self.since
and would like to skip this repo if nothing changed.

Unfortunately, returning bRC_Skip skips this repository as well as all
remaining ones (i.e.: not calling start_backup_file for any of the
remaining repos).

I worked around that by setting savepkt.type to FT_NOCHG, but I have an
additional case where this won't work: I'm also backing up a mysql
database using mysqldump (as virtual file as well) and I'd like to skip
the dump file in case mysqldump is not found, which I guess would be the
perfect use case for bRC_Skip. Meh.

In core/src/filed/fd_plugins.cc I saw that the function
trigger_plugin_event returns a stop value of 'true' for
bRC_Stop, bRC_Error and bRC_Skip, but not for bRC_Cancel. Is that
correct? Shouldn't that function return 'true' on bRC_Cancel and not on
bRC_Skip? Since this 'stop = true' line for bRC_Skip is there since 2016
I guess I'm missing something. Can anyone help me out, please?


Kind regards,

Philippe
Reply all
Reply to author
Forward
0 new messages