When the installer fails and starting in rollback process it tries to delete all installation files. Is there any build-in way configuring the rollback process to keep certain files like LOGS files for further investigation?
To diagnose a failure, start the installer with
-Dinstall4j.alternativeLogfile=<writable path to log file>
then the log file will be written to the specified path and is not deleted by the rollback.
To copy other files so that they are not deleted by a rollback, you can copy them in case of a rollback with the "Optional Rollback Script" property of a "Run script" action. In that script, use Files.copy
:
import java.nio.file.*;
Files.copy(Paths.get("source path"), Paths.get("target path"));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.