backup temp folder

Document ID : KB000072658
Last Modified Date : 17/09/2018
Show Technical Document Details
Question:

Users would like to change the temporary directory where the script "ssgbackup.sh" performs temporary backup (currently /tmp/), before moving it to "/opt/SecureSpan/Gateway/config/backup/images" if everything has been completed correctly. 

The /tmp/ location is small compared to the backup , and this cause the trap notification. 
Also, it is NOT possible to increase /tmp/ dimension. 

In ssgbackup.sh, it doesn't have any references to change the current /tmp location. 

Environment:

Gateway 9.X

Answer:

Please use these steps to resolve this problem.

open up ssgbackup.sh in an editor like vi 
- add line to the script to set java.io.tmpdir system property to the location that the user wants to put tmp files in 
- execute ssgbackup.sh with -v option to see what tmp directory the tool is using (it should be the new location) 

Example snippet: 
# invoke backup as layer7 
su layer7 -c "${SSG_JAVA_HOME}/bin/java -Xmx256m \ 
-Djava.io.tmpdir=/alternate/tmp/dir \ 
-Dcom.l7tech.server.home=${SSG_HOME} \ 
-Dcom.l7tech.server.backuprestore.basedir=${REL_BASE_DIR} \ 
-jar ${BACKUP_HOME}/SSGBackupUtility.jar backup ${ESCAPED_ARGS}"