Unibck removes data from home folder of the command submitting user

Document ID : KB000086362
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
==============================================================================================================================================

===========================================================================================================
Section of the script impacted
=======================================================================
UNI_DIR_BACKUP=`${UNI_DIR_EXEC}/unigetvar UNI_DIR_BACKUP`
nb_backup_to_keep=`${UNI_DIR_EXEC}/unigetvar UNI_BACKUP_POLICY` 

Section where the problem actually is causing the problem
================================================================================================
chmod -R 777 ${dir_backup_to_del}
rm -rf ${dir_backup_to_del}

Patch level detected:Dollar Universe 6.7.21
Product Version: Dollar.Universe 6.7.21

Description :On a Linux system it may happen that unibck, even though it does its backup correctly, remove the entire content of the home folder of the submitting user. This problem seems to have appeared with 6.7.21 Dollar Universe.

The error can only be traced with the debug mode on unibckhead activated. These anomalies can then be tracked in the universe.log file of the impacted node.
Environment:
OS: Linux
Cause:
Cause type:
Defect
Root Cause: The problem is due to unisetvar that here in this case is unable to return the value of the variavle UNI_DIR_BACKUP, the Folder is then defined as empty. Therefore the instruction 'rm -rf ${dir_backup_to_del}' points on the home folder of the submission account and removes the existing content exactly there.
Resolution:
=========================================================================================
Workaround :

Setting IS_BATCH_ENV_LOADED to N in the unibckhead script just before unisetvar is executed like in the following lines:

export IS_BATCH_ENV_LOADED=N i
UNI_DIR_BACKUP=`${UNI_DIR_EXEC}/unigetvar UNI_DIR_BACKUP`

=========================================================================================

Fix Status: Released

Fix Version(s):
Component: Application.Server
Version: Dollar.Universe 6.7.41
Additional Information:
Workaround :
N/A