Check Point 删除老的升级包和遗留文件

Solution ID sk91060
Product Security Gateway, Security Management, Cluster - 3rd party, VSX
Version R70, R70.1,
R70.20, R70.30, R70.40, R70.50, R71, R71.10, R71.20, R71.30, R71.40,
R71.45, R71.50, R75, R75.10, R75.20, R75.30, R75.40, R75.40VS, R75.45,
R75.46, R75.47, R76, R77, R77.10, R77.20, R77.30
OS SecurePlatform 2.6, Gaia

Platform / Model


2000, 4000, 12000, 12000 VSX, 13000, 21000, 21000 VSX, Intel/PC, Power-1, UTM-1, VSX-1, Smart-1

CP升级后,不管是通过web UI,还是命令行升级的,其下载的补丁包是不会自动删除的,为了避免硬盘空间不足,所以需要手工删除这些不用的补丁包。

使用check point 提供的专用脚本即可。

Solution

A new script was developed in order to remove all old packages and files from the upgraded machine (R70 GA and above).

Important Notes:

The script can be used only on SecurePlatform OS and on Gaia OS running Check Point R70 and higher versions.

On Linux OS and on Solaris OS, the users should use the official "Uninstall" procedure documented in the relevant R7x Installation and Upgrade Guide (R70, R70.20, R70.30, R71, R75, R75.20, R75.40, R75.40VS, R76, R77 Gaia, R77 Non-Gaia).

On Windows OS, there is no automated way to remove old files from
the previous installations. Users can only uninstall old SmartConsole
packages. Manual deletion (or uninstalling) of previous versions‘
folders should not be performed.

For Provider-1 / Multi-Domain Management Server, refer to sk65330 - Removing old installations on Provider-1 / Multi-Domain Management Server.

Follow these steps to remove all old packages and files:

Download the TAR file with the shell script - RemoveOldVersion.tar.

Transfer the RemoveOldVersion.tar file to the relevant machine (for example, /var/log/ directory).

Connect to the command line on the machine.

Log in to Expert mode.

Extract the shell script:

[[email protected]]# cd /var/log/
[[email protected]]# tar xvf RemoveOldVersion.tar

Assign the execute permissions to the script:

[[email protected]]# chmod u+x /var/log/RemoveOldVersion.sh

Execute the script:

[[email protected]]# ./RemoveOldVersion.sh

The script performs the following operations:

/opt/<package>

/var/opt/<package>

/var/OPT/<package>

/opt/CPshrd-*

/var/log/CPsuite-*

CPrt (Eventia products)

CPinfo (CPinfo utility)

CPuepm (Endpoint Security Server)

CPda (Deployment Agent)

CPSmartLog (SmartLog)

CPmds (Multi-Domain Security Management Server)

Creates a detailed log file:
/var/log/RemoveOldVersion.elg

Uninstalls all old RPM packages, except these:

Deletes all directories and files that were installed by old RPM
packages (except those mentioned above):

Restores ‘/sysimg‘ location (if created directory/symlink) after installation.

Restores links for old FW-1 log folders that exist in ‘/var/log‘.

Once the script completes its job, the user will get the prompt back.

To verify that the script has finished successfully, run the following commands:

[[email protected]]# rpm -qa | grep CP
[[email protected]]# ls -l /opt/CP*
[[email protected]]# ls -l /var/opt/CP*
[[email protected]]# ls -l /var/log/CPsuite-*

Notes:

  • The outputs should show only the latest version (to which the system was upgraded).
  • These directories are not deleted:
  1. CPrt (Eventia products)
  2. CPinfo (CPinfo utility)
  3. CPuepm (Endpoint Security Server)
  4. CPda (CPUSE Deployment Agent)
  5. CPSmartLog (SmartLog)
  6. CPmds (Multi-Domain Security Management Server)
时间: 2024-11-09 03:55:36

Check Point 删除老的升级包和遗留文件的相关文章

删除除了匹配到的所有文件以及文件夹

