I wrote the article about creating rollback packages that you linked to in the comments and dug into the installation process a fair bit. Generally speaking,
.update package are used by Sitecore for upgrade purposes and
.zip packages are generated by the Package Designer for packages items and files. When the zip packages or modules are installed they do not create rollback file, but by design
.update files always create a
.rlb rollback file. For it's intended purposes, this made sense: a customer tries to upgrade, something might go wrong, the rollback and installation history can be used by Sitecore Support to diagnose the upgrade issue.
The packages generated by TDS has piggy backed on this package format, and the reason for using
.update format and not
.zip is to allow the files to be installed and overwrite any existing files/configs with the same name. If
.zip were used then config files could not be overwritten and they would instead be left in a disabled state.
There is no out of the box way to disable the rollback file generation when
.update packages are installed, either using config settings or disablers, using the Update Installation Wizard, Sitecore Ship or any of the other package installer modules that I am aware of.
Internally in the Sitecore package installer code there are a number of checks in the code whether the
rollbackPackagePath folder has been set, and if not then the package is not generated. If you write your own wrapper around this code then it is possible to disable generation of the rollback file. There are a number of overloads in the
InstallPackage() method of the
Sitecore.Update.Installer.DiffInstaller class, the overloads you are most likely interested in is one of these but be sure to check the others:
public List<ContingencyEntry> InstallPackage(string packagePath)
public List<ContingencyEntry> InstallPackage(string packagePath, string rollbackPackagePath)
public List<ContingencyEntry> InstallPackage(string packagePath, string rollbackPackagePath, string logFolderPath)
public List<ContingencyEntry> InstallPackage(string packagePath, string rollbackPackagePath, string logFolderPath, ILog installationProcessLogger)
public List<ContingencyEntry> InstallPackage(string path, InstallMode mode)
public List<ContingencyEntry> InstallPackage(string path, InstallMode mode, ILog installationProcessLogger)
You can then install the package using the appropriate overload, for example:
var path = "C:\path\to\MyProject.TDSMaster.update";
var installer = new DiffInstaller(UpgradeAction.Upgrade);
Remember to also call
DiffInstaller.ExecutePostInstallationInstructions() if you have Post Deployments steps added to your TDS package.
If you are using Sitecore.Ship for your update package installation then you can clone the repo and the make the change to the code which installs the package. It would be fairly simple to pass in an additional "disableRollback" flag to allow you to run both modes with an additional parameter similar to how
disableIndexing works. Be sure to read
Working with the Sitecore.Ship Source Code in the readme file, it's simple to build a custom nuget package afterwards which you can include in your project as a file based location sourced if needed.
You can also make use of the SPE [
Install-UpdatePackage2 command and make use of remoting to install the packages. You can take a look at the code that is used to run this command in the Github repo. For example:
Install-UpdatePackage -Path "C:\path\to\MyProject.TDSMaster.update" -UpgradeAction Upgrade -InstallMode Install