A customer wanted to archive Share point sites when they were finished with them to a file to keep the share point site clean.
After consultation it was decided that exporting the site was the best option.

Now it has time for one of the sites to be imported back in. So a site was created and the default team site was used as the base template. (As I was unaware of what site was meant to be used, and it looked like the team site)

After running the import command it failed with the following error.

FatalError: Cannot import site. The exported site is based on the template STS#0 but the destination site is based on the template SGS#0. You can import sites only into sites that are based on same template as the exported site.

So how was I to find out what site template should have been used. To find out the template I ran the following command

Which gave me an output similar to (Plus a whole lot more)

From this output I can see that the Library site has used the same template file of SGS#0

So I saved that library site as a template, exported from the solutions gallery.
Imported into the site collection solutions gallery and created the restoration site using the new template.

Then I started the import again using the new site. This time it failed with

Import-SPWeb : A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title.

So I opened Share Point Designer on the new site and removed as many lists and document library’s as possible (Some were not able to be deleted) and then reran the following command.

which completed successfully. The site was now restored.