ovirt实用脚本

简介: 翻译自:https://www.ovirt.org/develop/developer-guide/db-issues/helperutilities.html#taskcleaner

目录/usr/share/ovirt-engine/setup/dbutils或在开发者设置中的$PREFIX/share/ovirt-engine/setup/dbutils包含有用的脚本,帮助解决各种数据库问题。

fkvalidator

fkvalidaor.sh是一个在升级前必须在客户数据库上运行的脚本,该工具检查数据库内的所有数据是否一致,并且没有破坏任何FK约束 fkvalidaor.sh列出了发现的问题,并且在使用-f开关时可以修复这些问题

Usage: fkvalidator.sh [-h] [-s SERVERNAME [-p PORT]] [-d DATABASE] [-u USERNAME] [-l LOGFILE] [-f] [-v]

-s SERVERNAME - The database servername for the database  (def. localhost)
-p PORT       - The database port for the database        (def. 5432)
-d DATABASE   - The database name                         (def. engine)
-u USERNAME   - The admin username for the database.
-l LOGFILE    - The logfile for capturing output          (def. fkvalidator.sh.log)
-f            - Fix the non consistent data by removing it from DB.
-v            - Turn on verbosity                         (WARNING: lots of output)
-h            - This help text.

Copy

任务清理器

taskcleaner.sh是一个用于清理异步任务和相关工作步骤/补偿数据的工具。该工具可以: 1: Display

All async tasks
Only Zombie tasks


删除

All tasks
All Zombie tasks
A task related to a given task id
A Zombie task related to a given task id
All tasks related to a given command id
All Zombie tasks related to a given command id


可以添加标志(-C, -J)来指定是否也要清理工作步骤和报酬数据。

用法

Usage: taskcleaner.sh [-h] [-s server] [-p PORT]] [-d DATABASE] [-u USERNAME] [-l LOGFILE] [-t taskId] [-c commandId][-z] [-R] [-C][-J] [-q] [-v]
-s SERVERNAME - The database servername for the database (def.localhost)
-p PORT - The database port for the database (def. 5432)
-d DATABASE - The database name (def.engine)
-u USERNAME - The admin username for the database.
-l LOGFILE - The logfile for capturing output (def.taskcleaner.sh.log)
-t TASK_ID - Removes a task by its Task ID.
-c COMMAND_ID - Removes all tasks related to the given Command Id.
-z - Removes/Displays a Zombie task.
-R - Removes all Zombie tasks.
-C - Clear related compensation entries.
-J - Clear related Job Steps.
-q - Quite mode, do not prompt for confirmation.
-v - Turn on verbosity (WARNING: lots of output)
-h - Help text.


unlock_entity

unlock_entity.sh是一个用于解锁虚拟机、模板和/或其相关磁盘或特定磁盘的工具。虚拟机、模板是由其名称提供的,而特定磁盘则由其UUID提供。

使用方法

Usage: ./unlock_entity.sh [options] [ENTITIES]
-h            - This help text.
-v            - Turn on verbosity                         (WARNING: -l LOGFILE    - The logfile for capturing output          (def. )
-s HOST       - The database servername for the database  (def. localhost)
-p PORT       - The database port for the database        (def. 5432)
-u USER       - The username for the database             (def. engine)
-d DATABASE   - The database name                         (def. engine)
-t TYPE       - The object type {vm | template | disk | snapshot}
-r            - Recursive, unlocks all disks under the selected vm/template.
-q            - Query db and display a list of the locked entites.
ENTITIES      - The list of object names in case of vm/template, UUIDs in case of a disk
NOTE: This utility access the database and should have the
corresponding credentals.
In case that a password is used to access the database PGPASSWORD
or PGPASSFILE should be set.
Example:
$ PGPASSWORD=xxxxxx ./unlock_entity.sh -t disk -q


目录
相关文章
|
消息中间件 安全 Java
【RabbitMQ高级篇】消息可靠性问题
【RabbitMQ高级篇】消息可靠性问题
311 0
|
11月前
|
JavaScript
在组件中使用全局样式
【10月更文挑战第5天】
244 60
|
11月前
|
存储 数据可视化 数据挖掘
R语言在生物信息学中的应用
【10月更文挑战第21天】生物信息学是生物学、计算机科学和信息技术相结合的交叉学科,主要研究生物大分子信息的存储、处理、分析和解释。R语言作为一种强大的统计分析工具,被广泛应用于生物信息学领域。本文将介绍R语言在生物信息学中的应用,包括基因组学、转录组学、蛋白质组学、代谢组学等方面,帮助读者了解R语言在生物信息学中的重要性和应用前景。
446 4
|
10月前
|
存储 NoSQL Java
Redis命令:列表模糊删除详解
通过本文的介绍,我们详细探讨了如何在Redis中实现列表的模糊删除。虽然Redis没有直接提供模糊删除命令,但可以通过组合使用 `LRANGE`和 `LREM`命令,并在客户端代码中进行模糊匹配,来实现这一功能。希望本文能帮助你在实际应用中更有效地操作Redis列表。
348 0
|
SQL 关系型数据库 数据库
在 PostgreSQL 中使用 LIKE
【8月更文挑战第12天】
1712 1
|
11月前
|
SQL 关系型数据库 MySQL
如何查询并使用命令设置最大链接数?
【10月更文挑战第11天】如何查询并使用命令设置最大链接数?
269 0
MybatisPlus3---常用注解,驼峰转下滑线作为表明 cteateTime 数据表中的 cteate_time,@TableField,与数据库字段冲突要使用转义字符“`order`“,is
MybatisPlus3---常用注解,驼峰转下滑线作为表明 cteateTime 数据表中的 cteate_time,@TableField,与数据库字段冲突要使用转义字符“`order`“,is
|
C#
WPF技术之Image控件
Image控件可以用于加载和显示各种图像格式,包括位图(Bitmap)、矢量图(Vector)、矢量文档(XPS)等。它可以加载本地文件系统中的图像,或者从网络上下载图像。
635 0
|
SQL 存储 关系型数据库
老程序员分享:ORM之SqlSugar
老程序员分享:ORM之SqlSugar
837 0
|
Web App开发 安全 Unix
Linux 配置FTP服务器 + vsftpd服务安装配置 (Good篇)
Linux 配置FTP服务器 + vsftpd服务安装配置 (Good篇)
412 1