Views:
IMSS rolls back automatically if there are problems during the upgrade process. However, if the automatic rollback encounters issues, you need to perform a manual rollback.

Procedure

  1. Stop the cronjob service and roll back cronjob to the status when IMSS 7.1 is installed.
    • If your operating system is Red Hat 7 or higher, run the following commands:
      systemctl stop crond.service
      crontab ./cronlist.bak
    • If your operating system is lower than Red Hat 7, run the following commands:
      service crond stop
      crontab ./cronlist.bak
  2. Uninstall IMSS 9.1 and remove the $IMSS_HOME folder using the following commands:
    $IMSS_HOME/imss/backup/uninstall.sh
    rm –rf $IMSS_HOME
  3. Remove the data folder using the following command:
    rm –rf /var/imss/pgdata
  4. Roll back package information to the status when IMSS 7.1 is installed:
    tar xvf rpm.tar -C /
    rpm --rebuilddb
  5. Roll back IMSS components using the following commands:
    tar xvf imss71.tar -C /
    tar xvf nrs.tar -C /
    tar xvf ipprofiler.tar -C /
  6. If you use the internal database and IMSS components are not installed in the default path, run the following command:
    tar xvf default_path_folder.tar -C /
  7. Roll back to the IMSS 7.1 database using the following command:
    tar xvf imssdb.tar -C /
  8. Roll back the Postfix configuration files using the following command:
    tar xvf postfix_config.tar -C /
  9. Re-create the IMSS auto start script.
    • If your operating system is lower than Red Hat 7, do the following:
      1. Save the following script information as a file, replace $IMSS_HOME with your actual folder name, and run the file:
        work_directory=$IMSS_HOME/imss
        RC_D="/etc/rc.d"
        RCDIR0="/etc/rc.d/rc0.d"
        RCDIR1="/etc/rc.d/rc1.d"
        RCDIR2="/etc/rc.d/rc2.d"
        RCDIR3="/etc/rc.d/rc3.d"
        RCDIR4="/etc/rc.d/rc4.d"
        RCDIR5="/etc/rc.d/rc5.d"
        RCDIR6="/etc/rc.d/rc6.d"
        RCDIR=$RCDIR3
        RCINITDIR="$RC_D/init.d"
        
        CreateLink()
        {
            test -f $1 && (rm -rf $2 ; ln -s $1 $2)
        }
        
        CreateRCLinkLinux()
        {
            if test -f $1 ; then
                if test ! -f $RCINITDIR/$2 ; then
                    cp $1 $RCINITDIR/$2
                    chmod +x $RCINITDIR/$2
                fi
        		CreateLink $RCINITDIR/$2 $RCDIR2/$2
        		CreateLink $RCINITDIR/$2 $RCDIR3/$2
        		CreateLink $RCINITDIR/$2 $RCDIR5/$2
            fi
        }
        
        CreateRCKLinkLinux()
        {
            if test -f $1 ; then
                if test ! -f $RCINITDIR/$2 ; then
                    cp $1 $RCINITDIR/$2
                    chmod +x $RCINITDIR/$2
                fi
        
        		CreateLink $RCINITDIR/$2  $RCDIR0/$3
        		CreateLink $RCINITDIR/$2  $RCDIR6/$3
            fi
        }
        
        CreateRCLinkLinux $work_directory/script/S99MONITOR S99MONITOR
        CreateRCKLinkLinux $work_directory/script/S99MONITOR S99MONITOR K01MONITOR
        
        CreateLink $work_directory/script/imssstop.sh $RCINITDIR/imssstop
        CreateLink $RCINITDIR/imssstop  $RCDIR0/K00IMSSSTOP
        CreateLink $RCINITDIR/imssstop  $RCDIR6/K00IMSSSTOP
        CreateRCLinkLinux $work_directory/script/S99CMAGENT S99CMAGENT
        CreateRCKLinkLinux $work_directory/script/S99CMAGENT S99CMAGENT K97CMAGENT
        CreateRCLinkLinux $work_directory/bind/bindctl.sh S99bindctl
        CreateRCKLinkLinux $work_directory/bind/bindctl.sh S99bindctl K03bindctl
        CreateRCLinkLinux $work_directory/UI/adminUI/bin/Tomcat.sh S99IMSSUI
        CreateRCKLinkLinux $work_directory/UI/adminUI/bin/Tomcat.sh S99IMSSUI K97IMSSUI
        CreateRCLinkLinux $work_directory/script/S99FOXDNS S99FOXDNS
        CreateRCKLinkLinux $work_directory/script/S99FOXDNS S99FOXDNS K02FOXDNS
        CreateRCLinkLinux $work_directory/script/S99SCHEDULED S99SCHEDULED
        CreateRCKLinkLinux $work_directory/script/S99SCHEDULED S99SCHEDULED K02SCHEDULED
        CreateRCLinkLinux $work_directory/script/dbctl.sh S98dbctl
        CreateRCKLinkLinux $work_directory/script/dbctl.sh S98dbctl K98dbctl
        if [ -f $RCINITDIR/S99dbctl ];then
        	DeleteRCLinkLinux S99dbctl K99dbctl
        	DeleteRCLinkLinux S99dbctl K03dbctl
        	CreateRCLinkLinux $work_directory/script/dbctl.sh S98dbctl
        	CreateRCKLinkLinux $work_directory/script/dbctl.sh S98dbctl K03dbctl
        fi
        
      2. Run the following command to automatically start the IMSS service:
        chkconfig --add S98dbctl
    • If your operating system is Red Hat 7 or higher, do the following:
      1. Create the imss.service file in /usr/lib/systemd/system.
      2. Save the following script information to the imss.service file and replace $IMSS_HOME with your actual folder name:
        [Unit]
        Description=InterScan Messaging Security Suite
        After=network.target remote-fs.target nss-lookup.target
        
        [Service]
        Type=simple
        RemainAfterExit=yes
        ExecStart=$IMSS_HOME/imss/script/imssstart.sh start
        ExecStop=$IMSS_HOME/imss/script/imssstop.sh stop
        PrivateTmp=true
        
        [Install]
        WantedBy=multi-user.target
      3. Start the IMSS service using the following command:
        systemctl enable imss.service