暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

华为openGauss gs_postuninstall

华为高斯 2020-06-01
1014

背景信息

openGauss提供了gs_postuninstall工具来帮助清理准备openGauss环境阶段所做配置,使得卸载后的环境得到清理。

前提条件

  • openGauss卸载执行成功。
  • root用户互信可用。
  • 只能使用root用户执行gs_postuninstall命令。

语法

  • openGauss清理用户、用户组以及虚拟IP清理

    gs_postuninstall -U USER -X XMLFILE [-L] [--delete-user] [--delete-group] [--delete-virtual-IP] [-l LOGFILE]

  • 显示帮助信息

    gs_postuninstall -? | --help

  • 显示版本号信息

    gs_postuninstall -V | --version

参数说明

  • -U

    运行openGauss的操作系统用户名。

    取值范围:字符串,要符合标识符的命名规范。

  • -X

    openGauss配置文件路径。

    取值范围:xml文件的存储路径。

  • -L

    只清理本主机的环境。

    如果openGauss内某主机做单机环境清理后,openGauss不能再做全量环境清理。

  • --delete-user

    删除-U参数指定的操作系统用户。

    如果在Redhat环境下,且用户名与用户组名相同,选择此项必须指定--delete-group参数。

  • --delete-group

    删除操作系统用户所在的用户组(选择此选项必须指定--delete-user参数)。

  • --delete-virtual-IP

    删除openGauss配置文件中的虚拟IP。

  • -l

    指定日志文件名及路径。在内部会自动给日志名添加一个时间戳。

    • 当既不明确指定-l,又不在XML文件中配置gaussdbLogPath时,默认值为“$GAUSSLOG/om/gs_postuninstall-YYYY-MMDD_hhmmss.log”。
    • 当不明确指定-l,但在XML文件中配置了gaussdbLogPath时,默认值为“gaussdbLogPath/用户名/om/gs_postuninstall-YYYY-MMDD_hhmmss.log”。

    说明:
    由于在执行gs_postuninstall后,系统会自动删除openGauss相关目录(包含$GAUSSLOG目录)。因此建议用户通过该参数指定日志文件到非openGaussopenGauss相关路径。

  • -?, --help

    显示帮助信息。

  • -V, --version

    显示版本号信息。

示例

清理主机的环境

gs_postuninstall -U omm -X /opt/software/openGauss/clusterconfig.xml --delete-user Parsing the configuration file. Successfully parsed the configuration file. Check log file path. Successfully checked log file path. Checking unpreinstallation. Successfully checked unpreinstallation. Deleting the instance's directory. Successfully deleted the instance's directory. Deleting the installation directory. Successfully deleted the installation directory. Deleting the temporary directory. Successfully deleted the temporary directory. Deleting remote OS user. Successfully deleted remote OS user. Deleting software packages and environmental variables of other nodes. Successfully deleted software packages and environmental variables of other nodes. Deleting logs of other nodes. Successfully deleted logs of other nodes. Deleting software packages and environmental variables of the local node. Successfully deleted software packages and environmental variables of the local nodes. Deleting local OS user. Successfully deleted local OS user. Deleting local node's logs. Successfully deleted local node's logs. Successfully cleaned environment.

相关命令

gs_preinstallgs_uninstall

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

文集目录
暂无数据