pg备份恢复插件--walminer3.0安装

  1. Walminer工具简介
    WalMiner是从PostgreSQL的WAL(write ahead logs)日志的解析工具,旨在挖掘wal日志所有的有用信息,从而提供PG的数据恢复支持,需要将数据库日志级别配置需要大于minimal。walminer3.0版本可以解析所有的DML语句与部分重要的DDL语句,从而可以提供数据恢复支持
    2.版本支持
walminer3.0支持PostgreSQL 10及其以上版本。(此版本放弃对9.x的支持)
  1. Walminer3.0下载安装
#安装包下载地址
https://gitee.com/movead/XLogMiner/tree/walminer_3.0_stable/

4.安装

#解压
unzip XLogMiner-walminer_3.0_stable.zip
#授权
chown -R postgres.postgres /mnt/pgsql/XLogMiner-walminer_3.0_stable
#切换用户
su - root

#添加环境变量
vim /etc/profile
export PGHOME=/mnt/pgsql
export PATH=$PGHOME/bin:$PATH

cd /mnt/pgsql/XLogMiner-walminer_3.0_stable/walminer
#编译安装
USE_PGXS=1 MAJORVERSION=12 make
#MAJORVERSION支持‘10’,‘11’,‘12’,‘13’,‘14’,‘15’,‘16’
USE_PGXS=1 MAJORVERSION=12 make install

4.查看当前PG库所安装的插件名称

postgres=# select * from pg_available_extensions;
        name        | default_version | installed_version |                               comment                                
--------------------+-----------------+-------------------+----------------------------------------------------------------------
 walminer           | 3.0             | 3.0               | analyse wal to SQL
 insert_username    | 1.0             |                   | functions for tracking who changed a table
 file_fdw           | 1.0             |                   | foreign-data wrapper for flat file access
 tsm_system_time    | 1.0             |                   | TABLESAMPLE method which accepts time in milliseconds as a limit
 unaccent           | 1.1             |                   | text search dictionary that removes accents
 adminpack          | 1.1             |                   | administrative functions for PostgreSQL
 hstore_plperlu     | 1.0             |                   | transform between hstore and plperlu
 fuzzystrmatch      | 1.1             |                   | determine similarities and distance between strings
 amcheck            | 1.0             |                   | functions for verifying relation integrity
 pltcl              | 1.0             |                   | PL/Tcl procedural language
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容