当前位置:Gxlcms > 数据库问题 > PostgreSQL物理备份工具pg_rman(八)

PostgreSQL物理备份工具pg_rman(八)

时间:2021-07-01 10:21:17 帮助过:21人阅读

OS: Ubuntu 16.04.4 LTS
database: postgresql-10.5

pg_rman 是一款优秀的postgresql 在线备份和恢复的工具.

下载: https://github.com/ossc-db/pg_rman
使用文档: http://ossc-db.github.io/pg_rman/index.html
参考: https://github.com/ossc-db/pg_rman/tree/master
各版本软件包: https://github.com/ossc-db/pg_rman/releases

因为数据库版本是:postgresql-10.5,需要下载相应的pg_rman REL_10_STABLE: branch for postgresql-10.5

# su - postgres
$ mkdir packages
$ cd packages/

$ git clone https://github.com/ossc-db/pg_rman.git
$ cd pg_rman/
$ git branch -a          查看所有版本的分支

技术分享图片

$ git checkout REL_10_STABLE   指定postgresql版本对应的分支

技术分享图片

$ git status          查看状态

技术分享图片

$ make install         开始安装pg_rman
输出内容:

技术分享图片

如果make install 出现报错:
技术分享图片

解决办法:

$ vim Makefile
PG_CONFIG=/services/database/install/postgresql/bin/pg_config
说明: 指定你postgresql的可执行文件的路径。

再次执行:
$make  install       即可安装完成。

pg_rman备份工具已经安装完成。

PostgreSQL物理备份工具pg_rman(八)

标签:http   shadow   ast   roc   src   ges   报错   数据库   log   

人气教程排行