2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 23:27:17 +08:00
Files
panel/internal/biz/backup.go
2025-09-18 23:24:03 +08:00

27 lines
781 B
Go

package biz
import "github.com/acepanel/panel/pkg/types"
type BackupType string
const (
BackupTypePath BackupType = "path"
BackupTypeWebsite BackupType = "website"
BackupTypeMySQL BackupType = "mysql"
BackupTypePostgres BackupType = "postgres"
BackupTypeRedis BackupType = "redis"
BackupTypePanel BackupType = "panel"
)
type BackupRepo interface {
List(typ BackupType) ([]*types.BackupFile, error)
Create(typ BackupType, target string, path ...string) error
Delete(typ BackupType, name string) error
Restore(typ BackupType, backup, target string) error
ClearExpired(path, prefix string, save int) error
CutoffLog(path, target string) error
GetPath(typ BackupType) (string, error)
FixPanel() error
UpdatePanel(version, url, checksum string) error
}