org.rhq.core.util.updater.Deployer.redeployAndRestoreBackupFiles()
This will first perform a deploy (e.g. {@link #deploy(DeployDifferences,boolean,boolean) deploy(diff, clean, dryRun)}) and then, if there are backup files from the previous deployment, those backup files will be restored to their original locations. This is useful when you want to "undeploy" something where "undeploy" infers you want to go back to how the file system looked previously to a subsequent deployment (the one this method is being told to "redeploy"), including manual changes that were made over top the previous deployment. For example, suppose you deployed deployment ID #1 and then the user manually changed some files within that #1 deployment. Later on, you deploy deployment ID #2 (which will not only deploy #2's files but will also backup the files that were manually changed within deployment #1). You find that deployment #2 is bad and you want to revert back to how the file system looked previously. You could opt to rollback to deployment ID #1 minus those manual changes - to do this you simply {@link #deploy(DeployDifferences) deploy} #1 again. However, if you want togo back to the previous content including those manual changes, you first deploy #1 and then restore the backup files - essentially overlaying the manual changes over top #1 files. This method accomplishes that latter task.
@param diff see {@link #deploy(DeployDifferences,boolean,boolean)}
@param clean see {@link #deploy(DeployDifferences,boolean,boolean)}
@param dryRun see {@link #deploy(DeployDifferences,boolean,boolean)}
@return see {@link #deploy(DeployDifferences,boolean,boolean)}
@throws Exception if either the deployment or backup file restoration failed