code: func (p *Process) Restore(r io.Reader) (*BackupInfo, error) {
  	if err := p.writeConfig(configData{}); err != nil {
  		return nil, err
  	}
  	if err := p.unpackXbstream(r); err != nil {
  		return nil, err
  	}
  	backupInfo, err := p.extractBackupInfo()
  	if err != nil {
  		return nil, err
  	}
  	if err := p.restoreApplyLog(); err != nil {
  		return nil, err
  	}
  	return backupInfo, nil
  }
docs: // Restore restores the database from an xbstream backup.