Reply To: How to tar a site

Clovertech Forums Read Only Archives Cloverleaf Support Web How to tar a site Reply To: How to tar a site

#55890
Anonymous
Participant

    We do external support, where we sometimes need the site tarred and sent to us too. To that end we created a shell script called ‘mktar’ that’ll do the tarring for us. We place this in the $HCIROOT/usercmds/ directory so it can be called anywhere. Contents:

    # Author : Remco Kloet, E.Novation LifeLine Networks bv, cloverleaf@lifeline.nl

    cd $HCIROOT
    cp $HCIROOT/vers/license.dat $HCISITE/license_`date +%Y%m%d`.dat

    find ./$HCISITE -name “*.bak” -exec rm {} ;
    find ./$HCISITE -name “*.old” -exec rm {} ;
    find ./$HCISITE -name core -exec rm {} ;

    tar -cvf /tmp/${HCISITE}_`date +%Y%m%d`_`echo $HCIROOT | awk -F”/” ‘{print $3}’`.tar ./$HCISITE/NetConfig ./$HCISITE/Alerts ./$HCISITE/exec/processes ./$HCISITE/eoalias ./$HCISITE/formats ./$HCISITE/java_uccs ./$HCISITE/pdls ./$HCISITE/Tables ./$HCISITE/tclprocs ./$HCISITE/vb_messages ./$HCISITE/views ./$HCISITE/Xlate
    compress -f /tmp/${HCISITE}*.tar > /dev/null

    rm -f ./$HCISITE/license_`date +%Y%m%d`.dat > /dev/null

    The Network Configurator will not remove scripts under Await Replies (including Reply Generate/Resend). Although they may look inactive, they are still evaluated in start mode upon thread start. If you have stuff in there or if you have globals, they might interfere with other stuff you have set up.

    So remove the scripts first before unchecking the Await Replies box.[code]# Author : Remco Kloet, E.Novation LifeLine Networks bv, cloverleaf@lifeline.nl

    cd $HCIROOT
    cp $HCIROOT/vers/license.dat $HCISITE/license_`date +%Y%m%d`.dat

    find ./$HCISITE -name “*.bak” -exec rm {} ;
    find ./$HCISITE -name “*.old” -exec rm {} ;
    find ./$HCISITE -name core -exec rm {} ;

    tar -cvf /tmp/${HCISITE}_`date +%Y%m%d`_`echo $HCIROOT | awk -F”/” ‘{print $3}’`.tar ./$HCISITE/NetConfig ./$HCISITE/Alerts ./$HCISITE/exec/processes ./$HCISITE/eoalias ./$HCISITE/formats ./$HCISITE/java_uccs ./$HCISITE/pdls ./$HCISITE/Tables ./$HCISITE/tclprocs ./$HCISITE/vb_messages ./$HCISITE/views ./$HCISITE/Xlate
    compress -f /tmp/${HCISITE}*.tar > /dev/null

    rm -f ./$HCISITE/license_`date +%Y%m%d`.dat > /dev/null

    The Network Configurator will not remove scripts under Await Replies (including Reply Generate/Resend). Although they may look inactive, they are still evaluated in start mode upon thread start. If you have stuff in there or if you have globals, they might interfere with other stuff you have set up.

    So remove the scripts first before unchecking the Await Replies box.