Always backup all apps to increase restic performance
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
ff2b5a25a2
commit
c73bbe8c0d
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue