0

I have a few separate Application Pages built for SharePoint 2010 using Visual Studio 2012 and I'd like a way to back up and restore these SharePoint solutions (does not have to be a SharePoint based backup/restore) in case of server failure or other means.

Thanks.

1

First, to be able to create an Application Page in SharePoint, you should create a SharePoint Solution then add an application page that must be deployed as farm solution only.

When you build your solution, it's packaged in a SharePoint Solution package (WSP) file. and you can use PowerShell Add-SPSolution and Install-SPSolution to deploy it to your farm.

After deploying your solution the Application page will be located in 14 hive at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\yoursolution name

And the WSP solution should be listed in Central administration > System Management > Manage Farm Solutions

So you need to backup and restore a WSP solution rather than page as the following:

Backup WSP solution,

Now you will be able to backup all the WSP solution that deployed to your farm via PowerShell as the following:

$FolderPath = "c:\WSPSolutions"  
foreach ($solution in Get-SPSolution)  
{  
   $id = $Solution.SolutionID  
   $title = $Solution.Name  
   $filename = $Solution.SolutionFile.Name  
   $solution.SolutionFile.SaveAs("$FolderPath\$filename") 
}

Or you can just backup specific solution as

$file = (Get-SPFarm).Solutions.Item("AppPageSolution.wsp").SolutionFile
$file.SaveAs("c:\backup\AppPageSolution.wsp")

Restore WSP solution,

For more details check Install and deploy a SharePoint (WSP) Solution Package using SharePoint Shell

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.