powershellsharepoint-2010sitecollection

How can I import a Site Collection to another host?


I am trying to export the content from a staging server and import it into a development machine. I've tried to do this with Backup-SPSite -Identity http://staging -Path c:/export.bin on staging and Restore-SPSite -Identity http://devmachine -Path c:/export.bin -Force on development, but after I do this, some assets (e.g. images in webparts) still point to the staging server. Is there some secret sauce that I'm unaware of?

I've tried to use the -HostHeader switch, but was unable to restore the backup when it was specified.


Solution

  • It seems to be my own mistake - my web parts were saving absolute urls instead of relative.