More logging during backup
This commit is contained in:
parent
2cbc5aa6fa
commit
fd87ddc388
|
@ -150,6 +150,7 @@ def start_backup_process(config, containers):
|
||||||
errors = True
|
errors = True
|
||||||
|
|
||||||
# back up databases
|
# back up databases
|
||||||
|
logger.info('Backing up databases')
|
||||||
for container in containers.containers_for_backup():
|
for container in containers.containers_for_backup():
|
||||||
if container.database_backup_enabled:
|
if container.database_backup_enabled:
|
||||||
try:
|
try:
|
||||||
|
@ -165,14 +166,18 @@ def start_backup_process(config, containers):
|
||||||
errors = True
|
errors = True
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
|
logger.error('Exit code: %s', errors)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Only run cleanup if backup was successful
|
# Only run cleanup if backup was successful
|
||||||
result = cleanup(config, container)
|
result = cleanup(config, container)
|
||||||
logger.debug('cleanup exit code: %s', errors)
|
logger.debug('cleanup exit code: %s', result)
|
||||||
if result != 0:
|
if result != 0:
|
||||||
|
logger.error('Exit code: %s', result)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
logger.info('Backup completed')
|
||||||
|
|
||||||
|
|
||||||
def cleanup(config, containers):
|
def cleanup(config, containers):
|
||||||
"""Run forget / prune to minimize storage space"""
|
"""Run forget / prune to minimize storage space"""
|
||||||
|
|
Loading…
Reference in New Issue