Added automatic database backups.

This commit is contained in:
Patrick Fairbank
2014-08-28 19:32:18 -07:00
parent 5920ea1488
commit 7e974fe36f
5 changed files with 57 additions and 0 deletions

View File

@@ -131,6 +131,13 @@ func ScheduleSavePostHandler(w http.ResponseWriter, r *http.Request) {
}
}
// Back up the database.
err = db.Backup()
if err != nil {
handleWebErr(w, err)
return
}
http.Redirect(w, r, "/setup/schedule", 302)
}