summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/lh_system_backup_job
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system/lh_system_backup_job')
-rwxr-xr-xabs/core/LinHES-system/lh_system_backup_job11
1 files changed, 10 insertions, 1 deletions
diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job
index 8539ff2..e248e1a 100755
--- a/abs/core/LinHES-system/lh_system_backup_job
+++ b/abs/core/LinHES-system/lh_system_backup_job
@@ -117,7 +117,16 @@ function backup(){
done
echo "Backup home dirs"
- tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME /home/vncsvc /home/xymon
+ HOMEDIRS=""
+ if [ -d /home/vncsvc ]
+ then
+ HOMEDIRS="/home/vncsvc"
+ fi
+ if [ -d /home/xymon ]
+ then
+ HOMEDIRS="$HOMEDIRS /home/xymon"
+ fi
+ tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME $HOMEDIRS
if [ -f $MYTHHOME/backup_config/backup_include.txt ]
then