在linux应用中经常用到 rm 有时候只想删除除了匹配到的所有文件以及文件夹. 解决方法一:自己写一个脚本. 方法二:Bash Shell有个extglob选项,开启之后Shell可以另外识别出5个模式匹配操作符,能使文件匹配更加方便. 开启方法很简单,使用shopt命令:shopt -s extglob 开启之后,以下5个模式匹配操作符将被识别: ?(pattern-list) - 所给模式匹配0次或1次: *(pattern-list) - 所给模式匹配0次以上包括0次:+(pattern

删除一个目录下的所有文件,但保留一个指定文件

此题问题虽小,但是初学者还是很难给出合理的答案的!本文来自老男孩21期网络班学员 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 面试题:删除一个目录下的所有文件,但保留一个指定文件 解答: 假设这个目录是/xx/,里面有file1,file2,file3..file10  十个文件

Eclipse 上传 删除 下载 分析 hdfs 上的文件

本篇讲解如何通过Eclipse 编写代码去操作分析hdfs 上的文件. 1.在eclipse 下新建Map/Reduce Project项目.如图:  项目建好后,会默认加载一系列相应的jar包. 下面还有很多包. 2.我们新建Java 类就可以了.代码如下: package org.hadoop.examples; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOExcep

删除某一路径下所有文件

想删除某一路径之下所有文件: 删除文件,Insus.NET 写了2个方法,名称一样,重载而已. 原理简单,即是循环指定路径下所有目录和子目录来进行删除文件.重载的方法,带多一个参数.是想删除几天前的文件,根扰文件的创建日期来判断. 代码高亮的一行,Insus.NET是想这个数据不管使用这个方法,输入一个正数或是负数均可.最终处理为一个负数. 写到这里,你还可以限制不能输入0值. public static void DeleteAllFiles(string physicalPath) { Di

php删除指定目录下的相关文件实例

在php中删除文件最简单的办法直接使用unlink命令,但本文章介绍的是需要删除指定目录下的指定文件,所以我需要遍历删除了,具体看这个例子.  代码如下 复制代码 <?php //删除指定文件夹下的非法文件 function my_del($dir)  {     if(is_dir($dir)){         //打开指定文件夹         if($handle = opendir($dir))         {             while(false !== ($file

设置并删除Dreamweaver自动生成的_notes文件夹

在使用Dreamweaver做项目时站点下面的每个文件夹里面都会自动生成一个_notes文件夹,删除之后马上又会再次生成.最近做项目时,有童鞋一不小心把所有的_notes文件夹全部存回到SVN上面了,使得大家都无法从服务器上获取最新版本,这下麻烦大了,只能在版本控制上面一个一个删除. 什么?不知道_notes文件夹是什么?_notes文件夹是记录一些维护设计备注的,比如给某个文件夹作一个备注,说明这个文件夹的作用. 有没有什么方法能够删除全部_notes文件夹并且不再让其自动生成呢?在站点管理器

linux面试题:删除一个目录下的所有文件,但保留一个指定文件

此题问题虽小,但是初学者还是很难给出合理的答案的!本文来自老男孩21期网络班学员 面试题:删除一个目录下的所有文件,但保留一个指定文件 解答: 假设这个目录是/xx/,里面有file1,file2,file3..file10  十个文件 [[email protected] xx]# touch file{1..10} [[email protected] xx]# ls file1  file10  file2  file3  file4  file5  file6  file7  file8

C++ 删除一个文件目录下的所有文件以及目录

1 //删除一个文件目录下的所有文件,并删除当前文件夹 chrDirName = _T("c:\\123"); 2 BOOL CIVMSvrInfo::ReleaseDirectory(CString chrDirName) 3 { 4 BOOL bRemove = DoRemoveDirectory(chrDirName); 5 if (bRemove) 6 ::RemoveDirectory(chrDirName); 7 else 8 return FALSE; 9 10 retu

记一次删除Git记录中的大文件的过程

app/test/target/ #查看大文件 git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -5 | awk '{print$1}')" #删除大文件或者目录 git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch app/