script to convert tp data to archive