# 解压[root@hhb postgresql]# tar -zxvf pgbackrest-release-2.45.tar.gz[root@hhb postgresql]# chown -R pg143:pg143 pgbackrest-release-2.45[root@hhb postgresql]# cd pgbackrest-release-2.45/src/## 创建目录[root@hhb postgresql]# mkdir -p /opt/pg143/pgbackrest/{conf,log}[root@hhb postgresql]# chown -R pg143:pg143 /opt/pg143/pgbackrest## 编译安装[root@hhb postgresql]# cd pgbackrest-release-2.45/src/# prefix可以指定也可以不指定,,指定目录和当前src目录都会产生pgbackrest[root@hhb src]# ./configure --prefix=/opt/pg143/pgbackrest[root@hhb src]# make -j24 && make install -j24# 直接放到pg环境中[root@hhb src]# cp /opt/pg143/pgbackrest/bin/pgbackrest /opt/pg143/postgresql/bin/[root@hhb src]# chown -R pg143:pg143 /opt/pg143/pgbackrest/bin/pgbackrest[root@hhb src]# chown -R pg143:pg143 /opt/pg143/pgbackrest# 简单验证# [root@hhb src]# su - pg143[pg143@hhb ~]$ pgbackrest
pgBackRest 2.45 - General help
Usage:
pgbackrest [options][command]
Commands:
annotate Add or modify backup annotation.
archive-get Get a WAL segment from the archive.
archive-push Push a WAL segment to the archive.
backup Backup a database cluster.
check Check the configuration.
expire Expire backups that exceed retention.
help Get help.
info Retrieve information about backups.
repo-get Get a file from a repository.
repo-ls List files in a repository.
restore Restore a database cluster.
server pgBackRest server.
server-ping Ping pgBackRest server.
stanza-create Create the required stanza data.
stanza-delete Delete a stanza.
stanza-upgrade Upgrade a stanza.
start Allow pgBackRest processes to run.
stop Stop pgBackRest processes from running.
verify Verify contents of the repository.
version Get version.
Use 'pgbackrest help [command]'formore information.