feat: backup each container with its own path
This commit is contained in:
parent
dc42418bf7
commit
230445783a
1 changed files with 12 additions and 10 deletions
|
@ -205,9 +205,11 @@ def start_backup_process(config, containers):
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if has_volumes:
|
if has_volumes:
|
||||||
try:
|
|
||||||
logger.info('Backing up volumes')
|
logger.info('Backing up volumes')
|
||||||
vol_result = restic.backup_files(config.repository, source='/volumes')
|
for volume in [f.path for f in os.scandir('/volumes') if f.is_dir()]:
|
||||||
|
try:
|
||||||
|
logger.info('Backing up %s', volume)
|
||||||
|
vol_result = restic.backup_files(config.repository, source=volume)
|
||||||
logger.debug('Volume backup exit code: %s', vol_result)
|
logger.debug('Volume backup exit code: %s', vol_result)
|
||||||
if vol_result != 0:
|
if vol_result != 0:
|
||||||
logger.error('Volume backup exited with non-zero code: %s', vol_result)
|
logger.error('Volume backup exited with non-zero code: %s', vol_result)
|
||||||
|
|
Loading…
Add table
Reference in a new issue