Always backup all apps to increase restic performance
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Moritz 2023-11-09 10:30:19 +01:00
parent ff2b5a25a2
commit c73bbe8c0d
1 changed files with 5 additions and 2 deletions

View File

@ -87,8 +87,10 @@ def get_backup_cmds():
labels = s.attrs['Spec']['Labels']
if (backup := labels.get('backupbot.backup')) and bool(backup):
stack_name = labels['com.docker.stack.namespace']
if SERVICE and SERVICE != stack_name:
continue
# Remove this lines to backup only a specific service
# This will unfortenately decrease restice performance
# if SERVICE and SERVICE != stack_name:
# continue
backup_apps.add(stack_name)
backup_paths = backup_paths.union(
Path(VOLUME_PATH).glob(f"{stack_name}_*"))
@ -104,6 +106,7 @@ def get_backup_cmds():
def copy_secrets(apps):
#TODO: check if it is deployed
rmtree(SECRET_PATH, ignore_errors=True)
os.mkdir(SECRET_PATH)
client = docker.from_env()