Skip to content

Commit

Permalink
feat(backup): support full backup
Browse files Browse the repository at this point in the history
ref: longhorn/longhorn 7070

Signed-off-by: Jack Lin <jack.lin@suse.com>
  • Loading branch information
ChanYiLin committed May 31, 2024
1 parent 15c1e89 commit fc94e36
Show file tree
Hide file tree
Showing 251 changed files with 7,411 additions and 6,755 deletions.
4 changes: 3 additions & 1 deletion app/cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ func createBackup(c *cli.Context) error {
}
}

parameters := map[string]string{}

credential, err := butil.GetBackupCredential(dest)
if err != nil {
return err
Expand All @@ -282,7 +284,7 @@ func createBackup(c *cli.Context) error {
}

backup, err := task.CreateBackup(backupName, snapshot, dest, biName, biChecksum,
compressionMethod, concurrentLimit, storageClassName, labels, credential)
compressionMethod, concurrentLimit, storageClassName, labels, credential, parameters)
if err != nil {
return err
}
Expand Down
62 changes: 32 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,34 @@ module github.com/longhorn/longhorn-engine

go 1.22.2

replace github.com/longhorn/types v0.0.0-20240510221052-ab949bbedea3 => github.com/ChanYiLin/types v0.0.0-20240531073006-ff7f962faabb

replace github.com/longhorn/backupstore v0.0.0-20240509144945-3bce6e69af15 => github.com/ChanYiLin/backupstore v0.0.0-20240531085347-251a4c24e5f4

require (
github.com/docker/go-units v0.5.0
github.com/gofrs/flock v0.8.1
github.com/google/uuid v1.6.0
github.com/gorilla/handlers v1.5.2
github.com/gorilla/mux v1.8.1
github.com/longhorn/backupstore v0.0.0-20240509144945-3bce6e69af15
github.com/longhorn/go-common-libs v0.0.0-20240427164621-70d1933bfa90
github.com/longhorn/go-iscsi-helper v0.0.0-20240427164656-e9439c0018ce
github.com/longhorn/sparse-tools v0.0.0-20240427164751-a7b9f1b2c8a8
github.com/longhorn/go-common-libs v0.0.0-20240514074907-351459694cbf
github.com/longhorn/go-iscsi-helper v0.0.0-20240513041205-7a18d2fd85bf
github.com/longhorn/sparse-tools v0.0.0-20240513025352-ed49dd3f93eb
github.com/longhorn/types v0.0.0-20240510221052-ab949bbedea3
github.com/moby/moby v24.0.9+incompatible
github.com/moby/moby v26.1.3+incompatible
github.com/pkg/errors v0.9.1
github.com/rancher/go-fibmap v0.0.0-20160418233256-5fc9f8c1ed47
github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli v1.22.15
golang.org/x/net v0.24.0
golang.org/x/net v0.25.0
golang.org/x/sys v0.20.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.34.0
google.golang.org/protobuf v1.34.1
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/cheggaaa/pb.v2 v2.0.7
k8s.io/mount-utils v0.30.0
k8s.io/mount-utils v0.30.1
)

require (
Expand All @@ -35,37 +39,35 @@ require (
github.com/aws/aws-sdk-go v1.34.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gammazero/deque v0.2.1 // indirect
github.com/gammazero/workerpool v1.1.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.8 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.15.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/shirou/gopsutil/v3 v3.24.4 // indirect
github.com/slok/goresilience v0.2.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
gopkg.in/VividCortex/ewma.v1 v1.1.1 // indirect
gopkg.in/fatih/color.v1 v1.7.0 // indirect
gopkg.in/mattn/go-colorable.v0 v0.1.0 // indirect
Expand All @@ -74,5 +76,5 @@ require (
gotest.tools/v3 v3.4.0 // indirect
k8s.io/apimachinery v0.27.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
)
Loading

0 comments on commit fc94e36

Please sign in to comment.