Re: Copy a portal from Production that is expired in TEST
If the website data already exists in TEST then you just need to recreate the portal. I think this should work:
1. Go to https://make.powerapps.com/ (yes, this must be the classic power apps not make.powerpages)
2. Select your TEST environment.
3. Still on the home page, select "[+] Blank app"
4. Select "Power Pages website", click [Create]
5. Check "User data from existing website record" and select the existing website record that you said was already there.
I think that's it. Once the site has been created you will need to set things like site visibility (who can access it).
If it happens that the data for the website doesn't exist on TEST or if you need to copy it from PROD then I suggest using the XrmToolbox app "Portal Records Mover". Use that to export your site from PROD and then run it again to import it into TEST. Then create the portal site as above using the website.