Skip to content
Snippets Groups Projects
Commit c7b89b8e authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: path and argument

parent 7edafb6e
No related branches found
No related tags found
No related merge requests found
...@@ -43,14 +43,14 @@ out : str ...@@ -43,14 +43,14 @@ out : str
A YAML text representation of the backup process. A YAML text representation of the backup process.
""" """
command = ["./backup.sh"] command = ["./utils/backup.sh"]
env = os.environ.copy() env = os.environ.copy()
if not directory: if not directory:
os.makedirs("/tmp/caosdb/tmpfiles/backup/", exist_ok=True) os.makedirs("/tmp/caosdb/tmpfiles/backup/", exist_ok=True)
directory = tempfile.mkdtemp(dir="/tmp/caosdb/tmpfiles/backup/", directory = tempfile.mkdtemp(dir="/tmp/caosdb/tmpfiles/backup/",
prefix="backup.") prefix="backup.")
command.append("--backupdir={}".format(directory)) env["BACKUPDIR"] = directory
result = subprocess.run(command, cwd=os.path.dirname(__file__), env=env) result = subprocess.run(command, cwd=os.path.dirname(__file__), env=env)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment