Don't need to pass repo as arg anymore
This commit is contained in:
parent
7f3ee66b1f
commit
b7468cbe2b
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user