Reputation: 27
I am trying to create a system where automatic deployments are done on Sitecore websites REMOTELY. I would like to take a backup of the WEBSITE folder before every deployment so that I can roll back if something goes wrong. Since these deployments are going to cover the production environments as well where powershell is not allowed to run, what should be the strategy for taking these backups?
Upvotes: 0
Views: 415
Reputation: 404
You can consider the following strategy:
1. Create your own Release Repository like:
C:\Releases\1.0\WebSite\
C:\Releases\2.0\WebSite\
C:\Releases\3.0\WebSite\
mklink /D c:\inetpub\wwwroot\WebApp c:\Releases\4.0\WebApp
When new Release Build is ready upload it to your Release Repository and update the Symbolic Link. (You would have to delete and create it again)
If something goes wrong you can always rollback by updating your Symbolic Link back to prior Release.
One of the additional benefits: you have the history of all your Releases.
Upvotes: 1
Reputation: 1445
The first thing you should look into is Anti-Packages. These are packages that are created with PowerShell of all the items that are about to change based on a package you want to install. Its a rollback package you can install if the package goes wrong.
You can read more here. http://xcentium.com/blog/2015/11/10/sitecore-and-powershell
Using the Install-Package Sitecore PowerShell command, you can specify a rollback anti-package you created.
If you don't want to go that route, you can just backup the whole website folder.
http://maxiomtech.com/tips-tricks/using-powershell-and-7zip-to-backup-your-website/
Upvotes: 1