Skip to content

Commit

Permalink
Merge pull request #533 from bareos/dev/pstorz/bareos-19.2/oVirt-rest…
Browse files Browse the repository at this point in the history
…ore-bug-fix

oVirt plugin: fix restore problem to local disk
  • Loading branch information
pstorz committed May 29, 2020
2 parents 541cc16 + ae2ba30 commit e5eb74f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 10 additions & 5 deletions core/src/plugins/filed/BareosFdPluginOvirt.py
Expand Up @@ -259,11 +259,16 @@ def create_file(self, context, restorepkt):
"create_file() entry point in Python called with %s\n" % (restorepkt),
)

# process includes/excludes for restore, note that it is more
# efficient to mark only the disks to restore, as skipping
# here can not prevent from receiving the data from bareos-sd
# which is useless for excluded disks.
if not restorepkt.ofname.endswith(".ovf"):
# Process includes/excludes for restore to oVirt. Note that it is more
# efficient to mark only the disks to restore, as skipping here can not
# prevent from receiving the data from bareos-sd which is useless for
# excluded disks.
#
# When restoring locally, all disks will be restored without filtering.
if (
not restorepkt.ofname.endswith(".ovf")
and not self.options.get("local") == "yes"
):
disk_alias = self.ovirt.get_ovf_disk_alias_by_basename(
context, restorepkt.ofname
)
Expand Down
4 changes: 3 additions & 1 deletion docs/manuals/source/TasksAndConcepts/Plugins.rst
Expand Up @@ -797,9 +797,11 @@ exclude_disk_aliases
Also note that disk alias names are not unique, so if two disks of a VM have the same
alias name, they will be excluded both. Excluded disks will be already excluded from
the snapshot.
On *local* restore, both **include_disk_aliases** and **exclude_disk_aliases** are ignored
and *all* disk that were backed up will be restored.

overwrite
When restoring disks of an existing VM, the option **overwrite=yes** must be explictly
When restoring disks of an existing VM, the option **overwrite=yes** must be explicitly
passed to force overwriting. To prevent from accidentally overwriting an existing VM,
the plugin will return an error message if this option is not passed.

Expand Down

0 comments on commit e5eb74f

Please sign in to comment.