这篇文章给大家分享的是有关PostgreSQL物理备份工具pg_rman目怎么用的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

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$mkdirpackages$cdpackages/$gitclonehttps://github.com/ossc-db/pg_rman.git$cdpg_rman/

$gitbranch-a查看所有版本的分支

$gitcheckoutREL_10_STABLE指定postgresql版本对应的分支

$gitstatus查看状态

$makeinstall开始安装pg_rman输出内容:

如果make install 出现报错:

解决办法:$vimMakefilePG_CONFIG=/services/database/install/postgresql/bin/pg_config说明:指定你postgresql的可执行文件的路径。再次执行:$makeinstall即可安装完成。

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

感谢各位的阅读!关于“PostgreSQL物理备份工具pg_rman目怎么用”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!