bug: Don't include volumes from containers with only database backup
This commit is contained in:
parent
aa7271c159
commit
ab7e4f4aeb
|
@ -267,9 +267,10 @@ class RunningContainers:
|
||||||
"""Obtain all containers with backup enabled"""
|
"""Obtain all containers with backup enabled"""
|
||||||
return [container for container in self.containers if container.backup_enabled]
|
return [container for container in self.containers if container.backup_enabled]
|
||||||
|
|
||||||
def generate_backup_mounts(self, dest_prefix) -> dict:
|
def generate_backup_mounts(self, dest_prefix='/backup') -> dict:
|
||||||
mounts = {}
|
mounts = {}
|
||||||
for container in self.containers_for_backup():
|
for container in self.containers_for_backup():
|
||||||
|
if container.volume_backup_enabled:
|
||||||
mounts.update(container.volumes_for_backup(source_prefix=dest_prefix, mode='ro'))
|
mounts.update(container.volumes_for_backup(source_prefix=dest_prefix, mode='ro'))
|
||||||
|
|
||||||
return mounts
|
return mounts
|
||||||
|
|
Loading…
Reference in New Issue