2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-27 04:32:40 +00:00

check: mark s3legacy layout and legacy indexes are error

This commit is contained in:
Michael Eischer 2024-06-30 10:55:44 +02:00
parent 66a67d568d
commit b1250eead9

View File

@ -264,7 +264,7 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
term.Print("Duplicate packs are non-critical, you can run `restic repair index' to correct this.\n") term.Print("Duplicate packs are non-critical, you can run `restic repair index' to correct this.\n")
} }
if suggestLegacyIndexRebuild { if suggestLegacyIndexRebuild {
printer.E("Found indexes using the legacy format, you must run `restic repair index' to correct this.\n") printer.E("error: Found indexes using the legacy format, you must run `restic repair index' to correct this.\n")
} }
if mixedFound { if mixedFound {
term.Print("Mixed packs with tree and data blobs are non-critical, you can run `restic prune` to correct this.\n") term.Print("Mixed packs with tree and data blobs are non-critical, you can run `restic prune` to correct this.\n")
@ -288,7 +288,8 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
orphanedPacks++ orphanedPacks++
printer.P("%v\n", err) printer.P("%v\n", err)
} else if err == checker.ErrLegacyLayout { } else if err == checker.ErrLegacyLayout {
printer.P("repository still uses the S3 legacy layout\nPlease run `restic migrate s3legacy` to correct this.\n") errorsFound = true
printer.E("error: repository still uses the S3 legacy layout\nYou must run `restic migrate s3legacy` to correct this.\n")
} else { } else {
errorsFound = true errorsFound = true
printer.E("%v\n", err) printer.E("%v\n", err)