diff --git a/cmd/restic/cmd_migrate.go b/cmd/restic/cmd_migrate.go index e89980050..7e472ff12 100644 --- a/cmd/restic/cmd_migrate.go +++ b/cmd/restic/cmd_migrate.go @@ -74,8 +74,10 @@ func checkMigrations(ctx context.Context, repo restic.Repository, printer progre func applyMigrations(ctx context.Context, opts MigrateOptions, gopts GlobalOptions, repo restic.Repository, args []string, term *termstatus.Terminal, printer progress.Printer) error { var firsterr error for _, name := range args { + found := false for _, m := range migrations.All { if m.Name() == name { + found = true ok, reason, err := m.Check(ctx, repo) if err != nil { return err @@ -119,6 +121,9 @@ func applyMigrations(ctx context.Context, opts MigrateOptions, gopts GlobalOptio printer.P("migration %v: success\n", m.Name()) } } + if !found { + printer.E("unknown migration %v", name) + } } return firsterr