From ed86ede8d8fe343ad63f8ae8a99aa1b4a52f9810 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Fri, 16 Oct 2015 16:35:00 +0200 Subject: [PATCH] Add "accurate" support to VMWARE plugin. As we want all files to be restored in the same order that the backups are taken of the VM we have to fool the accurate code to think that all previous "virtual files" are also found again. We can fake this by returning bRC_Seen on each question to the check_file method of the plugin which gets invoked for each file on the accurate Seen bitmap when building the so called deleted files list. --- vmware_plugin/BareosFdPluginVMware.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vmware_plugin/BareosFdPluginVMware.py b/vmware_plugin/BareosFdPluginVMware.py index 6f424ef163c..c9eed68cb55 100644 --- a/vmware_plugin/BareosFdPluginVMware.py +++ b/vmware_plugin/BareosFdPluginVMware.py @@ -117,13 +117,6 @@ def start_backup_job(self, context): if check_option_bRC != bRCs['bRC_OK']: return check_option_bRC - accurate_enabled = bareosfd.GetValue(context, bVariable['bVarAccurate']) - if accurate_enabled != 0: - bareosfd.JobMessage( - context, bJobMessageType['M_FATAL'], - "start_backup_job: Accurate backup not allowed please disable in Job\n") - return bRCs['bRC_Error'] - if not self.vadp.connect_vmware(context): return bRCs['bRC_Error'] @@ -260,6 +253,13 @@ def create_file(self, context, restorepkt): restorepkt.create_status = bCFs['CF_EXTRACT'] return bRCs['bRC_OK'] + def check_file(self, context, fname): + bareosfd.DebugMessage( + context, 100, + "BareosFdPluginVMware:check_file() called with fname %s\n" % + (fname)) + return bRCs['bRC_Seen'] + def plugin_io(self, context, IOP): bareosfd.DebugMessage( context, 100,