mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
chore(backup): backup blog with prefix: blog
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user