feat: 增加从快照恢复功能

feat: 增加升级备份与恢复
This commit is contained in:
ssongliu
2023-01-09 22:55:10 +08:00
committed by ssongliu
parent e3a15e88d7
commit e7af9de9ed
56 changed files with 12385 additions and 315 deletions

View File

@@ -1,18 +1,19 @@
package cache
import (
"time"
"github.com/1Panel-dev/1Panel/backend/global"
"github.com/1Panel-dev/1Panel/backend/init/cache/badger_db"
"github.com/dgraph-io/badger/v3"
"time"
)
func Init() {
c := global.CONF.Cache
c := global.CONF.System.Cache
options := badger.Options{
Dir: c.Path,
ValueDir: c.Path,
Dir: c,
ValueDir: c,
ValueLogFileSize: 102400000,
ValueLogMaxEntries: 100000,
VLogPercentile: 0.1,