Skip to content

Commit

Permalink
Add "accurate" support to VMWARE plugin.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Marco van Wieringen committed Oct 16, 2015
1 parent b594f3b commit ed86ede
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions vmware_plugin/BareosFdPluginVMware.py
Expand Up @@ -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']

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ed86ede

Please sign in to comment.