mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-16 14:24:29 +00:00
Update 'main.py'
This commit is contained in:
parent
c1c9f18521
commit
37bb014994
6
main.py
6
main.py
|
@ -495,15 +495,15 @@ def ListAllBackups():
|
|||
def CreateSingleBackup():
|
||||
|
||||
backupCommand = '''
|
||||
restic -r b2:{}:/sfbackup --verbose backup /var --password-file /var/lib/restic/rpass
|
||||
restic -r b2:{0}:/sfbackup --verbose backup /var --password-file /var/lib/restic/rpass
|
||||
'''.format(request.headers.get("X-Repository-Name"))
|
||||
|
||||
backupProcessDescriptor = subprocess.Popen(backupCommand, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
backupProcessDescriptor.communicate()[0]
|
||||
commandOutput=backupProcessDescriptor.communicate()[0]
|
||||
|
||||
return jsonify(
|
||||
status=backupProcessDescriptor.returncode
|
||||
commandOutput
|
||||
)
|
||||
|
||||
@app.route("/services/ssh/key/send", methods=["PUT"])
|
||||
|
|
Loading…
Reference in a new issue