fix: restora should not init repos added manually e.g. without the UI

This commit is contained in:
Gareth
2023-12-11 06:28:28 -08:00
parent b0da1b5e99
commit 16aceafa2d
-4
View File
@@ -53,10 +53,6 @@ func (r *RepoOrchestrator) SnapshotsForPlan(ctx context.Context, plan *v1.Plan)
func (r *RepoOrchestrator) Backup(ctx context.Context, plan *v1.Plan, progressCallback func(event *restic.BackupProgressEntry)) (*restic.BackupProgressEntry, error) {
zap.L().Debug("repo orchestrator starting backup", zap.String("repo", r.repoConfig.Id))
if err := r.repo.Init(ctx); err != nil {
return nil, fmt.Errorf("failed to init repo: %w", err)
}
snapshots, err := r.SnapshotsForPlan(ctx, plan)
if err != nil {
return nil, fmt.Errorf("failed to get snapshots for plan: %w", err)