fix: 计划任务数据库选项增加前缀 (#1820)

This commit is contained in:
ssongliu
2023-08-03 16:19:30 +08:00
committed by GitHub
parent df770460d6
commit a031d3ba41
15 changed files with 114 additions and 40 deletions

View File

@@ -242,6 +242,10 @@ func (r *Remote) Recover(info RecoverInfo) error {
if err != nil {
return fmt.Errorf("gunzip file %s failed, stdout: %v, err: %v", info.SourceFile, string(stdout), err)
}
defer func() {
gzipCmd := exec.Command("gzip", fileName)
_, _ = gzipCmd.CombinedOutput()
}()
}
dns := fmt.Sprintf("%s:%s@tcp(%s:%v)/%s?charset=%s&parseTime=true&loc=Asia%sShanghai", r.User, r.Password, r.Address, r.Port, info.Name, info.Format, "%2F")
f, err := os.Open(fileName)