feat: store backup name as path
This commit is contained in:
parent
230445783a
commit
30caa32d1b
1 changed files with 13 additions and 11 deletions
|
@ -206,10 +206,12 @@ def start_backup_process(config, containers):
|
||||||
|
|
||||||
if has_volumes:
|
if has_volumes:
|
||||||
logger.info('Backing up volumes')
|
logger.info('Backing up volumes')
|
||||||
for volume in [f.path for f in os.scandir('/volumes') if f.is_dir()]:
|
for volume in [f for f in os.scandir('/volumes') if f.is_dir()]:
|
||||||
|
logger.info('Backing up volumes of %s', volume.name)
|
||||||
|
for path in [f.path for f in os.scandir(volume.path) if f.is_dir()]:
|
||||||
try:
|
try:
|
||||||
logger.info('Backing up %s', volume)
|
logger.info('Backing up %s', path)
|
||||||
vol_result = restic.backup_files(config.repository, source=volume)
|
vol_result = restic.backup_files(config.repository, source=path)
|
||||||
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