PostgreSQL15安装pg_rman备份恢复工具

PostgreSQL15安装pg_rman备份恢复工具

𝓓𝓸𝓷 Lv6

一、下载

1
2
3
4
[postgres@2 ~]$ psql -V
psql (PostgreSQL) 15.18
[root@2 ~]# wget https://github.com/ossc-db/pg_rman/releases/download/V1.3.15/pg_rman-1.3.15-pg15.tar.gz
温馨提示: pg_rman安装包下载选择与数据库版本号对应的版本

二、安装依赖包

1
[root@2 ~]# yum install zlib-devel postgresql-devel

三、安装pg_rman

Postgresql安装pg_rman

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
[root@2 opt]# tar xvf pg_rman-1.3.15-pg15.tar.gz
[root@2 opt]# chown -R postgres.postgres pg_rman-1.3.15-pg15
[root@2 opt]# su - postgres
[postgres@2 ~]$ cd /opt/pg_rman-1.3.15-pg15/
[postgres@2 pg_rman-1.3.15-pg15]$ make

[postgres@2 pg_rman-1.3.15-pg15]$ exit
logout
[root@2 opt]# cd /opt/pg_rman-1.3.15-pg15
[root@2 pg_rman-1.3.15-pg15]# make install
make: pg_config: Command not found
make: *** No rule to make target 'install'. Stop.

[root@2 pg_rman-1.3.15-pg15]# yum install postgresql-devel

[root@2 pg_rman-1.3.15-pg15]# make install
Makefile:35: /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk'. Stop.

[root@2 pg_rman-1.3.15-pg15]# find / -name "pgxs.mk"
/root/postgresql-15.18/src/makefiles/pgxs.mk
/root/postgresql-15.10/src/makefiles/pgxs.mk
/usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk
/usr/local/pgsql/15.18/lib/pgxs/src/makefiles/pgxs.mk

[root@2 pg_rman-1.3.15-pg15]# export PGHOME=/usr/local/pgsql/15.18
[root@2 pg_rman-1.3.15-pg15]# export PATH=$PGHOME/bin:$PATH
[root@2 pg_rman-1.3.15-pg15]# pwd
/opt/pg_rman-1.3.15-pg15
[root@2 pg_rman-1.3.15-pg15]# make install
/usr/bin/mkdir -p '/usr/local/pgsql/15.18/bin'
/usr/bin/install -c pg_rman '/usr/local/pgsql/15.18/bin'

四、检查安装

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
[postgres@2 pg_rman-1.3.15-pg15]$ make installcheck
echo "+++ regress install-check in +++" && /usr/local/pgsql/15.18/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/local/pgsql/15.18/bin' --dbname=contrib_regression init option show delete purge backup backup_management restore restore_checksum backup_from_standby arc_srv_log_management
+++ regress install-check in +++
(using postmaster on Unix socket, port 5532)
============== dropping database "contrib_regression" ==============
SET
DROP DATABASE
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
============== running regression test queries ==============
test init ... ok 1930 ms
test option ... ok 1627 ms
test show ... ok 16887 ms
test delete ... ok 26904 ms
test purge ... ok 23061 ms
test backup ... ok 45075 ms
test backup_management ... ok 138254 ms
test restore ... ok 302570 ms
test restore_checksum ... ok 292014 ms
test backup_from_standby ... FAILED 72152 ms
test arc_srv_log_management ... ok 37579 ms

=======================
1 of 11 tests failed.
=======================

The differences that caused some tests to fail can be viewed in the
file "/opt/pg_rman-1.3.15-pg15/regression.diffs". A copy of the test summary that you see
above is saved in the file "/opt/pg_rman-1.3.15-pg15/regression.out".

make: *** [/usr/local/pgsql/15.18/lib/pgxs/src/makefiles/pgxs.mk:433: installcheck] Error 1
  • Title: PostgreSQL15安装pg_rman备份恢复工具
  • Author: 𝓓𝓸𝓷
  • Created at : 2026-08-26 10:55:00
  • Updated at : 2026-08-26 11:09:19
  • Link: https://www.zhangdong.me/postgresql-pg_rman.html
  • License: This work is licensed under CC BY-NC-SA 4.0.
评论