2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 10:17:17 +08:00

feat: 数据库管理提交1

This commit is contained in:
耗子
2024-11-22 02:58:31 +08:00
parent 39d2eee676
commit a96bbf3dfb
17 changed files with 764 additions and 65 deletions

View File

@@ -288,7 +288,7 @@ func (r *backupRepo) createMySQL(to string, name string) error {
// createPostgres 创建 PostgreSQL 备份
func (r *backupRepo) createPostgres(to string, name string) error {
postgres, err := db.NewPostgres("postgres", "", "127.0.0.1", 5432, fmt.Sprintf("%s/server/postgresql/data/pg_hba.conf", app.Root))
postgres, err := db.NewPostgres("postgres", "", "127.0.0.1", 5432)
if err != nil {
return err
}
@@ -436,7 +436,7 @@ func (r *backupRepo) restorePostgres(backup, target string) error {
return errors.New("备份文件不存在")
}
postgres, err := db.NewPostgres("postgres", "", "127.0.0.1", 5432, fmt.Sprintf("%s/server/postgresql/data/pg_hba.conf", app.Root))
postgres, err := db.NewPostgres("postgres", "", "127.0.0.1", 5432)
if err != nil {
return err
}