From 7e6c39bb080f9a02fa8a207582c1518b4f3dddf0 Mon Sep 17 00:00:00 2001 From: hzz Date: Fri, 17 Nov 2023 00:41:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=AC=E5=9C=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=87=E4=BB=BD=E5=91=BD=E4=BB=A4=E5=A2=9E=E5=8A=A0=20--defa?= =?UTF-8?q?ult-character-set=20=E5=8F=82=E6=95=B0=20=E4=B8=8E=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E8=BF=98=E5=8E=9F=E7=9A=84=E7=BC=96=E7=A0=81=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/mysql/client/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/mysql/client/local.go b/backend/utils/mysql/client/local.go index aca5156d5..8c0b7a52c 100644 --- a/backend/utils/mysql/client/local.go +++ b/backend/utils/mysql/client/local.go @@ -220,7 +220,7 @@ func (r *Local) Backup(info BackupInfo) error { } outfile, _ := os.OpenFile(path.Join(info.TargetDir, info.FileName), os.O_RDWR|os.O_CREATE, 0755) global.LOG.Infof("start to mysqldump | gzip > %s.gzip", info.TargetDir+"/"+info.FileName) - cmd := exec.Command("docker", "exec", r.ContainerName, "mysqldump", "-uroot", "-p"+r.Password, info.Name) + cmd := exec.Command("docker", "exec", r.ContainerName, "mysqldump", "-uroot", "-p"+r.Password, "--default-character-set="+info.Format, info.Name) gzipCmd := exec.Command("gzip", "-cf") gzipCmd.Stdin, _ = cmd.StdoutPipe() gzipCmd.Stdout = outfile