diff --git a/pkg/restic/root.go b/pkg/restic/root.go index dabd1c1..d4effe4 100644 --- a/pkg/restic/root.go +++ b/pkg/restic/root.go @@ -85,7 +85,7 @@ func BackupPaths(tag string, paths []string) ([]byte, error) { return output, err } -func RestorePaths(repository string, snapshotId string) ([]byte, error) { +func RestorePaths(snapshotId string) ([]byte, error) { log := logger.WithName("restore-deployment") if err := checkRepo(repository); err != nil { log.Error(err, "unable to setup repo", "repo", repository) diff --git a/pkg/restore/root.go b/pkg/restore/root.go index 105657c..95f8127 100644 --- a/pkg/restore/root.go +++ b/pkg/restore/root.go @@ -26,9 +26,9 @@ func init() { func RestoreVolume(snapshotId string) error { log := logger.WithName("restore-volume") + session.RestoreSessionUpdateTargetStatus(formolv1alpha1.Running) state := formolv1alpha1.Success - repository := os.Getenv("RESTIC_REPOSITORY") - output, err := restic.RestorePaths(repository, snapshotId) + output, err := restic.RestorePaths(snapshotId) if err != nil { log.Error(err, "unable to restore volume", "output", string(output)) state = formolv1alpha1.Failure