Commit ea4058df authored by szh's avatar szh

add check backup interface

parent 669ac33f
......@@ -599,6 +599,7 @@ func CheckBackup(c *gin.Context) {
path := app.GetAbsPath(setting.BityuanSetting.Name)
backupPath := path + "/datadir_backup"
if _,err := os.Stat(backupPath);err != nil {
tlog.Info("CheckBackup","err",err)
if os.IsNotExist(err) {
tlog.Error("CheckBackup file not exists","err",backupPath)
appG.Response(http.StatusOK,e.ERROR,false)
......@@ -609,6 +610,8 @@ func CheckBackup(c *gin.Context) {
return
}
}
appG.Response(http.StatusOK,e.SUCCESS,true)
return
}
func NodeRecover(c *gin.Context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment