We have post-linked processes in place to checkout package contents to our deployment server when the package is promoted to the Production state. However, when demoting a package from Production to Stage state, the deployment server is not being updated to restore the previous versions of the files from the package that was demoted. How can this be done?
Harvest Software Change Manager v12.x and higher
The hsync and hrefresh commands can be used to synchronize directories on a remote server with the files in a selected project and state in Harvest. This utility can be used for package promotion and for package demotion to restore previous versions of files after a package is demoted. This chapter in the documentation explains this idea and how to implement it using Hrefresh: Synchronize Reference Directories
A limitation of the Hrefresh command is that it must use the Harvest Agent installed on the deployment server to facilitate the checkout of the files. If your deployment server does not have or you cannot install the Harvest Agent, an alternate plan is to use the Hsync command with a mapped network drive to your deployment server to accomplish the checkout. More information on hsync can be found here: hsync Command-Synchronize Directory from View Path
More information can be found here: Differences between hco, hsync and hrefresh