code: func (r *backupReadCloser) Close() error {
  	defer r.stdout.Close()
  
  	if err := r.cmd.Wait(); err != nil {
  		return err
  	}
  
  	// Verify that innobackupex prints "completed OK!" at the end of STDERR.
  	if !strings.HasSuffix(strings.TrimSpace(r.stderr.String()), "completed OK!") {
  		r.stderr.WriteTo(os.Stderr)
  		return errors.New("innobackupex did not complete ok")
  	}
  
  	return nil
  }
docs: // Close waits for the backup command to finish and verifies that the backup completed successfully.