mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
Enable in-app backup/restore for global/tenants
Re-mapping of ORG and USER ID values ensures conflict-free merging. Version numbers bumped. Co-Authored-By: Harvey Kandola <harvey@documize.com>
This commit is contained in:
parent
ec1939c01d
commit
db04057d9e
10 changed files with 913 additions and 788 deletions
|
@ -194,6 +194,7 @@ func (h *Handler) Restore(w http.ResponseWriter, r *http.Request) {
|
|||
spec := m.ImportSpec{OverwriteOrg: overwriteOrg, CreateUsers: createUsers, Org: org}
|
||||
rh := restoreHandler{Runtime: h.Runtime, Store: h.Store, Context: ctx, Spec: spec}
|
||||
|
||||
// Run the restore process.
|
||||
err = rh.PerformRestore(b.Bytes(), r.ContentLength)
|
||||
if err != nil {
|
||||
response.WriteServerError(w, method, err)
|
||||
|
@ -201,6 +202,8 @@ func (h *Handler) Restore(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
h.Runtime.Log.Infof("Restore remapped %d OrgID values", len(rh.MapOrgID))
|
||||
h.Runtime.Log.Infof("Restore remapped %d UserID values", len(rh.MapUserID))
|
||||
h.Runtime.Log.Info("Restore completed")
|
||||
|
||||
response.WriteEmpty(w)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue