Commit 9811e302 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

lvm: Fixed archive name when LVM snapshot size is specified

parent b5565fa4
Pipeline #6756 passed with stage
in 57 seconds
......@@ -25,7 +25,7 @@ from ..notifiers import NotifierList
from ..util import chunks, get_file_size
from . import BackupArchiveDevices, BackupSet, DatasourceError, DatasourcePluginBase
__VERSION__ = "0.1.0"
__VERSION__ = "0.1.1"
class LVMBackupArchive(BackupArchiveDevices):
......@@ -225,8 +225,8 @@ class LVMPlugin(DatasourcePluginBase):
for volume_sets in backup_items:
# Split off volume list on ,
volume_list = volume_sets.replace("/dev/", "").split(",")
# Generate an archive name
archive_name = f"{self.archive_basename}-{volume_list[0].replace('/dev/','').replace('/', '_')}"
# Generate an archive name, take first volume, remove /dev, replace / with _, drop config at end (take first component)
archive_name = f"{self.archive_basename}-{volume_list[0].replace('/dev/','').replace('/', '_').split(':')[0]}"
# Create the backup archive
lvm_archive = LVMBackupArchive(archive_name=archive_name, lvm_volume_list=volume_list, notifiers=self.notifiers)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment