1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-14 17:27:23 +01:00

Make backups more configurable

Backup location and maximum age can now be configured in the admin panel.
For now only S3 is supported, but adding other duplicity supported backends should be straightforward.
This commit is contained in:
Leo Koppelkamm
2015-07-26 18:25:52 +02:00
parent 0293e04311
commit 2e6c410336
4 changed files with 246 additions and 61 deletions

View File

@@ -402,6 +402,24 @@ def backup_status():
from backup import backup_status
return json_response(backup_status(env))
@app.route('/system/backup/get-custom')
@authorized_personnel_only
def backup_get_custom():
from backup import get_backup_config
return json_response(get_backup_config())
@app.route('/system/backup/set-custom', methods=["POST"])
@authorized_personnel_only
def backup_set_custom():
from backup import backup_set_custom
return json_response(backup_set_custom(
request.form.get('target', ''),
request.form.get('target_user', ''),
request.form.get('target_pass', ''),
request.form.get('target_type', ''),
request.form.get('max_age', '')
))
# MUNIN
@app.route('/munin/')
@@ -432,4 +450,3 @@ if __name__ == '__main__':
# Start the application server. Listens on 127.0.0.1 (IPv4 only).
app.run(port=10222)