forked from moritz/migrabrator
check abra cp output
This commit is contained in:
parent
34588bc299
commit
78ed9458ec
@ -25,7 +25,7 @@ def main(loglevel, source_app, dst_domain, target_server, move_volumes, undeploy
|
||||
if not isinstance(numeric_level, int):
|
||||
raise ValueError('Invalid log level: %s' % loglevel)
|
||||
logging.basicConfig(level=numeric_level)
|
||||
#move_app(source_app, target_server, dst_domain, move_volumes, undeploy, run_backup)
|
||||
move_app(source_app, target_server, dst_domain, move_volumes, undeploy, run_backup)
|
||||
#copy_files_between_servers('source.example.com', '/var/lib/docker/', 'target.example.com', '/var/lib/docker')
|
||||
|
||||
|
||||
@ -188,9 +188,9 @@ def get_secrets(source_app):
|
||||
source_app, 'download', '--secrets'])
|
||||
output = subprocess.run(['abra', 'app', 'cp', backupbot, f"app:/tmp/backup.tar.gz", "/tmp"])
|
||||
# Todo: https://git.coopcloud.tech/coop-cloud/organising/issues/525
|
||||
# if output.returncode:
|
||||
# logging.error(f"Could not dump secrets for {source_app}")
|
||||
# exit()
|
||||
if output.returncode:
|
||||
logging.error(f"Could not dump secrets for {source_app}")
|
||||
exit()
|
||||
with tarfile.open('/tmp/backup.tar.gz') as tar:
|
||||
source_service = source_app.replace(".", "_")
|
||||
file = tar.extractfile(f"{source_service}.json")
|
||||
|
Loading…
x
Reference in New Issue
Block a user