(ctx context.Context, manifest *snapshot.Manifest)
| 390 | } |
| 391 | |
| 392 | func (c *commandSnapshotCreate) reportSnapshotStatus(ctx context.Context, manifest *snapshot.Manifest) error { |
| 393 | var maybePartial string |
| 394 | if manifest.IncompleteReason != "" { |
| 395 | maybePartial = " partial" |
| 396 | } |
| 397 | |
| 398 | sourceInfo := manifest.Source |
| 399 | |
| 400 | snapID := manifest.ID |
| 401 | |
| 402 | if c.jo.jsonOutput { |
| 403 | c.out.printStdout("%s\n", c.jo.jsonIndentedBytes(manifest, " ")) |
| 404 | } else { |
| 405 | log(ctx).Infof("Created%v snapshot with root %v and ID %v in %v", maybePartial, manifest.RootObjectID(), snapID, manifest.EndTime.Sub(manifest.StartTime).Truncate(time.Second)) |
| 406 | } |
| 407 | |
| 408 | if ds := manifest.RootEntry.DirSummary; ds != nil { |
| 409 | if ds.IgnoredErrorCount > 0 { |
| 410 | log(ctx).Warnf("Ignored %v error(s) while snapshotting %v.", ds.IgnoredErrorCount, sourceInfo) |
| 411 | } |
| 412 | |
| 413 | if ds.FatalErrorCount > 0 { |
| 414 | return errors.Errorf("Found %v fatal error(s) while snapshotting %v.", ds.FatalErrorCount, sourceInfo) //nolint:revive |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | return nil |
| 419 | } |
| 420 | |
| 421 | func getLocalBackupPaths(ctx context.Context, rep repo.Repository) ([]string, error) { |
| 422 | log(ctx).Debugf("Looking for previous backups of '%v@%v'...", rep.ClientOptions().Hostname, rep.ClientOptions().Username) |
no test coverage detected