anw_000
anw_000

Reputation: 27

How to have a website folder backup strategy for Sitecore sites?

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

Answers (2)

A. Dylevich
A. Dylevich

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\
  1. Map your IIS WebSite to Symbolic Link that links to your latest release:

mklink /D c:\inetpub\wwwroot\WebApp c:\Releases\4.0\WebApp

  1. 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)

  2. 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

Chris Auer
Chris Auer

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.

https://sitecorepowershell.gitbooks.io/sitecore-powershell-extensions/content/appendix/commands/Install-UpdatePackage.html

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

Related Questions