d
This commit is contained in:
@@ -95,7 +95,7 @@ func ExtDatabaseBackupData(w http.ResponseWriter, r *http.Request) {
|
||||
dbname := vars["dataStorage"]
|
||||
tbname := vars["dataObject"]
|
||||
pack := "lm"
|
||||
log.Debugf("token:%s, method:%s, dbname:%s, tbname:%s pack:%s", token, r.Method, module, dbname, tbname, pack)
|
||||
log.Debugf("token:%s, method:%s, module:%s dbname:%s, tbname:%s pack:%s", token, r.Method, module, dbname, tbname, pack)
|
||||
exist, err := services.CheckUserPermission(token, strings.ToLower(r.Method), module, dbname, tbname, pack)
|
||||
if err != nil {
|
||||
log.Error("Failed to get permission:", err)
|
||||
@@ -134,10 +134,10 @@ func ExtDatabaseBackupData(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
affected, _ := res.RowsAffected()
|
||||
|
||||
log.Tracef("filePath:%s backup dir:%s", filePath, config.GetYamlConfig().Database.Backup)
|
||||
log.Debugf("filePath:%s backup dir:%s", filePath, config.GetYamlConfig().Database.Backup)
|
||||
cmd := exec.Command("cp", "-rf", filePath, config.GetYamlConfig().Database.Backup)
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Tracef("Exec output: %v", string(out))
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to exec:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
|
||||
Reference in New Issue
Block a user