Product: TIBCO Spotfire®
Attachment manager use of system temp folder when using the config.bat/config.sh tool
The TIBCO Spotfire Server service has its AttachmentManager path defined in the catalina.bat, as temp folder of tomcat (\<server-installation directory>\tomcat\temp), but when we run few commands such as "export-library-content" an AttachmentManager folder is created in the system temp folder (C:\Users\Administrator\AppData\Local\Temp) in windows and (/tmp) in Linux. This may cause some trouble when the .tmp files are very large and there is insufficient disk space on the primary system drive.
This article helps us understand why some of the commands like "export-library-content" create AttachmentManager temp files in the system temp folder
1) Why is it configured to use system temp and not the tomcat\temp?
2) Is it safe to use the Spotfire Server default \tomcat\temp folder? Question 1) Why it is configured to use system temp and not \tomcat\temp?
The commands can be run on a machine which does not have the TIBCO Spotfire Server installed if the spotfireconfigtool.jar is downloaded to another machine. In that case, there will be no default "Spotfire temp directory". Additionally, the server expects that it has total control over this directory, e.g. the "\tomcat\temp\AttachmentManager\" directory which means it is cleaned anytime the server is started.
Question 2) Is it safe to use the Spotfire Server \tomcat\temp folder?
The default location can be controlled with the Java system properties "javax.servlet.context.tempdir" and "java.io.tmpdir" (by order of precedence). So you can create a separate temp directory on the larger partition to ensure that the Spotfire Server does not cleanup the directory while it is being used by your config tool commands. This is preferred to using the Spotfire Server default \tomcat\temp folder. In most cases, this will not cause an issue, but there is a chance of file name collision and cleanup of the folder contents which can cause issues, which means using the Spotfire Server default \tomcat\temp folder is not recommended.
See the referenced KB 000036399 for details on how to change the code in config.bat/config.sh to point to a custom temp folder instead. Doc: Attachment manager