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
$ mkdir packages
$ cd packages/

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

PostgreSQL物理備份工具pg_rman(八)

$ git checkout REL_10_STABLE   指定postgresql版本對應的分支

PostgreSQL物理備份工具pg_rman(八)

$ git status          查看狀態

PostgreSQL物理備份工具pg_rman(八)

$ make install         開始安裝pg_rman
輸出內容:

PostgreSQL物理備份工具pg_rman(八)

如果make install 出現報錯:
PostgreSQL物理備份工具pg_rman(八)

解決辦法:

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

再次執行:
$make  install       即可安裝完成。

pg_rman備份工具已經安裝完成。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章