diff --git a/backup.py b/backup.py index 93737763dd2b6d747aad2b442256258a8c3d5223..1bdbeafe47cc713e640a0ccac1383b6937e2d2e2 100755 --- a/backup.py +++ b/backup.py @@ -43,14 +43,14 @@ out : str A YAML text representation of the backup process. """ - command = ["./backup.sh"] + command = ["./utils/backup.sh"] env = os.environ.copy() if not directory: os.makedirs("/tmp/caosdb/tmpfiles/backup/", exist_ok=True) directory = tempfile.mkdtemp(dir="/tmp/caosdb/tmpfiles/backup/", prefix="backup.") - command.append("--backupdir={}".format(directory)) + env["BACKUPDIR"] = directory result = subprocess.run(command, cwd=os.path.dirname(__file__), env=env)