chore(backup): backup blog with prefix: blog

This commit is contained in:
henry.chen
2023-06-19 23:13:33 +08:00
parent 305ae0ee70
commit e7fdf6b1db

View File

@@ -8,6 +8,7 @@ import (
"net/url" "net/url"
"os" "os"
"os/exec" "os/exec"
"path/filepath"
"time" "time"
"github.com/eiblog/eiblog/pkg/config" "github.com/eiblog/eiblog/pkg/config"
@@ -71,7 +72,7 @@ func backupFromMongoDB(now time.Time) error {
return err return err
} }
uploadParams := internal.UploadParams{ uploadParams := internal.UploadParams{
Name: name, Name: filepath.Join("blog", name), // blog/eiblog-xx.tar.gz
Size: s.Size(), Size: s.Size(),
Data: f, Data: f,
NoCompletePath: true, NoCompletePath: true,