save port info to database